mariadb/storage/maria
unknown a41ac15b96 Maria - various fixes around durability of files:
1) on Mac OS X >=10.3, fcntl() is recommended over fsync (from the
man page: "[With fsync()] the disk drive may also re-order the data
so that later writes may be present while earlier writes are not.
Applications such as databases that require a strict ordering of writes
should use F_FULLFSYNC to ensure their data is written in the order
they expect"). I have seen two other pieces of software changing from
fsync to F_FULLFSYNC on Mac OS X.
2) to make a file creation/deletion/renaming durable on Linux (at least
ext2 as I have tested) (see "man fsync"), a fsync() on the directory
is needed: new functions to do that, and a flag MY_SYNC_DIR to do
it in my_create/my_delete/my_rename.
3) now using this directory syncing when creating he frm if
opt_sync_frm, and for Maria's control file when it is created.


include/my_sys.h:
  new flag to my_create/my_delete/my_rename, which asks to sync the
  directory after the operation is done (currently does nothing except
  on Linux)
libmysql/CMakeLists.txt:
  my_create() now depends on my_sync() so my_sync is needed for libmysql
libmysql/Makefile.shared:
  my_create() now depends on my_sync() so my_sync is needed for libmysql
mysys/my_create.c:
  my_create() can now sync the directory if asked for
mysys/my_delete.c:
  my_delete() can now sync the directory if asked for
mysys/my_open.c:
  it was a bug that my_close() is done on fd but a positive fd would
  still be returned, by my_register_filename().
mysys/my_rename.c:
  my_rename() can now sync the two directories (the one of "from" and
  the one of "to") if asked for.
mysys/my_sync.c:
  On recent Mac OS X, fcntl(F_FULLFSYNC) is recommended over fsync()
  (see "man fsync" on Mac OS X 10.3).
  my_sync_dir(): to sync a directory after a file creation/deletion/
  renaming; can be called directly or via MY_SYNC_DIR in my_create/
  my_delete/my_rename(). No-op except on Linux (see "man fsync" on Linux).
  my_sync_dir_from_file(): same as above, just more practical when the
  caller has a file name but no directory name ready.
  Should the #warning even be a #error? I mean do we want to release
  binaries which don't guarantee any durability?
sql/log.cc:
  a TODO for the future.
sql/unireg.cc:
  If we sync the frm it makes sense to also sync its creation in the
  directory.
storage/maria/ma_control_file.c:
  control file is vital, try to make it to disk
2006-11-21 22:22:59 +01:00
..
unittest minor unittest fixes 2006-11-12 14:44:12 +01:00
CMakeLists.txt fixed typo 2006-11-15 12:58:37 +02:00
ft_maria.c Manually merging changes made to MyISAM into Maria. End of merge. 2006-09-07 17:07:17 +02:00
ha_maria.cc Merge bk-internal.mysql.com:/home/bk/mysql-maria 2006-10-13 11:43:33 +02:00
ha_maria.h Merge of recent MyISAM changes into Maria. Testsuite passes as much 2006-10-11 19:30:16 +03:00
lockman.c minor unittest fixes 2006-11-12 14:44:12 +01:00
lockman.h post-review fixes (style) 2006-10-19 12:21:30 +02:00
ma_cache.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_changed.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_check.c Manually importing Ingo's fix for BUG#22119 2006-10-30 12:44:33 +01:00
ma_checkpoint.c WL#3071 Maria checkpoint: 2006-09-14 19:06:51 +02:00
ma_checkpoint.h WL#3071 Maria checkpoint: 2006-09-14 19:06:51 +02:00
ma_checksum.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_close.c WL#3270 "Maria - cleanups of inherited MyISAM functionality" 2006-05-05 20:32:02 +02:00
ma_control_file.c Maria - various fixes around durability of files: 2006-11-21 22:22:59 +01:00
ma_control_file.h WL#3071 Maria checkpoint: 2006-09-14 19:06:51 +02:00
ma_create.c fixes for inline bit functions 2006-08-11 01:16:51 +02:00
ma_dbug.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_delete.c Merge of recent MyISAM changes into Maria. Testsuite passes as much 2006-10-11 19:30:16 +03:00
ma_delete_all.c WL#3270 "Maria - cleanups of inherited MyISAM functionality" 2006-05-05 20:32:02 +02:00
ma_delete_table.c Completion of merge of mysql-5.1 into mysql-maria. 2006-08-10 16:36:54 +02:00
ma_dynrec.c Manually merging changes made to MyISAM into Maria. End of merge. 2006-09-07 17:07:17 +02:00
ma_extra.c Manually merging changes made to MyISAM into Maria. End of merge. 2006-09-07 17:07:17 +02:00
ma_ft_boolean_search.c Completion of merge of mysql-5.1 into mysql-maria. 2006-08-10 16:36:54 +02:00
ma_ft_eval.c Completion of merge of mysql-5.1 into mysql-maria. 2006-08-10 16:36:54 +02:00
ma_ft_eval.h Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_ft_nlq_search.c Completion of merge of mysql-5.1 into mysql-maria. 2006-08-10 16:36:54 +02:00
ma_ft_parser.c Manually merging changes made to MyISAM into Maria. End of merge. 2006-09-07 17:07:17 +02:00
ma_ft_stem.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_ft_test1.c Completion of merge of mysql-5.1 into mysql-maria. 2006-08-10 16:36:54 +02:00
ma_ft_test1.h Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_ft_update.c Completion of merge of mysql-5.1 into mysql-maria. 2006-08-10 16:36:54 +02:00
ma_ftdefs.h Completion of merge of mysql-5.1 into mysql-maria. 2006-08-10 16:36:54 +02:00
ma_fulltext.h Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_info.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_init.c Merge of recent MyISAM changes into Maria. Testsuite passes as much 2006-10-11 19:30:16 +03:00
ma_key.c Completion of merge of mysql-5.1 into mysql-maria. 2006-08-10 16:36:54 +02:00
ma_keycache.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_least_recently_dirtied.c WL#3071 Maria checkpoint: 2006-09-14 19:06:51 +02:00
ma_least_recently_dirtied.h WL#3071 Maria checkpoint: 2006-09-14 19:06:51 +02:00
ma_locking.c Merge of recent MyISAM changes into Maria. Testsuite passes as much 2006-10-11 19:30:16 +03:00
ma_open.c Manually merging changes made to MyISAM into Maria. End of merge. 2006-09-07 17:07:17 +02:00
ma_packrec.c Merge of recent MyISAM changes into Maria. Testsuite passes as much 2006-10-11 19:30:16 +03:00
ma_page.c Completion of merge of mysql-5.1 into mysql-maria. 2006-08-10 16:36:54 +02:00
ma_panic.c Merge of recent MyISAM changes into Maria. Testsuite passes as much 2006-10-11 19:30:16 +03:00
ma_preload.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_range.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_recovery.c WL#3071 Maria checkpoint: 2006-09-14 19:06:51 +02:00
ma_recovery.h WL#3071 Maria checkpoint: 2006-09-14 19:06:51 +02:00
ma_rename.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_rfirst.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_rkey.c Merge of recent MyISAM changes into Maria. Testsuite passes as much 2006-10-11 19:30:16 +03:00
ma_rlast.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_rnext.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_rnext_same.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_rprev.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_rrnd.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_rsame.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_rsamepos.c Completion of merge of mysql-5.1 into mysql-maria. 2006-08-10 16:36:54 +02:00
ma_rt_index.c Completion of merge of mysql-5.1 into mysql-maria. 2006-08-10 16:36:54 +02:00
ma_rt_index.h Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_rt_key.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_rt_key.h Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_rt_mbr.c Completion of merge of mysql-5.1 into mysql-maria. 2006-08-10 16:36:54 +02:00
ma_rt_mbr.h Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_rt_split.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_rt_test.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_scan.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_search.c Completion of merge of mysql-5.1 into mysql-maria. 2006-08-10 16:36:54 +02:00
ma_sort.c Manually merging changes made to MyISAM into Maria. End of merge. 2006-09-07 17:07:17 +02:00
ma_sp_defs.h Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_sp_key.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_sp_test.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_static.c WL#3270 "Maria - cleanups of inherited MyISAM functionality" 2006-05-05 20:32:02 +02:00
ma_statrec.c WL#3270 "Maria - cleanups of inherited MyISAM functionality" 2006-05-05 20:32:02 +02:00
ma_test1.c Completion of merge of mysql-5.1 into mysql-maria. 2006-08-10 16:36:54 +02:00
ma_test2.c fixes for inline bit functions 2006-08-11 01:16:51 +02:00
ma_test3.c Completion of merge of mysql-5.1 into mysql-maria. 2006-08-10 16:36:54 +02:00
ma_test_all.res Add ma_test_all.res 2006-04-11 20:00:57 +03:00
ma_test_all.sh Maria: importing change made to MyISAM's mi_test_all, into Maria's ma_test_all 2006-11-10 16:18:10 +01:00
ma_unique.c Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
ma_update.c Manually merging changes made to MyISAM into Maria. End of merge. 2006-09-07 17:07:17 +02:00
ma_write.c Merge of recent MyISAM changes into Maria. Testsuite passes as much 2006-10-11 19:30:16 +03:00
Makefile.am lock manager optimized for table locks 2006-11-09 16:20:40 +01:00
maria_chk.c fixes for inline bit functions 2006-08-11 01:16:51 +02:00
maria_def.h Merge of recent MyISAM changes into Maria. Testsuite passes as much 2006-10-11 19:30:16 +03:00
maria_ftdump.c Merge of recent MyISAM changes into Maria. Testsuite passes as much 2006-10-11 19:30:16 +03:00
maria_pack.c Completion of merge of mysql-5.1 into mysql-maria. 2006-08-10 16:36:54 +02:00
maria_rename.sh Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
plug.in WL#3234 Maria Control file manager 2006-09-15 11:05:35 +02:00
tablockman.c comments 2006-11-10 10:56:05 +01:00
tablockman.h comments 2006-11-10 10:56:05 +01:00
test_pack Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
trnman.c Maria: fix for a bug in the transaction's manager and a bug in 2006-11-08 23:22:38 +01:00
trnman.h trnman_destroy returns void, remove unused variables 2006-10-23 12:44:08 +02:00