1
0
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:
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
2006-06-13 22:46:38 -04:00
parent d2b04770ac
commit 975e14e40d
3 changed files with 56 additions and 0 deletions

View File

@@ -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,