YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
/* Remove all rows from a MARIA table */ /* This clears the status information and truncates files */
Weuselsn-1belowtoensurethattheaboveredowillbeexecuted
*/
error= _ma_state_info_write(share,
MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET |
MA_STATE_INFO_WRITE_LOCK) ||
_ma_update_state_lsns(share, lsn-1, info->trn->trid, FALSE, FALSE) ||
_ma_sync_table_files(info);
info->trn->rec_lsn= LSN_IMPOSSIBLE; if (error) goto err;
} else
{ if (_ma_mark_file_changed(share)) goto err; /* Other branch called function below when writing log record, in hook */
_ma_reset_status(info);
} /* Remove old history as the table is now empty for everyone */
_ma_reset_state(info);
share->state.changed= 0;
if (info->s->tracked)
{
_ma_update_tmp_file_size(&info->s->track_data, 0);
_ma_update_tmp_file_size(&info->s->track_index, share->base.keystart);
}
if (_ma_initialize_data_file(share, info->dfile.file)) goto err;
if (log_record)
{ /* Update lsn to signal that the above redo does not have to be executed anymore */ if ( _ma_update_state_lsns(share, lsn, info->trn->trid, FALSE, FALSE) ||
_ma_sync_table_files(info)) goto err;
}
if (info->opt_flag & WRITE_CACHE_USED)
reinit_io_cache(&info->rec_cache, WRITE_CACHE, 0, 1, 1);
_ma_writeinfo(info, WRITEINFO_UPDATE_KEYFILE); #ifdef HAVE_MMAP /* Map again */ if (mmap_file)
_ma_dynmap_file(info, (my_off_t) 0); #endif
DBUG_RETURN(0);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.