diff options
Diffstat (limited to 'mysql-test/suite/sql_sequence/other.test')
-rw-r--r-- | mysql-test/suite/sql_sequence/other.test | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/suite/sql_sequence/other.test b/mysql-test/suite/sql_sequence/other.test index edd4cc7acc7..ff0db9e158d 100644 --- a/mysql-test/suite/sql_sequence/other.test +++ b/mysql-test/suite/sql_sequence/other.test @@ -131,3 +131,29 @@ create sequence s2; select next value for s1; unlock tables; drop sequence s1; + +--echo # +--echo # MDEV-14761 +--echo # Assertion `!mysql_parse_status || thd->is_error() || +--echo # thd->get_internal_handler()' failed in parse_sql +--echo # + +CREATE SEQUENCE s1; +--error ER_DUP_ARGUMENT +ALTER SEQUENCE s1 MAXVALUE 100 NO MAXVALUE; +DROP SEQUENCE s1; + +--echo # +--echo # Don't allow SEQUENCE to be used with CHECK or virtual fields +--echo # + +CREATE SEQUENCE s1 nocache engine=myisam; +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +CREATE table t1 (a int check (next value for s1 > 0)); +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +CREATE table t1 (a int check (previous value for s1 > 0)); +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +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; |