diff options
-rw-r--r-- | mysql-test/suite/sql_sequence/other.result | 9 | ||||
-rw-r--r-- | mysql-test/suite/sql_sequence/other.test | 13 | ||||
-rw-r--r-- | sql/ha_sequence.h | 2 |
3 files changed, 23 insertions, 1 deletions
diff --git a/mysql-test/suite/sql_sequence/other.result b/mysql-test/suite/sql_sequence/other.result index e3ec94cf2c5..500fca9a065 100644 --- a/mysql-test/suite/sql_sequence/other.result +++ b/mysql-test/suite/sql_sequence/other.result @@ -184,3 +184,12 @@ 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; +DELETE s FROM s; +ERROR HY000: Storage engine SEQUENCE of the table `test`.`s` doesn't have this option +DROP SEQUENCE s; +# End of 10.3 tests diff --git a/mysql-test/suite/sql_sequence/other.test b/mysql-test/suite/sql_sequence/other.test index ff0db9e158d..8f35afd73de 100644 --- a/mysql-test/suite/sql_sequence/other.test +++ b/mysql-test/suite/sql_sequence/other.test @@ -157,3 +157,16 @@ 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; +--error ER_ILLEGAL_HA +DELETE s FROM s; +DROP SEQUENCE s; + + +--echo # End of 10.3 tests diff --git a/sql/ha_sequence.h b/sql/ha_sequence.h index fd9da05b591..b3789914e18 100644 --- a/sql/ha_sequence.h +++ b/sql/ha_sequence.h @@ -123,7 +123,7 @@ public: return error; } void position(const uchar *record) - { return file->position(record); } + { } const char *table_type() const { return file->table_type(); } ulong index_flags(uint inx, uint part, bool all_parts) const |