diff options
author | unknown <heikki@hundin.mysql.fi> | 2005-01-21 18:16:02 +0200 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2005-01-21 18:16:02 +0200 |
commit | 3cbafff2e039f2916212dd8c2cd63fba410d2e23 (patch) | |
tree | 7125ee2765ee0fbd669fdf7519cf31947c9b3cae /innobase/dict | |
parent | 90f94790986ba8c3938b575d8e5592a7a06471db (diff) | |
parent | 6eecb8e4e206db57b3d01c07f0482e86af6b4e12 (diff) | |
download | mariadb-git-3cbafff2e039f2916212dd8c2cd63fba410d2e23.tar.gz |
Merge hundin.mysql.fi:/home/heikki/mysql-4.1
into hundin.mysql.fi:/home/heikki/mysql-5.0
innobase/dict/dict0crea.c:
Auto merged
innobase/dict/dict0dict.c:
Auto merged
innobase/dict/dict0load.c:
Auto merged
innobase/fil/fil0fil.c:
Auto merged
Diffstat (limited to 'innobase/dict')
-rw-r--r-- | innobase/dict/dict0crea.c | 11 | ||||
-rw-r--r-- | innobase/dict/dict0dict.c | 8 | ||||
-rw-r--r-- | innobase/dict/dict0load.c | 17 |
3 files changed, 34 insertions, 2 deletions
diff --git a/innobase/dict/dict0crea.c b/innobase/dict/dict0crea.c index 3c496bae5b4..b6f79ad10b4 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/dict0dict.c b/innobase/dict/dict0dict.c index 12749f7704f..800d7dcd9e9 100644 --- a/innobase/dict/dict0dict.c +++ b/innobase/dict/dict0dict.c @@ -2920,9 +2920,9 @@ loop: constraint_name = NULL; if (ptr1 < ptr2) { - /* The user has specified a constraint name. Pick it so + /* The user may have specified a constraint name. Pick it so that we can store 'databasename/constraintname' as the id of - the id of the constraint to system tables. */ + of the constraint to system tables. */ ptr = ptr1; ptr = dict_accept(ptr, "CONSTRAINT", &success); @@ -2959,6 +2959,10 @@ loop: ptr = dict_accept(ptr, "FOREIGN", &success); + if (!success) { + goto loop; + } + if (!isspace(*ptr)) { goto loop; } diff --git a/innobase/dict/dict0load.c b/innobase/dict/dict0load.c index 18910acb01d..63f25cdddfe 100644 --- a/innobase/dict/dict0load.c +++ b/innobase/dict/dict0load.c @@ -728,6 +728,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_len 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 < 50003 /* Starting from MySQL 5.0.3, the high-order bit of MIX_LEN is the "compact format" flag. */ |