mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-12930 Testing SEQUENCE object
Fixed the following things from the above MDEV: - Ensure the user has INSERT privilege when generating new sequence values with NEXT VALUE FOR or SETVAL() - Fixed bug in InnoDB when generating several sequence values in one statement - Ensure that read_set is up to date before calling ha_sequence::ha_write_row() - This is only a potential bug with storage engines that trusts the column maps completely
This commit is contained in:
@ -113,3 +113,38 @@ LOCK TABLES s1 WRITE;
|
||||
insert into s1 values (1,1,9223372036854775806, 1, 1, 1000, 0, 0);
|
||||
UNLOCK TABLES;
|
||||
drop table s1;
|
||||
#
|
||||
# Many sequence calls with innodb
|
||||
#
|
||||
create sequence s1 cache=1000 engine=innodb;
|
||||
start transaction;
|
||||
select count(nextval(s1)) from seq_1_to_2000;
|
||||
count(nextval(s1))
|
||||
2000
|
||||
commit;
|
||||
select * from s1;
|
||||
next_value min_value max_value start increment cache cycle round
|
||||
2001 1 9223372036854775806 1 1 1000 0 0
|
||||
drop sequence s1;
|
||||
create sequence s1 cache=1000 engine=innodb;
|
||||
start transaction;
|
||||
select count(nextval(s1)) from seq_1_to_2000;
|
||||
count(nextval(s1))
|
||||
2000
|
||||
connect addconroot, localhost, root,,;
|
||||
connection addconroot;
|
||||
start transaction;
|
||||
select count(nextval(s1)) from seq_1_to_2000;
|
||||
count(nextval(s1))
|
||||
2000
|
||||
select * from s1;
|
||||
next_value min_value max_value start increment cache cycle round
|
||||
4001 1 9223372036854775806 1 1 1000 0 0
|
||||
commit;
|
||||
disconnect addconroot;
|
||||
connection default;
|
||||
select * from s1;
|
||||
next_value min_value max_value start increment cache cycle round
|
||||
4001 1 9223372036854775806 1 1 1000 0 0
|
||||
commit;
|
||||
drop sequence s1;
|
||||
|
Reference in New Issue
Block a user