| 1 |
CREATE SEQUENCE s1 ENGINE=InnoDB; |
| 2 |
CREATE SEQUENCE s2 ENGINE=InnoDB; |
| 3 |
connect con1,localhost,root,,test; |
| 4 |
CREATE TABLE s3 LIKE s2;; |
| 5 |
connection default; |
| 6 |
CREATE SEQUENCE s4 ENGINE=InnoDB; |
| 7 |
SELECT * from s1 WHERE start_value IN (SELECT start_value FROM s2); |
| 8 |
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count |
| 9 |
1 1 9223372036854775806 1 1 1000 0 0 |
| 10 |
connection con1; |
| 11 |
disconnect con1; |
| 12 |
connection default; |
| 13 |
DROP SEQUENCE s1, s2, s3, s4; |
| 14 |
CREATE SEQUENCE s1 ENGINE=InnoDB; |
| 15 |
PREPARE stmt FROM "CREATE TABLE s2 LIKE s1"; |
| 16 |
execute stmt; |
| 17 |
drop table s2; |
| 18 |
execute stmt; |
| 19 |
drop table s2; |
| 20 |
execute stmt; |
| 21 |
select * from s2; |
| 22 |
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count |
| 23 |
1 1 9223372036854775806 1 1 1000 0 0 |
| 24 |
DROP SEQUENCE s1, s2; |
| 25 |
CREATE SEQUENCE s1 ENGINE=InnoDB; |
| 26 |
connect con1,localhost,root,,test; |
| 27 |
CREATE TABLE s2 LIKE s1;; |
| 28 |
connection default; |
| 29 |
FLUSH TABLES; |
| 30 |
connection con1; |
| 31 |
disconnect con1; |
| 32 |
connection default; |
| 33 |
DROP TABLE s1,s2; |
| 34 |
CREATE TABLE t1 (a INT) ENGINE=InnoDB; |
| 35 |
START TRANSACTION WITH CONSISTENT SNAPSHOT; |
| 36 |
connect con1,localhost,root,,test; |
| 37 |
CREATE SEQUENCE s1 ENGINE=InnoDB; |
| 38 |
FLUSH TABLES; |
| 39 |
disconnect con1; |
| 40 |
connection default; |
| 41 |
SELECT NEXTVAL(s1); |
| 42 |
NEXTVAL(s1) |
| 43 |
1 |
| 44 |
COMMIT; |
| 45 |
DROP TABLE t1; |
| 46 |
DROP SEQUENCE s1; |
| 47 |
# |
| 48 |
# MDEV-28152 Features for sequence |
| 49 |
# |
| 50 |
CREATE SEQUENCE s1 as mediumint unsigned ENGINE=InnoDB; |
| 51 |
PREPARE stmt FROM "CREATE TABLE s2 LIKE s1"; |
| 52 |
execute stmt; |
| 53 |
drop table s2; |
| 54 |
execute stmt; |
| 55 |
show create sequence s2; |
| 56 |
Table Create Table |
| 57 |
s2 CREATE SEQUENCE `s2` as mediumint unsigned start with 1 minvalue 1 maxvalue 16777214 increment by 1 cache 1000 nocycle ENGINE=InnoDB |
| 58 |
drop table s2; |
| 59 |
execute stmt; |
| 60 |
select * from s2; |
| 61 |
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count |
| 62 |
1 1 16777214 1 1 1000 0 0 |
| 63 |
DROP SEQUENCE s1, s2; |
| 64 |
# |
| 65 |
# End of 11.5 tests |
| 66 |
# |