| 1 |
--source include/have_sequence.inc |
| 2 |
--source include/have_aria.inc |
| 3 |
|
| 4 |
# |
| 5 |
# Simple test of the aria engine |
| 6 |
# As most test is above the engine, we only have to test base functionality |
| 7 |
# |
| 8 |
|
| 9 |
set @@default_storage_engine="aria"; |
| 10 |
|
| 11 |
--disable_ps2_protocol |
| 12 |
CREATE SEQUENCE t1 cache=10; |
| 13 |
show create sequence t1; |
| 14 |
select NEXT VALUE for t1,seq from seq_1_to_20; |
| 15 |
select * from t1; |
| 16 |
drop sequence t1; |
| 17 |
|
| 18 |
# |
| 19 |
# Create and check |
| 20 |
# |
| 21 |
|
| 22 |
create sequence s1; |
| 23 |
check table s1; |
| 24 |
select next value for s1; |
| 25 |
flush tables; |
| 26 |
check table s1; |
| 27 |
select next value for s1; |
| 28 |
flush tables; |
| 29 |
repair table s1; |
| 30 |
select next value for s1; |
| 31 |
drop sequence s1; |
| 32 |
|
| 33 |
# |
| 34 |
# ALTER and RENAME |
| 35 |
|
| 36 |
CREATE SEQUENCE t1; |
| 37 |
--error ER_SEQUENCE_INVALID_DATA |
| 38 |
alter sequence t1 minvalue=100; |
| 39 |
alter sequence t1 minvalue=100 start=100 restart=100; |
| 40 |
rename table t1 to t2; |
| 41 |
select next value for t2; |
| 42 |
alter table t2 rename to t1; |
| 43 |
select next value for t1; |
| 44 |
drop table t1; |
| 45 |
--enable_ps2_protocol |