diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2018-01-29 23:58:35 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2018-01-29 23:58:35 +0400 |
commit | b8540dfea37822ac0d9ed7cad12dd82bd71e0735 (patch) | |
tree | f1d3348347940894525a401f2a0ad85357fc881c /sql/sql_partition.cc | |
parent | 04daf30e9bca85b3241981c53f2293cee1f2de00 (diff) | |
download | mariadb-git-bb-10.0-hf.tar.gz |
MDEV-14696 Server crashes in in prep_alter_part_table on 2nd executionbb-10.0-hf
of PS.
The thd->lex->part_info should be kept intact during prepared
statement execution. We can modify thd->work_part_info instead.
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r-- | sql/sql_partition.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 02109b22898..5bbc783f142 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())) |