mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed sequences based on comments from Peter Gulutzan and Andrii Nikitin
- Changed names of SEQUENCE table columns to be more close to ANSI - Fixed error message for SHOW SEQUENCE non_existing_sequence - Allow syntax CACHE +1 - Fixed ALTER TABLE for TEMPORARY sequences.
This commit is contained in:
@ -8,27 +8,27 @@
|
||||
CREATE SEQUENCE t1 start with 1 minvalue 1 maxvalue 10 increment by 1 cache 2 cycle;
|
||||
show create table t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
|
||||
select NEXT VALUE for t1,seq from seq_1_to_20;
|
||||
|
||||
@ -36,27 +36,27 @@ drop sequence t1;
|
||||
|
||||
CREATE SEQUENCE t1 minvalue 1 maxvalue 10 increment by -1 cache 2 cycle engine=aria;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
select next value for t1;
|
||||
select next_value,round from t1;
|
||||
select next_not_cached_value,cycle_count from t1;
|
||||
|
||||
select NEXT VALUE for t1,seq from seq_1_to_20;
|
||||
|
||||
@ -85,7 +85,7 @@ select next value for s1;
|
||||
drop sequence s1;
|
||||
|
||||
#
|
||||
# Test that flush tables jumps to next next_value
|
||||
# Test that flush tables jumps to next next_not_cached_value
|
||||
#
|
||||
|
||||
CREATE SEQUENCE t1 start with 1 minvalue 1 maxvalue 100 increment by 1 cache 10;
|
||||
@ -116,23 +116,23 @@ drop sequence t9;
|
||||
CREATE SEQUENCE s1 cache=0;
|
||||
select * from s1;
|
||||
select next value for s1;
|
||||
select next_value from s1;
|
||||
select next_not_cached_value from s1;
|
||||
select next value for s1;
|
||||
select next_value from s1;
|
||||
select next_not_cached_value from s1;
|
||||
DROP SEQUENCE s1;
|
||||
CREATE SEQUENCE s1 cache=1;
|
||||
select next_value from s1;
|
||||
select next_not_cached_value from s1;
|
||||
select next value for s1;
|
||||
select next_value from s1;
|
||||
select next_not_cached_value from s1;
|
||||
select next value for s1;
|
||||
select next_value from s1;
|
||||
select next_not_cached_value from s1;
|
||||
DROP SEQUENCE s1;
|
||||
CREATE SEQUENCE s1 cache=2;
|
||||
select next_value from s1;
|
||||
select next_not_cached_value from s1;
|
||||
select next value for s1;
|
||||
select next_value from s1;
|
||||
select next_not_cached_value from s1;
|
||||
select next value for s1;
|
||||
select next_value from s1;
|
||||
select next_not_cached_value from s1;
|
||||
DROP SEQUENCE s1;
|
||||
|
||||
#
|
||||
@ -196,7 +196,7 @@ drop sequence s1;
|
||||
|
||||
CREATE SEQUENCE t1 start with 5 minvalue 1 maxvalue 10 increment by 1 cache 5 cycle;
|
||||
explain select next value for t1;
|
||||
explain select next value for t1, min_value from t1;
|
||||
explain select next value for t1, minimum_value from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
@ -244,7 +244,7 @@ drop table t1;
|
||||
create sequence t1;
|
||||
select next value for t1;
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
select next value for t1, min_value;
|
||||
select next value for t1, minimum_value;
|
||||
drop sequence t1;
|
||||
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user