Commit a8e7e7c0 authored by Rucha Deodhar's avatar Rucha Deodhar

MDEV-13005: Fixing bugs in SEQUENCE, part 3, 4/5

Task 4 and 5:
Already fixed when I started working on bug. Task 4 correctly gives syntax
error ('(' and ')' are not part of create sequence syntax). Task 5 also
gives correct error because s1 is table not sequence. Fails with
ER_NOT_SEQUENCE2
parent c6eeacd1
......@@ -701,3 +701,13 @@ ERROR HY000: Sequence 'test.x' has out of range value for options
# Task 3:
CREATE SEQUENCE seq1 START WITH 1 cache -1;
ERROR HY000: Sequence 'test.seq1' has out of range value for options
# Task 4:
CREATE TEMPORARY TABLE s1 (s1 INT);
DROP TEMPORARY SEQUENCE s1;
ERROR 42S02: 'test.s1' is not a SEQUENCE
DROP TEMPORARY TABLE s1;
# Task 5:
CREATE TEMPORARY TABLE s1 (s1 INT);
CREATE TEMPORARY SEQUENCE s1 (s1 INT);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(s1 INT)' at line 1
DROP TEMPORARY TABLE s1;
......@@ -533,3 +533,15 @@ CREATE SEQUENCE x START WITH 1 INCREMENT BY 123456789012345678;
--echo # Task 3:
--error ER_SEQUENCE_INVALID_DATA
CREATE SEQUENCE seq1 START WITH 1 cache -1;
--echo # Task 4:
CREATE TEMPORARY TABLE s1 (s1 INT);
--error ER_NOT_SEQUENCE2
DROP TEMPORARY SEQUENCE s1;
DROP TEMPORARY TABLE s1;
--echo # Task 5:
CREATE TEMPORARY TABLE s1 (s1 INT);
--error ER_PARSE_ERROR
CREATE TEMPORARY SEQUENCE s1 (s1 INT);
DROP TEMPORARY TABLE s1;
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