mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-35144 CREATE TABLE ... LIKE uses current innodb_compression_default instead of the create value
When adding a column or index that uses plugin-defined sysvar-based options with CREATE ... LIKE the server was using the current value of the sysvar, not the default one. Because parse_option_list() function was used both in create and open and it tried to guess when it's create (need to use current sysvar value and add a new name=value pair to the list) or open (need to use default, without extending the list). Let's move the list extending functionality into a separate function and call it explicitly when needed. Operations that add new objects (CREATE, ALTER ... ADD) will extend the list, other operations (ALTER, CREATE ... LIKE, open) will not.
This commit is contained in:
@ -83,10 +83,14 @@ class Create_field;
|
||||
bool resolve_sysvar_table_options(handlerton *hton);
|
||||
void free_sysvar_table_options(handlerton *hton);
|
||||
bool parse_engine_table_options(THD *thd, handlerton *ht, TABLE_SHARE *share);
|
||||
bool parse_option_list(THD* thd, handlerton *hton, void *option_struct,
|
||||
bool parse_option_list(THD* thd, void *option_struct,
|
||||
engine_option_value **option_list,
|
||||
ha_create_table_option *rules,
|
||||
bool suppress_warning, MEM_ROOT *root);
|
||||
bool extend_option_list(THD* thd, handlerton *hton, bool create,
|
||||
engine_option_value **option_list,
|
||||
ha_create_table_option *rules, MEM_ROOT *root);
|
||||
|
||||
bool engine_table_options_frm_read(const uchar *buff, size_t length,
|
||||
TABLE_SHARE *share);
|
||||
engine_option_value *merge_engine_table_options(engine_option_value *source,
|
||||
|
Reference in New Issue
Block a user