summaryrefslogtreecommitdiff
path: root/storage/maria/ma_test3.c
diff options
context:
space:
mode:
authorunknown <guilhem@gbichot3.local>2006-11-27 22:01:29 +0100
committerunknown <guilhem@gbichot3.local>2006-11-27 22:01:29 +0100
commitde6f550ec7015fccd044a54c7628cdf8cdc2ed8c (patch)
tree106184cb5d00019bbc3e544912757a1db64b6de8 /storage/maria/ma_test3.c
parentadfba203ffd1bd89d74a63ff09de9b9a40fb64d7 (diff)
downloadmariadb-git-de6f550ec7015fccd044a54c7628cdf8cdc2ed8c.tar.gz
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
Diffstat (limited to 'storage/maria/ma_test3.c')
-rw-r--r--storage/maria/ma_test3.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/storage/maria/ma_test3.c b/storage/maria/ma_test3.c
index 96b896b03c6..2f205c33b12 100644
--- a/storage/maria/ma_test3.c
+++ b/storage/maria/ma_test3.c
@@ -65,6 +65,10 @@ int main(int argc,char **argv)
MY_INIT(argv[0]);
get_options(argc,argv);
+ fprintf(stderr, "WARNING! this program is to test 'external locking'"
+ " (when several processes share a table through file locking)"
+ " which is not supported by Maria at all; expect errors."
+ " We may soon remove this program.\n");
maria_init();
bzero((char*) keyinfo,sizeof(keyinfo));
bzero((char*) recinfo,sizeof(recinfo));