summaryrefslogtreecommitdiff
path: root/sql/sql_partition.cc
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2018-01-30 11:28:21 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2018-01-30 11:28:21 +0400
commit6b4a4a85a7f42ba8d47bde2a879066a54b3ca798 (patch)
tree6d7038d8217aefa4a5823eabb74ef06f01f7720a /sql/sql_partition.cc
parentc4a908cb56d3ed81879573631d1f180d4962ed4e (diff)
downloadmariadb-git-6b4a4a85a7f42ba8d47bde2a879066a54b3ca798.tar.gz
MDEV-14696 Server crashes in in prep_alter_part_table on 2nd execution of PS.
The thd->lex->part_info should be kept intact during PS execution. Or the second execution gets that modified part_info. Let's modify ths->work_part_info instead.
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r--sql/sql_partition.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index dd1f60ec078..1c270521a12 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -4713,7 +4713,12 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info,
DBUG_RETURN(TRUE);
}
- thd->work_part_info= thd->lex->part_info;
+ /*
+ One of these is done in handle_if_exists_option():
+ thd->work_part_info= thd->lex->part_info;
+ or
+ thd->work_part_info= NULL;
+ */
if (thd->work_part_info &&
!(thd->work_part_info= thd->work_part_info->get_clone()))