From 4b2b0559ee1f9c25101cf34da317dfcfce55e00d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 22 Apr 2010 12:33:42 +0300 Subject: [PATCH] Correct the definition of DICT_SYS_INDEXES_NAME_FIELD. When row_merge_drop_temp_indexes() was reworked to drop the indexes via the data dictionary cache, the code was broken because it would read the index name from the wrong field. --- storage/innodb_plugin/ChangeLog | 6 ++++++ storage/innodb_plugin/dict/dict0boot.c | 4 ++-- storage/innodb_plugin/include/dict0boot.h | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/storage/innodb_plugin/ChangeLog b/storage/innodb_plugin/ChangeLog index 0fa5dae756d..ccd22b09f1a 100644 --- a/storage/innodb_plugin/ChangeLog +++ b/storage/innodb_plugin/ChangeLog @@ -1,3 +1,9 @@ +2010-04-22 The InnoDB Team + + * include/dict0boot.h, dict/dict0boot.c: + Fix a bug that prevented the crash recovery of fast CREATE INDEX + from dropping partially created indexes. + 2010-04-21 The InnoDB Team * btr/btr0btr.c: diff --git a/storage/innodb_plugin/dict/dict0boot.c b/storage/innodb_plugin/dict/dict0boot.c index 70b5bfa99f7..45d57b8c619 100644 --- a/storage/innodb_plugin/dict/dict0boot.c +++ b/storage/innodb_plugin/dict/dict0boot.c @@ -368,8 +368,8 @@ dict_boot(void) #if DICT_SYS_INDEXES_TYPE_FIELD != 4 + 2 #error "DICT_SYS_INDEXES_TYPE_FIELD != 4 + 2" #endif -#if DICT_SYS_INDEXES_NAME_FIELD != 1 + 2 -#error "DICT_SYS_INDEXES_NAME_FIELD != 1 + 2" +#if DICT_SYS_INDEXES_NAME_FIELD != 2 + 2 +#error "DICT_SYS_INDEXES_NAME_FIELD != 2 + 2" #endif table->id = DICT_INDEXES_ID; diff --git a/storage/innodb_plugin/include/dict0boot.h b/storage/innodb_plugin/include/dict0boot.h index e01fafe652d..1a13bd1503a 100644 --- a/storage/innodb_plugin/include/dict0boot.h +++ b/storage/innodb_plugin/include/dict0boot.h @@ -137,7 +137,7 @@ clustered index */ #define DICT_SYS_INDEXES_PAGE_NO_FIELD 8 #define DICT_SYS_INDEXES_SPACE_NO_FIELD 7 #define DICT_SYS_INDEXES_TYPE_FIELD 6 -#define DICT_SYS_INDEXES_NAME_FIELD 3 +#define DICT_SYS_INDEXES_NAME_FIELD 4 /* When a row id which is zero modulo this number (which must be a power of two) is assigned, the field DICT_HDR_ROW_ID on the dictionary header page is