mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
BUG 19062: CREATE TABLE ... PARTITION BY ... AS SELECT don't create partitioned table
This commit is contained in:

parent
4ba1a4b3cd
commit
b32237c3a7
@ -2855,6 +2855,17 @@ mysql_execute_command(THD *thd)
|
||||
res= 1;
|
||||
goto end_with_restore_list;
|
||||
}
|
||||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||
{
|
||||
partition_info *part_info= thd->lex->part_info;
|
||||
if (part_info && !(part_info= thd->lex->part_info->get_clone()))
|
||||
{
|
||||
res= -1;
|
||||
goto end_with_restore_list;
|
||||
}
|
||||
thd->work_part_info= part_info;
|
||||
}
|
||||
#endif
|
||||
if (select_lex->item_list.elements) // With select
|
||||
{
|
||||
select_result *result;
|
||||
@ -2924,15 +2935,6 @@ mysql_execute_command(THD *thd)
|
||||
lex->like_name);
|
||||
else
|
||||
{
|
||||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||
partition_info *part_info= thd->lex->part_info;
|
||||
if (part_info && !(part_info= thd->lex->part_info->get_clone()))
|
||||
{
|
||||
res= -1;
|
||||
goto end_with_restore_list;
|
||||
}
|
||||
thd->work_part_info= part_info;
|
||||
#endif
|
||||
res= mysql_create_table(thd, create_table->db,
|
||||
create_table->table_name, &lex->create_info,
|
||||
lex->create_list,
|
||||
|
Reference in New Issue
Block a user