WL#3072 Maria Recovery. Making DDLs durable in Maria:
Sync table files after CREATE (of non-temp table), DROP, RENAME, TRUNCATE, sync directories and symlinks (for the 3 first commands). Comments for future log records. In ma_rename(), if rename of index works and then rename of data fails, try to undo the rename of the index to leave a consistent state. mysys/my_symlink.c: sync directory after creation of a symbolic link in it, if asked mysys/my_sync.c: comment. Fix for when the file's name has no directory in it. storage/maria/ma_create.c: sync files and links and dirs when creating a non-temporary table. Optimizations of the above to reduce syncs in the common cases: * if index file and data file have the exact same paths (regular and link), sync the directories (of regular and link) only once after creating the last file (the data file). * don't sync the data file if we didn't write to it (always true in our builds). storage/maria/ma_delete_all.c: sync files after truncating a table storage/maria/ma_delete_table.c: sync files and symbolic links and dirs after dropping a table storage/maria/ma_extra.c: a function which wraps the sync of the index file and the sync of the data file. storage/maria/ma_locking.c: using a wrapper function storage/maria/ma_rename.c: sync files and symbolic links and dirs after renaming a table. If rename of index works and then rename of data fails, try to undo the rename of the index to leave a consistent state. That is just a try, it may fail... storage/maria/ma_test3.c: warning to not pay attention to this test. storage/maria/maria_def.h: declaration for the function added to ma_extra.c
Showing
Please register or sign in to comment