summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authormarko@hundin.mysql.fi <>2004-12-13 12:31:17 +0200
committermarko@hundin.mysql.fi <>2004-12-13 12:31:17 +0200
commitcd8743409f3f6a03430f5db16e65a2e98a3a9d4b (patch)
tree614d57561f387450a3963f8a61efce92c75c6cf0 /innobase
parent0de1d4a9a9931cd37c3c3cd101208d8897832c67 (diff)
downloadmariadb-git-cd8743409f3f6a03430f5db16e65a2e98a3a9d4b.tar.gz
dict0load.c:
dict_load_table(): detect the new table format of MySQL 5.0.3
Diffstat (limited to 'innobase')
-rw-r--r--innobase/dict/dict0load.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/innobase/dict/dict0load.c b/innobase/dict/dict0load.c
index a4637e09d07..0bbf0511b57 100644
--- a/innobase/dict/dict0load.c
+++ b/innobase/dict/dict0load.c
@@ -647,6 +647,22 @@ dict_load_table(
return(NULL);
}
+#if MYSQL_VERSION_ID < 50300
+ /* Starting from MySQL 5.0.3, the high-order bit of MIX_LEN is the
+ "compact format" flag. */
+ field = rec_get_nth_field(rec, 7, &len);
+ if (mach_read_from_1(field) & 0x80) {
+ btr_pcur_close(&pcur);
+ mtr_commit(&mtr);
+ mem_heap_free(heap);
+ ut_print_timestamp(stderr);
+ fprintf(stderr,
+ " InnoDB: table %s is in the new compact format\n"
+ "InnoDB: of MySQL 5.0.3 or later\n", name);
+ return(NULL);
+ }
+#endif /* MYSQL_VERSION_ID < 50300 */
+
ut_a(0 == ut_strcmp((char *) "SPACE",
dict_field_get_col(
dict_index_get_nth_field(