Commit cce9b168 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: pass TABLE_SHARE to store_key_options()

parent d26ad24c
...@@ -150,7 +150,7 @@ static const LEX_CSTRING ha_choice_values[]= ...@@ -150,7 +150,7 @@ static const LEX_CSTRING ha_choice_values[]=
{ STRING_WITH_LEN("1") } { STRING_WITH_LEN("1") }
}; };
static void store_key_options(THD *, String *, TABLE *, KEY *); static void store_key_options(THD *, String *, TABLE_SHARE *, KEY *);
static int show_create_view(THD *thd, TABLE_LIST *table, String *buff); static int show_create_view(THD *thd, TABLE_LIST *table, String *buff);
static int show_create_sequence(THD *thd, TABLE_LIST *table_list, static int show_create_sequence(THD *thd, TABLE_LIST *table_list,
...@@ -2433,7 +2433,7 @@ int show_create_table_ex(THD *thd, TABLE_LIST *table_list, ...@@ -2433,7 +2433,7 @@ int show_create_table_ex(THD *thd, TABLE_LIST *table_list,
} }
packet->append(')'); packet->append(')');
store_key_options(thd, packet, table, &table->key_info[i]); store_key_options(thd, packet, share, &share->key_info[i]);
if (key_info->parser) if (key_info->parser)
{ {
LEX_CSTRING *parser_name= plugin_name(key_info->parser); LEX_CSTRING *parser_name= plugin_name(key_info->parser);
...@@ -2540,7 +2540,7 @@ int show_create_table_ex(THD *thd, TABLE_LIST *table_list, ...@@ -2540,7 +2540,7 @@ int show_create_table_ex(THD *thd, TABLE_LIST *table_list,
} }
static void store_key_options(THD *thd, String *packet, TABLE *table, static void store_key_options(THD *thd, String *packet, TABLE_SHARE *share,
KEY *key_info) KEY *key_info)
{ {
bool limited_mysql_mode= (thd->variables.sql_mode & bool limited_mysql_mode= (thd->variables.sql_mode &
...@@ -2570,7 +2570,7 @@ static void store_key_options(THD *thd, String *packet, TABLE *table, ...@@ -2570,7 +2570,7 @@ static void store_key_options(THD *thd, String *packet, TABLE *table,
packet->append(STRING_WITH_LEN(" USING RTREE")); packet->append(STRING_WITH_LEN(" USING RTREE"));
if ((key_info->flags & HA_USES_BLOCK_SIZE) && if ((key_info->flags & HA_USES_BLOCK_SIZE) &&
table->s->key_block_size != key_info->block_size) share->key_block_size != key_info->block_size)
{ {
packet->append(STRING_WITH_LEN(" KEY_BLOCK_SIZE=")); packet->append(STRING_WITH_LEN(" KEY_BLOCK_SIZE="));
packet->append_ulonglong(key_info->block_size); packet->append_ulonglong(key_info->block_size);
......
...@@ -1227,6 +1227,7 @@ int ha_maria::open(const char *name, int mode, uint test_if_locked) ...@@ -1227,6 +1227,7 @@ int ha_maria::open(const char *name, int mode, uint test_if_locked)
file->s->keyinfo[i].parser= file->s->keyinfo[i].parser=
(struct st_mysql_ftparser *)plugin_decl(parser)->info; (struct st_mysql_ftparser *)plugin_decl(parser)->info;
table->key_info[i].block_size= file->s->keyinfo[i].block_length; table->key_info[i].block_size= file->s->keyinfo[i].block_length;
table->s->key_info[i].block_size= table->key_info[i].block_size;
} }
my_errno= 0; my_errno= 0;
......
...@@ -946,6 +946,7 @@ int ha_myisam::open(const char *name, int mode, uint test_if_locked) ...@@ -946,6 +946,7 @@ int ha_myisam::open(const char *name, int mode, uint test_if_locked)
file->s->keyinfo[i].parser= file->s->keyinfo[i].parser=
(struct st_mysql_ftparser *)plugin_decl(parser)->info; (struct st_mysql_ftparser *)plugin_decl(parser)->info;
table->key_info[i].block_size= file->s->keyinfo[i].block_length; table->key_info[i].block_size= file->s->keyinfo[i].block_length;
table->s->key_info[i].block_size= table->key_info[i].block_size;
} }
my_errno= 0; my_errno= 0;
......
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