diff options
-rw-r--r-- | mysql-test/suite/sql_sequence/other.result | 16 | ||||
-rw-r--r-- | mysql-test/suite/sql_sequence/other.test | 20 |
2 files changed, 36 insertions, 0 deletions
diff --git a/mysql-test/suite/sql_sequence/other.result b/mysql-test/suite/sql_sequence/other.result index a56eb4d09a7..ff58e35772b 100644 --- a/mysql-test/suite/sql_sequence/other.result +++ b/mysql-test/suite/sql_sequence/other.result @@ -194,3 +194,19 @@ ERROR HY000: Function or expression 'setval()' cannot be used in the CHECK claus CREATE TABLE t1 (a int, b int as (next value for s1 > 0)); ERROR HY000: Function or expression 'nextval()' cannot be used in the GENERATED ALWAYS AS clause of `b` drop sequence s1; +# +# MDEV-13024: Server crashes in my_store_ptr upon DELETE from +# sequence in multi-table format +# +CREATE SEQUENCE s; +CREATE table t1 (a int); +insert into t1 values (1),(2); +DELETE s FROM s; +ERROR HY000: Storage engine SEQUENCE of the table `test`.`s` doesn't have this option +delete t1,s from s,t1; +ERROR HY000: Storage engine SEQUENCE of the table `test`.`s` doesn't have this option +delete s,t1 from t1,s; +ERROR HY000: Storage engine SEQUENCE of the table `test`.`s` doesn't have this option +DROP SEQUENCE s; +DROP TABLE t1; +# End of 10.3 tests diff --git a/mysql-test/suite/sql_sequence/other.test b/mysql-test/suite/sql_sequence/other.test index a493687faa3..5759b195950 100644 --- a/mysql-test/suite/sql_sequence/other.test +++ b/mysql-test/suite/sql_sequence/other.test @@ -160,3 +160,23 @@ CREATE table t1 (a int check (setval(s1,10))); --error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a int, b int as (next value for s1 > 0)); drop sequence s1; + + +--echo # +--echo # MDEV-13024: Server crashes in my_store_ptr upon DELETE from +--echo # sequence in multi-table format +--echo # +CREATE SEQUENCE s; +CREATE table t1 (a int); +insert into t1 values (1),(2); +--error ER_ILLEGAL_HA +DELETE s FROM s; +--error ER_ILLEGAL_HA +delete t1,s from s,t1; +--error ER_ILLEGAL_HA +delete s,t1 from t1,s; +DROP SEQUENCE s; +DROP TABLE t1; + + +--echo # End of 10.3 tests |