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 /mysql-test | |
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 'mysql-test')
-rw-r--r-- | mysql-test/r/partition.result | 11 | ||||
-rw-r--r-- | mysql-test/t/partition.test | 13 |
2 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index d4b719f3a75..c6669176b3d 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -2634,3 +2634,14 @@ alter table t1 drop partition if exists p5; Warnings: Note 1507 Error in list of partitions to DROP DROP TABLE t1; +CREATE TABLE t1 (a INT) ENGINE=MyISAM PARTITION BY RANGE(a) (PARTITION p1 VALUES LESS THAN (0)); +ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES LESS THAN (1)); +PREPARE stmt FROM 'ALTER TABLE t1 ADD PARTITION IF NOT EXISTS (PARTITION p2 VALUES LESS THAN (2))'; +EXECUTE stmt; +Warnings: +Note 1517 Duplicate partition name p2 +EXECUTE stmt; +Warnings: +Note 1517 Duplicate partition name p2 +DEALLOCATE PREPARE stmt; +DROP TABLE t1; diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 754677e9b37..1c8cd0375d6 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -2884,3 +2884,16 @@ alter table t1 drop partition if exists p5; DROP TABLE t1; +# +# MDEV-14696 Server crashes in in prep_alter_part_table on 2nd execution of PS. +# + +CREATE TABLE t1 (a INT) ENGINE=MyISAM PARTITION BY RANGE(a) (PARTITION p1 VALUES LESS THAN (0)); +ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES LESS THAN (1)); +PREPARE stmt FROM 'ALTER TABLE t1 ADD PARTITION IF NOT EXISTS (PARTITION p2 VALUES LESS THAN (2))'; +EXECUTE stmt; +EXECUTE stmt; + +DEALLOCATE PREPARE stmt; +DROP TABLE t1; + |