• unknown's avatar
    WL#3239 "log CREATE TABLE in Maria": write the log record _before_ · 34d15a59
    unknown authored
    creating the data file, and sync this log, so that the table cannot be
    used if log record didn't reach disk. The same way, we force the log
    in DROP/RENAME TABLE. Also in REPAIR TABLE though logging in this
    case is not polished.
    Making DELETE FROM t <no WHERE> atomic: we log the record before
    starting the operation, and will finish this op at Recovery if needed.
    
    
    storage/maria/ma_check.c:
      comment. Force the log record for the log to have a complete history.
    storage/maria/ma_create.c:
      better conformance to the text of WL#3239 "log CREATE TABLE in Maria":
      write the log record before creating the data file. This ensures
      that the log can be applied to an old backup in all circumstances.
      errpos=2 was wrong.
    storage/maria/ma_delete_all.c:
      making DELETE FROM t <no WHERE> atomic: we log the record before
      starting the operation, and will finish the operation at Recovery
      if needed. Thus there is no need to force files to disk.
    storage/maria/ma_delete_table.c:
      forcing the log before dropping a table, so that the log has the
      entire history.
    storage/maria/ma_loghandler.c:
      LOGREC_REDO_DELETE_ALL needs to set trn's rec_lsn so that the log's
      low-water mark and Checkpoint retain this record until the 
      delete operation has finished.
    storage/maria/ma_rename.c:
      force the log before renaming a table, so that the log has a complete
      history.
    34d15a59
ma_delete_table.c 3.63 KB