Below is the list of changes that have just been committed into a local
5.0 repository of marko. When marko does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1795 05/03/10 16:42:43 marko@stripped +2 -0
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/dict0load.c
1.35 05/03/10 16:42:35 marko@stripped +7 -7
Read the "compact format" flag from N_COLS instead of MIX_LEN.
innobase/dict/dict0crea.c
1.32 05/03/10 16:42:35 marko@stripped +3 -14
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.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: marko
# Host: hundin.mysql.fi
# Root: /home/marko/mysql-5.0
--- 1.31/innobase/dict/dict0crea.c Tue Mar 1 19:42:51 2005
+++ 1.32/innobase/dict/dict0crea.c Thu Mar 10 16:42:35 2005
@@ -63,8 +63,8 @@
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 @@
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 ---------------------*/
--- 1.34/innobase/dict/dict0load.c Wed Mar 9 15:08:50 2005
+++ 1.35/innobase/dict/dict0load.c Thu Mar 10 16:42:35 2005
@@ -818,8 +818,10 @@
field = rec_get_nth_field_old(rec, 4, &len);
n_cols = mach_read_from_4(field);
- /* table->comp will be initialized later, in this function */
- table = dict_mem_table_create(name, space, n_cols, FALSE);
+ /* The high-order bit of N_COLS is the "compact format" flag. */
+ table = dict_mem_table_create(name, space,
+ n_cols & ~0x80000000UL,
+ !!(n_cols & 0x80000000UL));
table->ibd_file_missing = ibd_file_missing;
@@ -844,14 +846,12 @@
#endif
}
- /* The high-order bit of MIX_LEN is the "compact format" flag */
- field = rec_get_nth_field_old(rec, 7, &len);
- table->comp = !!(mach_read_from_1(field) & 0x80);
-
if ((table->type == DICT_TABLE_CLUSTER)
|| (table->type == DICT_TABLE_CLUSTER_MEMBER)) {
- table->mix_len = mach_read_from_4(field) & 0x7fffffff;
+ field = rec_get_nth_field_old(rec, 7, &len);
+ ut_a(len == 4);
+ table->mix_len = mach_read_from_4(field);
}
btr_pcur_close(&pcur);
| Thread |
|---|
| • bk commit into 5.0 tree (marko:1.1795) | Marko Mäkelä | 10 Mar |