1
0
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:
Sergei Golubchik
2024-10-17 15:57:03 +02:00
parent 600c42ea86
commit 3da565c41d
9 changed files with 184 additions and 77 deletions

View File

@ -190,9 +190,9 @@ bool add_keyword_to_query(THD *thd, String *result, const LEX_CSTRING *keyword,
*/
#define C_CREATE_SELECT(X) ((X) > 0 ? (X) : 0)
#define C_ORDINARY_CREATE 0
#define C_ALTER_TABLE -1
#define C_ALTER_TABLE_FRM_ONLY -2
#define C_ASSISTED_DISCOVERY -3
#define C_ASSISTED_DISCOVERY -1
#define C_ALTER_TABLE -2
#define C_ALTER_TABLE_FRM_ONLY -3
int mysql_create_table_no_lock(THD *thd, Table_specification_st *create_info,
Alter_info *alter_info, bool *is_trans,