mariadb/storage/maria
Guilhem Bichot a5bcb63f45 WL#4374 "Maria - force start if Recovery fails multiple times"
http://forge.mysql.com/worklog/task.php?id=4374
new option --maria-force-start-after-recovery-failures=N; number of consecutive recovery failures (failures
of log reading or recovery processing, anything in [translog_init(),maria_recovery_from_log()])
is stored in the control file; if at a Maria start they are more than N, logs are removed. This is for automated
systems which have to run whatever happens. As tables risk staying corrupted, --maria-recover should also
be used on them: this revision makes maria-recover work (it was disabled).
Fixed bug in translog_is_log_files(). translog_init() now prints message to error log if failed.
Removed \0 in the output of SHOW ENGINE MARIA LOGS; removed hard-coded engine name there.

KNOWN_BUGS.txt:
  As option --maria-force-start-after-recovery-failures is added, it corresponds to the wish "we should fix that if this happens etc".
  LOAD INDEX is not ignored since a few weeks. Listed concurrency bugs have been fixed some time ago.
  Recovery of fulltext and GIS indexes works since a few weeks.
mysql-test/include/maria_make_snapshot.inc:
  configurable prefix in table's name (so far 't' or 't_corrupted')
mysql-test/include/maria_make_snapshot_for_comparison.inc:
  configurable prefix in table's name (so far 't' or 't_corrupted')
mysql-test/include/maria_make_snapshot_for_feeding_recovery.inc:
  configurable prefix in table's name (so far 't' or 't_corrupted')
mysql-test/include/maria_verify_recovery.inc:
  configurable prefix in table's name (so far 't' or 't_corrupted')
mysql-test/lib/mtr_report.pl:
  new test maria-recover.test generates expected corruption warnings in the error log. maria-recovery.test's corrupted table is renamed to t_corrupted1 instead of t1.
mysql-test/r/maria-preload.result:
  result update. maria_pagecache_read* values are similar to the previous version of this file, though a bit bigger
  because using the information_schema and the join leads to some internal maria temp table being used, and thus some
  blocks of it being read.
mysql-test/r/maria-purge.result:
  engine's name in SHOW ENGINE MARIA LOGS changed.
mysql-test/r/maria-recover.result:
  result for new test. We see corruption messages at first SELECT and then none at second SELECT, expected.
mysql-test/r/maria-recovery.result:
  result update
mysql-test/r/maria.result:
  new variables show up
mysql-test/t/disabled.def:
  BUG#34911 is not fixed but the test had been made independent of the bug (workaround). A new bug (crash) has popped recently, so it has to stay
  disabled (BUG#35107).
mysql-test/t/maria-preload.test:
  Work around BUG#34911 "FLUSH STATUS doesn't flush what it should":
  compute differences in status variables before and after relevant queries
mysql-test/t/maria-recover-master.opt:
  test --maria-recover
mysql-test/t/maria-recover.test:
  Test of the --maria-recover option (build a corrupted table and see if it is auto-repaired)
mysql-test/t/maria-recovery-big.test:
  update for new API of include/maria*.inc
mysql-test/t/maria-recovery-bitmap.test:
  update for new API of include/maria*.inc
mysql-test/t/maria-recovery.test:
  update for new API of include/maria*.inc. Corrupted table t1 renamed to t_corrupted1, so that mtr_report.pl
  does not blindly remove all corruption messages for t1 which is
  a common name.
storage/maria/ha_maria.cc:
  Enabling maria-recover.
  Adding option and global variable --maria_force_start_after_recovery_failures: ha_maria_init()
  calls mark_recovery_start() and mark_recovery_success() to keep track of failed consecutive recoveries
  and remove logs if needed.
  Removed \0 in the output of SHOW ENGINE MARIA LOGS; removed hard-coded engine name there.
storage/maria/ma_checkpoint.c:
  new prototype
storage/maria/ma_control_file.c:
  Storing in one byte in the control file, the number of consecutive recovery failures.
storage/maria/ma_control_file.h:
  new prototype
storage/maria/ma_init.c:
  new prototype
storage/maria/ma_locking.c:
  Need to update open_count on disk at first write and close for transactional tables, like we already did for
  non-transactional tables, otherwise we cannot notice that the table is dubious.
storage/maria/ma_loghandler.c:
  translog_is_log_files() is made more generic to serve either to search or to delete logs (the latter is
  for --maria-force-start-after-recovery-failures). It also had a bug (always returned FALSE).
storage/maria/ma_loghandler.h:
  export function because ha_maria::mark_recovery_start() needs it
storage/maria/ma_recovery.c:
  changing name of maria_recover() to distinguish from the maria-recover option.
storage/maria/ma_recovery.h:
  changing name of maria_recover() to distinguish from the maria-recover option.
storage/maria/ma_test_force_start.pl:
  Test of --maria-force-start-after-recovery-failures (and also, to be realistic, of --maria-recover).
  This is standalone because mysql-test-run does not support testing that multiple mysqld restarts expectedly failed.
  I'll have to run it on my machine and also on a Windows machine.
storage/maria/unittest/ma_control_file-t.c:
  adding recovery_failures to the test
storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
  fix for compiler warning (unused variable in non-debug build)
2008-06-02 22:53:25 +02:00
..
unittest WL#4374 "Maria - force start if Recovery fails multiple times" 2008-06-02 22:53:25 +02:00
CMakeLists.txt Fixed bugs related to huge records where group list do not 2008-04-22 13:04:18 +03:00
file_formats.txt Fixed compiler warnings 2008-02-22 17:22:56 +02:00
ft_maria.c Merged with mysql-5.1 main tree. 2007-07-02 20:45:15 +03:00
ha_maria.cc WL#4374 "Maria - force start if Recovery fails multiple times" 2008-06-02 22:53:25 +02:00
ha_maria.h WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" 2008-05-29 18:33:33 +03:00
lockman.c Merge bk-internal.mysql.com:/home/bk/mysql-maria 2008-02-21 02:51:51 +02:00
lockman.h solaris fixes 2007-12-18 23:22:55 +01:00
ma_bitmap.c Injecting more "const" declarations into code which does not change 2008-04-03 15:40:25 +02:00
ma_blockrec.c Fixed build errors/warnings caused by my last push 2008-06-02 10:27:41 +03:00
ma_blockrec.h Added versioning of row data 2008-04-10 05:26:36 +03:00
ma_cache.c Fixed compiler warnings 2008-01-13 00:30:38 +02:00
ma_changed.c GPL license update (same change as was done for all files in 5.1). 2007-03-02 11:20:23 +01:00
ma_check.c Merge bk-internal.mysql.com:/home/bk/mysql-maria 2008-05-29 21:39:25 +03:00
ma_check_standalone.h WL#3072 Maria recovery. 2007-10-03 18:10:32 +02:00
ma_checkpoint.c WL#4374 "Maria - force start if Recovery fails multiple times" 2008-06-02 22:53:25 +02:00
ma_checkpoint.h WL#3071 Maria checkpoint, WL#3072 Maria recovery 2007-11-16 17:09:51 +01:00
ma_checksum.c Injecting more "const" declarations into code which does not change 2008-04-03 15:40:25 +02:00
ma_close.c WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" 2008-05-29 18:33:33 +03:00
ma_commit.c WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" 2008-05-29 18:33:33 +03:00
ma_commit.h - WL#3239 "log CREATE TABLE in Maria" 2007-06-22 14:49:37 +02:00
ma_control_file.c WL#4374 "Maria - force start if Recovery fails multiple times" 2008-06-02 22:53:25 +02:00
ma_control_file.h WL#4374 "Maria - force start if Recovery fails multiple times" 2008-06-02 22:53:25 +02:00
ma_create.c WL#3072 - Maria Recovery 2008-04-24 17:22:51 +02:00
ma_dbug.c Injecting more "const" declarations into code which does not change 2008-04-03 15:40:25 +02:00
ma_delete.c Merge bk-internal.mysql.com:/home/bk/mysql-maria 2008-05-29 21:39:25 +03:00
ma_delete_all.c Fixed build errors/warnings caused by my last push 2008-06-02 10:27:41 +03:00
ma_delete_table.c Injecting more "const" declarations into code which does not change 2008-04-03 15:40:25 +02:00
ma_dynrec.c Merge bk-internal.mysql.com:/home/bk/mysql-maria 2008-05-29 21:39:25 +03:00
ma_extra.c WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" 2008-05-29 18:33:33 +03:00
ma_ft_boolean_search.c Merge of changes in MyISAM since December 16 -> April 1 2008-04-01 17:57:30 +03:00
ma_ft_eval.c Fixes after review of guilhem of block record patch 2007-04-19 13:18:56 +03:00
ma_ft_eval.h GPL license update (same change as was done for all files in 5.1). 2007-03-02 11:20:23 +01:00
ma_ft_nlq_search.c Mac compiler warnings fixed. 2008-02-07 22:46:32 +02:00
ma_ft_parser.c Injecting more "const" declarations into code which does not change 2008-04-03 15:40:25 +02:00
ma_ft_stem.c GPL license update (same change as was done for all files in 5.1). 2007-03-02 11:20:23 +01:00
ma_ft_test1.c Fixes after review of guilhem of block record patch 2007-04-19 13:18:56 +03:00
ma_ft_test1.h GPL license update (same change as was done for all files in 5.1). 2007-03-02 11:20:23 +01:00
ma_ft_update.c compiler warning 2008-04-24 18:43:32 +02:00
ma_ftdefs.h Merged with mysql-5.1 main tree. 2007-07-02 20:45:15 +03:00
ma_fulltext.h Merged with mysql-5.1 main tree. 2007-07-02 20:45:15 +03:00
ma_info.c WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" 2008-05-29 18:33:33 +03:00
ma_init.c WL#4374 "Maria - force start if Recovery fails multiple times" 2008-06-02 22:53:25 +02:00
ma_key.c Injecting more "const" declarations into code which does not change 2008-04-03 15:40:25 +02:00
ma_key_recover.c Merge bk-internal.mysql.com:/home/bk/mysql-maria 2008-05-29 21:39:25 +03:00
ma_key_recover.h WL#3072 - Maria Recovery 2008-04-24 17:22:51 +02:00
ma_keycache.c After merge fixes. Applied changes made in myisam manually to maria. 2007-10-04 20:33:42 +03:00
ma_locking.c WL#4374 "Maria - force start if Recovery fails multiple times" 2008-06-02 22:53:25 +02:00
ma_loghandler.c WL#4374 "Maria - force start if Recovery fails multiple times" 2008-06-02 22:53:25 +02:00
ma_loghandler.h WL#4374 "Maria - force start if Recovery fails multiple times" 2008-06-02 22:53:25 +02:00
ma_loghandler_lsn.h Injecting more "const" declarations into code which does not change 2008-04-03 15:40:25 +02:00
ma_open.c Merge bk-internal.mysql.com:/home/bk/mysql-maria 2008-05-29 21:39:25 +03:00
ma_packrec.c Merge of changes in MyISAM since December 16 -> April 1 2008-04-01 17:57:30 +03:00
ma_page.c Merge bk-internal.mysql.com:/home/bk/mysql-maria 2008-05-29 21:39:25 +03:00
ma_pagecache.c WL#3072 - Maria Recovery 2008-04-24 17:22:51 +02:00
ma_pagecache.h copyright and license info 2008-03-04 12:58:21 +01:00
ma_pagecaches.c copyright and license info 2008-03-04 12:58:21 +01:00
ma_pagecrc.c copyright and license info 2008-03-04 12:58:21 +01:00
ma_panic.c merge 2007-12-31 12:52:45 +01:00
ma_preload.c Fix for BUG#34089 "Maria crash on LOAD INDEX after FLUSH TABLES". 2008-03-04 12:47:02 +01:00
ma_range.c Merge bk-internal.mysql.com:/home/bk/mysql-maria 2008-05-29 21:39:25 +03:00
ma_recovery.c WL#4374 "Maria - force start if Recovery fails multiple times" 2008-06-02 22:53:25 +02:00
ma_recovery.h WL#4374 "Maria - force start if Recovery fails multiple times" 2008-06-02 22:53:25 +02:00
ma_recovery_util.c Fix for BUG#34114 "maria_chk reports false error when several tables on 2008-01-29 22:20:59 +01:00
ma_recovery_util.h WL#3072 - Maria Recovery 2008-01-17 23:59:32 +01:00
ma_rename.c Injecting more "const" declarations into code which does not change 2008-04-03 15:40:25 +02:00
ma_rfirst.c Merged with mysql-5.1 main tree. 2007-07-02 20:45:15 +03:00
ma_rkey.c WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" 2008-05-29 18:33:33 +03:00
ma_rlast.c Merged with mysql-5.1 main tree. 2007-07-02 20:45:15 +03:00
ma_rnext.c WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" 2008-05-29 18:33:33 +03:00
ma_rnext_same.c WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" 2008-05-29 18:33:33 +03:00
ma_rprev.c WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" 2008-05-29 18:33:33 +03:00
ma_rrnd.c Fixes for bugs found by maria.test and event*tests: 2007-08-21 20:54:11 +03:00
ma_rsame.c WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" 2008-05-29 18:33:33 +03:00
ma_rsamepos.c Merged with mysql-5.1 main tree. 2007-07-02 20:45:15 +03:00
ma_rt_index.c WL#3072 - Maria Recovery 2008-04-24 17:22:51 +02:00
ma_rt_index.h WL#3072 - Maria Recovery 2008-04-24 17:22:51 +02:00
ma_rt_key.c After merge fixes 2008-05-29 23:56:27 +03:00
ma_rt_key.h WL#3072 - Maria Recovery 2008-04-24 17:22:51 +02:00
ma_rt_mbr.c WL#3072 - Maria Recovery 2008-04-24 17:22:51 +02:00
ma_rt_mbr.h Injecting more "const" declarations into code which does not change 2008-04-03 15:40:25 +02:00
ma_rt_split.c compiler warning on non-debug build 2008-04-24 23:24:21 +02:00
ma_rt_test.c After merge fixes 2008-05-29 23:56:27 +03:00
ma_scan.c Fixed problems with ma_test2 and mi_test2 on high-byte-first system 2008-02-21 02:45:02 +02:00
ma_search.c Injecting more "const" declarations into code which does not change 2008-04-03 15:40:25 +02:00
ma_sort.c WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" 2008-05-29 18:33:33 +03:00
ma_sp_defs.h Merged with mysql-5.1 main tree. 2007-07-02 20:45:15 +03:00
ma_sp_key.c Injecting more "const" declarations into code which does not change 2008-04-03 15:40:25 +02:00
ma_sp_test.c After merge fixes. Applied changes made in myisam manually to maria. 2007-10-04 20:33:42 +03:00
ma_state.c Fixed build errors/warnings caused by my last push 2008-06-02 10:27:41 +03:00
ma_state.h WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" 2008-05-29 18:33:33 +03:00
ma_static.c WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" 2008-05-29 18:33:33 +03:00
ma_statrec.c Merge of changes in MyISAM since December 16 -> April 1 2008-04-01 17:57:30 +03:00
ma_test1.c Merge bk-internal.mysql.com:/home/bk/mysql-maria 2008-05-29 21:39:25 +03:00
ma_test2.c Added versioning of row data 2008-04-10 05:26:36 +03:00
ma_test3.c Windows fixes 2008-01-10 13:21:53 +01:00
ma_test_all.res Fixes for redo/undo logging of key pages 2007-11-20 17:42:16 +02:00
ma_test_all.sh New version of ma_test_all 2008-01-08 22:21:28 +02:00
ma_test_big.sh UNDO of rows now puts back all part of the row on their original pages and positions 2007-12-30 22:40:03 +02:00
ma_test_force_start.pl WL#4374 "Maria - force start if Recovery fails multiple times" 2008-06-02 22:53:25 +02:00
ma_test_recovery Added versioning of row data 2008-04-10 05:26:36 +03:00
ma_unique.c Injecting more "const" declarations into code which does not change 2008-04-03 15:40:25 +02:00
ma_update.c WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" 2008-05-29 18:33:33 +03:00
ma_write.c Merge bk-internal.mysql.com:/home/bk/mysql-maria 2008-05-29 21:39:25 +03:00
Makefile.am Merge bk-internal.mysql.com:/home/bk/mysql-maria 2008-05-29 21:39:25 +03:00
maria_chk.c Added versioning of row data 2008-04-10 05:26:36 +03:00
maria_def.h WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" 2008-05-29 18:33:33 +03:00
maria_ftdump.c Added error HA_ERR_FILE_TOO_SHORT to be used when files are shorter than expected (by my_read/my_pread) 2007-12-04 23:23:42 +02:00
maria_pack.c WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" 2008-05-29 18:33:33 +03:00
maria_read_log.c Merge bk-internal.mysql.com:/home/bk/mysql-maria 2008-05-29 21:39:25 +03:00
maria_rename.sh Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
plug.in Minor changes. New description in SHOW ENGINES for Maria. 2008-01-31 23:17:50 +01:00
tablockman.c Windows fixes 2008-01-10 13:21:53 +01:00
tablockman.h solaris fixes 2007-12-18 23:22:55 +01:00
test_pack Added storage/maria (based on MyISAM). WL#3245 2006-04-11 16:45:10 +03:00
trnman.c WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" 2008-05-29 18:33:33 +03:00
trnman.h WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" 2008-05-29 18:33:33 +03:00
trnman_public.h WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" 2008-05-29 18:33:33 +03:00