summaryrefslogtreecommitdiff
path: root/include/myisamchk.h
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2013-05-13 00:43:46 +0300
committerMichael Widenius <monty@askmonty.org>2013-05-13 00:43:46 +0300
commit668306640edd3d3c6f55290000a7398ec7dd888d (patch)
treea4c3419914782aba7d3cd51fc9258f496e07b0ec /include/myisamchk.h
parent3bd6e4b8ee7d32c0e2ecfd962e6debf07d9f3956 (diff)
downloadmariadb-git-668306640edd3d3c6f55290000a7398ec7dd888d.tar.gz
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
Diffstat (limited to 'include/myisamchk.h')
-rw-r--r--include/myisamchk.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/myisamchk.h b/include/myisamchk.h
index 0ee03c03c49..19c2bf47ddb 100644
--- a/include/myisamchk.h
+++ b/include/myisamchk.h
@@ -31,27 +31,27 @@
#define T_AUTO_REPAIR 2 /* QQ to be removed */
#define T_BACKUP_DATA 4
#define T_CALC_CHECKSUM 8
-#define T_CHECK 16 /* QQ to be removed */
-#define T_CHECK_ONLY_CHANGED 32 /* QQ to be removed */
+#define T_CHECK 16
+#define T_CHECK_ONLY_CHANGED 32
#define T_CREATE_MISSING_KEYS 64
#define T_DESCRIPT 128
#define T_DONT_CHECK_CHECKSUM 256
#define T_EXTEND 512
-#define T_FAST (1L << 10) /* QQ to be removed */
-#define T_FORCE_CREATE (1L << 11) /* QQ to be removed */
+#define T_FAST (1L << 10)
+#define T_FORCE_CREATE (1L << 11)
#define T_FORCE_UNIQUENESS (1L << 12)
#define T_INFO (1L << 13)
#define T_MEDIUM (1L << 14)
-#define T_QUICK (1L << 15) /* QQ to be removed */
-#define T_READONLY (1L << 16) /* QQ to be removed */
+#define T_QUICK (1L << 15)
+#define T_READONLY (1L << 16)
#define T_REP (1L << 17)
-#define T_REP_BY_SORT (1L << 18) /* QQ to be removed */
-#define T_REP_PARALLEL (1L << 19) /* QQ to be removed */
+#define T_REP_BY_SORT (1L << 18)
+#define T_REP_PARALLEL (1L << 19)
#define T_RETRY_WITHOUT_QUICK (1L << 20)
#define T_SAFE_REPAIR (1L << 21)
#define T_SILENT (1L << 22)
-#define T_SORT_INDEX (1L << 23) /* QQ to be removed */
-#define T_SORT_RECORDS (1L << 24) /* QQ to be removed */
+#define T_SORT_INDEX (1L << 23)
+#define T_SORT_RECORDS (1L << 24)
#define T_STATISTICS (1L << 25)
#define T_UNPACK (1L << 26)
#define T_UPDATE_STATE (1L << 27)