Commit d003df89 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

#4505 use hot alter table in mysql 5.5 refs #4505

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@45255 c7de825b-a66e-492c-adef-691d508d4ae1
parent 033ed51a
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#endif #endif
#if 50500 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50599 #if 50500 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50599
#define TOKU_INCLUDE_ALTER_56 0 #define TOKU_INCLUDE_ALTER_56 1
#define TOKU_INCLUDE_ALTER_55 1 #define TOKU_INCLUDE_ALTER_55 1
#define TOKU_INCLUDE_ROW_TYPE_COMPRESSION 1 #define TOKU_INCLUDE_ROW_TYPE_COMPRESSION 1
#define TOKU_INCLUDE_XA 1 #define TOKU_INCLUDE_XA 1
......
...@@ -862,10 +862,10 @@ ha_tokudb::inplace_alter_table(TABLE *altered_table, Alter_inplace_info *ha_alte ...@@ -862,10 +862,10 @@ ha_tokudb::inplace_alter_table(TABLE *altered_table, Alter_inplace_info *ha_alte
int int
ha_tokudb::alter_table_add_index(TABLE *altered_table, Alter_inplace_info *ha_alter_info) { ha_tokudb::alter_table_add_index(TABLE *altered_table, Alter_inplace_info *ha_alter_info) {
// TODO what does this do? // sort keys in add index order
KEY *key_info = (KEY*) my_malloc(sizeof (KEY) * ha_alter_info->index_add_count, MYF(MY_WME)); KEY *key_info = (KEY*) my_malloc(sizeof (KEY) * ha_alter_info->index_add_count, MYF(MY_WME));
KEY *key = key_info;
for (uint i = 0; i < ha_alter_info->index_add_count; i++) { for (uint i = 0; i < ha_alter_info->index_add_count; i++) {
KEY *key = &key_info[i];
*key = ha_alter_info->key_info_buffer[ha_alter_info->index_add_buffer[i]]; *key = ha_alter_info->key_info_buffer[ha_alter_info->index_add_buffer[i]];
for (KEY_PART_INFO *key_part= key->key_part; key_part < key->key_part + key->key_parts; key_part++) for (KEY_PART_INFO *key_part= key->key_part; key_part < key->key_part + key->key_parts; key_part++)
key_part->field = table->field[key_part->fieldnr]; key_part->field = table->field[key_part->fieldnr];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment