mariadb/storage/maria/unittest
Michael Widenius 668306640e Fixed MDEV-4291: Assertion `trid >= info->s->state.create_trid' failure or data corruption (key points to record
outside datafile) on INSERT into an Aria table.

The isssue was that the check if a table was moved between systems didn't take into account that create_trid could be bigger than the current max trid on the new system.
This could only happen if one tried to move a table that one had just done a 'REPAIR TABLE' on.
Tables that one had run 'aria_chk --zerofill' on worked.

Fixed this by assuming that if create_trid is too big then the table has been moved from one system to another and we have to do an automatic zerofill.

Other fixed:

- Added a check to detect a wrong create_trid in 'check table'.
- aria_chk -dvv will now write out also the create_trid (to make future error finding easier)
- aria_chk --zerofill doesn't anymore require a aria_control_file
- Removed some warnings from safemalloc when using aria_chk, ma_test1 and ma_test2.


include/myisamchk.h:
  Removed wrong 'QQ' flags (the flags are used by myisamchk and aria_chk)
storage/maria/ha_maria.cc:
  maria_chk_status() can now also return an error.
storage/maria/ma_check.c:
  In maria_chk_status() check if create_trid value is too big.
storage/maria/ma_open.c:
  Changed check if table is moved so that we can detect wrong create_trid values.
  Don't set STATE_NOT_MOVABLE flag if we are doing repair/check. This was done so that aria_chk can print out the movable flag.
storage/maria/ma_test1.c:
  Added code to suppress memory leaks from safemalloc
storage/maria/ma_test2.c:
  Added code to suppress memory leaks from safemalloc
storage/maria/maria_chk.c:
  Added code to suppress memory leaks from safemalloc.
  Make help text a bit better for --HELP and --zerofill.
  Incresed version number.
  Don't require a control file if we are only doing --zerofill
  Print out 'create_trid' when doing --describe --verbose
storage/maria/unittest/ma_test_recovery.expected:
  Updated result file
2013-05-13 00:43:46 +03:00
..
CMakeLists.txt Fixed tests consumed big amount of disk space to be "BIG". 2012-01-27 10:58:59 +02:00
lockman-t.c
lockman1-t.c
lockman2-t.c
ma_control_file-t.c Fixed some simple warnings on Windows. 2012-04-13 19:44:22 +02:00
ma_loghandler_examples.c
ma_maria_log_cleanup.c Fix MariaDB wasnings on Windows (rmdir not defined unless direct.h is included) 2011-11-26 23:08:46 +01:00
ma_pagecache_consist.c fixes for windows 2011-10-21 23:07:13 +02:00
ma_pagecache_rwconsist.c fixes for windows 2011-10-21 23:07:13 +02:00
ma_pagecache_rwconsist2.c fixes for windows 2011-10-21 23:07:13 +02:00
ma_pagecache_single.c fixes for windows 2011-10-21 23:07:13 +02:00
ma_test_all-t
ma_test_loghandler-t.c merge with 5.3 2011-10-19 21:45:18 +02:00
ma_test_loghandler_first_lsn-t.c merge with 5.3 2011-10-19 21:45:18 +02:00
ma_test_loghandler_max_lsn-t.c merge with 5.3 2011-10-19 21:45:18 +02:00
ma_test_loghandler_multigroup-t.c Fixed tests consumed big amount of disk space to be "BIG". 2012-01-27 10:58:59 +02:00
ma_test_loghandler_multithread-t.c Fixed some simple warnings on Windows. 2012-04-13 19:44:22 +02:00
ma_test_loghandler_noflush-t.c merge with 5.3 2011-10-19 21:45:18 +02:00
ma_test_loghandler_nologs-t.c merge with 5.3 2011-10-19 21:45:18 +02:00
ma_test_loghandler_pagecache-t.c fixes for windows 2011-10-21 23:07:13 +02:00
ma_test_loghandler_purge-t.c merge with 5.3 2011-10-19 21:45:18 +02:00
ma_test_recovery.expected Fixed MDEV-4291: Assertion `trid >= info->s->state.create_trid' failure or data corruption (key points to record 2013-05-13 00:43:46 +03:00
ma_test_recovery.pl
sequence_storage.c
sequence_storage.h
test_file.c
test_file.h Fix MariaDB wasnings on Windows (rmdir not defined unless direct.h is included) 2011-11-26 23:08:46 +01:00
trnman-t.c merge with 5.3 2011-10-19 21:45:18 +02:00