mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
BUG#20397: Crash at ALTER TABLE t1 engine = x; for partitioned table
This commit is contained in:
parent
d2b04770ac
commit
975e14e40d
@@ -4992,7 +4992,19 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
||||
|
||||
old_db_type= table->s->db_type;
|
||||
if (!create_info->db_type)
|
||||
{
|
||||
if (create_info->used_fields & HA_CREATE_USED_ENGINE)
|
||||
{
|
||||
/*
|
||||
This case happens when the user specified
|
||||
ENGINE = x where x is a non-existing storage engine
|
||||
We clear the flag and treat it the same way
|
||||
as if no storage engine was specified.
|
||||
*/
|
||||
create_info->used_fields^= HA_CREATE_USED_ENGINE;
|
||||
}
|
||||
create_info->db_type= old_db_type;
|
||||
}
|
||||
|
||||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||
if (prep_alter_part_table(thd, table, alter_info, create_info, old_db_type,
|
||||
|
||||
Reference in New Issue
Block a user