diff options
author | unknown <marko@hundin.mysql.fi> | 2005-03-10 16:42:43 +0200 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2005-03-10 16:42:43 +0200 |
commit | db32cb17100f707c53cfe50a411e1dcd9813a9a1 (patch) | |
tree | a785e6e36d1aa7b73ed0782a4c9afcfb95850e0b /innobase/dict/dict0crea.c | |
parent | 380c64b1fcf3cdbd0e2c31232d6fe927289dff25 (diff) | |
download | mariadb-git-db32cb17100f707c53cfe50a411e1dcd9813a9a1.tar.gz |
InnoDB: Keep the "compact format" flag in SYS_TABLES.N_COLS
instead of SYS_TABLES.MIX_LEN, because the latter was not
initialized to zero in old MySQL 3.23 releases. This will break
existing MySQL/InnoDB 5.0.3-bk databases for which
SHOW TABLE STATUS displays Row_format=Compact.
innobase/dict/dict0crea.c:
Write the "compact format" flag to N_COLS instead of MIX_LEN.
Remove corruption analysis for MIX_LEN, as it has been tracked down
to MySQL 3.23.4x not initializing MIX_LEN.
innobase/dict/dict0load.c:
Read the "compact format" flag from N_COLS instead of MIX_LEN.
Diffstat (limited to 'innobase/dict/dict0crea.c')
-rw-r--r-- | innobase/dict/dict0crea.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/innobase/dict/dict0crea.c b/innobase/dict/dict0crea.c index fda09feca6f..1f12386e413 100644 --- a/innobase/dict/dict0crea.c +++ b/innobase/dict/dict0crea.c @@ -63,8 +63,8 @@ dict_create_sys_tables_tuple( dfield = dtuple_get_nth_field(entry, 2); ptr = mem_heap_alloc(heap, 4); - mach_write_to_4(ptr, table->n_def); - + mach_write_to_4(ptr, table->n_def + | ((ulint) table->comp << 31)); dfield_set_data(dfield, ptr, 4); /* 5: TYPE -----------------------------*/ dfield = dtuple_get_nth_field(entry, 3); @@ -82,21 +82,10 @@ 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); - mach_write_to_4(ptr, (table->mix_len & 0x7fffffff) | - ((ulint) table->comp << 31)); + mach_write_to_4(ptr, table->mix_len); dfield_set_data(dfield, ptr, 4); /* 8: CLUSTER_NAME ---------------------*/ |