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_table.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_table.cc')
-rw-r--r-- | sql/sql_table.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 9549884bc4e..a8eddd86dda 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -5999,6 +5999,8 @@ remove_key_no_warn: #ifdef WITH_PARTITION_STORAGE_ENGINE partition_info *tab_part_info= table->part_info; + thd->work_part_info= thd->lex->part_info; + if (tab_part_info && thd->lex->check_exists) { /* ALTER TABLE ADD PARTITION IF NOT EXISTS */ @@ -6017,7 +6019,7 @@ remove_key_no_warn: ER_SAME_NAME_PARTITION, ER(ER_SAME_NAME_PARTITION), pe->partition_name); alter_info->flags&= ~Alter_info::ALTER_ADD_PARTITION; - thd->lex->part_info= NULL; + thd->work_part_info= NULL; break; } } |