Commit a22a339f authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

MDEV-13024: Server crashes in my_store_ptr upon DELETE from sequence in multi-table format

It is test only (fix was done by Monty in ha_sequence::open by allocating ref)
parent 724ab9a1
......@@ -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
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment