diff options
author | unknown <heikki@hundin.mysql.fi> | 2005-01-15 01:06:15 +0200 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2005-01-15 01:06:15 +0200 |
commit | ae8cc9846f506ca28b91eb95144a0cd011d20346 (patch) | |
tree | 94c378579cc6f46d7565139bde780701b1a64e62 /innobase/dict | |
parent | 6f70a1d90931f34adb3bdc8b15e20b768af4f357 (diff) | |
download | mariadb-git-ae8cc9846f506ca28b91eb95144a0cd011d20346.tar.gz |
dict0load.c, dict0crea.c:
Add diagnostic code to track corruption in mix_len; it was reported on the mailing list Jan 14, 2005
innobase/dict/dict0crea.c:
Add diagnostic code to track corruption in mix_len; it was reported on the mailing list Jan 14, 2005
innobase/dict/dict0load.c:
Add diagnostic code to track corruption in mix_len; it was reported on the mailing list Jan 14, 2005
Diffstat (limited to 'innobase/dict')
-rw-r--r-- | innobase/dict/dict0crea.c | 11 | ||||
-rw-r--r-- | innobase/dict/dict0load.c | 17 |
2 files changed, 28 insertions, 0 deletions
diff --git a/innobase/dict/dict0crea.c b/innobase/dict/dict0crea.c index cbdc0aab53c..d9e89316613 100644 --- a/innobase/dict/dict0crea.c +++ b/innobase/dict/dict0crea.c @@ -81,6 +81,17 @@ dict_create_sys_tables_tuple( dfield_set_data(dfield, ptr, 8); /* 7: MIX_LEN --------------------------*/ + + /* Track corruption reported on mailing list Jan 14, 2005 */ + if (table->mix_len != 0 && table->mix_len != 0x80000000) { + fprintf(stderr, +"InnoDB: Error: mix_len is %lu in table %s\n", (ulong)table->mix_len, + table->name); + mem_analyze_corruption((byte*)&(table->mix_len)); + + ut_error; + } + dfield = dtuple_get_nth_field(entry, 5); ptr = mem_heap_alloc(heap, 4); diff --git a/innobase/dict/dict0load.c b/innobase/dict/dict0load.c index 61facc8818d..e52c81c82e8 100644 --- a/innobase/dict/dict0load.c +++ b/innobase/dict/dict0load.c @@ -729,6 +729,7 @@ dict_load_table( ulint space; ulint n_cols; ulint err; + ulint mix_len; mtr_t mtr; #ifdef UNIV_SYNC_DEBUG @@ -775,6 +776,22 @@ dict_load_table( return(NULL); } + /* Track a corruption bug reported on the MySQL mailing list Jan 14, + 2005: mix_id had a value different from 0 */ + + field = rec_get_nth_field(rec, 7, &len); + ut_a(len == 4); + + mix_len = mach_read_from_4(field); + + if (mix_len != 0 && mix_len != 0x80000000) { + ut_print_timestamp(stderr); + + fprintf(stderr, + " InnoDB: table %s has a nonsensical mix len %lu\n", + name, (ulong)mix_len); + } + #if MYSQL_VERSION_ID < 50300 /* Starting from MySQL 5.0.3, the high-order bit of MIX_LEN is the "compact format" flag. */ |