mirror of
https://github.com/MariaDB/server.git
synced 2025-02-17 19:05:37 +01:00
32 lines
1.1 KiB
Text
32 lines
1.1 KiB
Text
![]() |
create or replace sequence s1 cache 3;
|
||
|
select next value for s1, min_value from s1 where max_value> 1;
|
||
|
next value for s1 min_value
|
||
|
1 1
|
||
|
select next value for s1, min_value from s1 where max_value> 2;
|
||
|
next value for s1 min_value
|
||
|
2 1
|
||
|
select next value for s1, min_value from s1 where max_value> 3;
|
||
|
next value for s1 min_value
|
||
|
3 1
|
||
|
select next value for s1, min_value from s1 where max_value> 4;
|
||
|
next value for s1 min_value
|
||
|
4 1
|
||
|
drop sequence s1;
|
||
|
"Runnig SHOW BINLOG EVENTS"
|
||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||
|
# # Gtid 1 # GTID #-#-#
|
||
|
# # Query 1 # use `test`; create or replace sequence s1 cache 3
|
||
|
# # Gtid 1 # BEGIN GTID #-#-#
|
||
|
# # Annotate_rows 1 # select next value for s1, min_value from s1 where max_value> 1
|
||
|
# # Table_map 1 # table_id: 30 (test.s1)
|
||
|
# # Write_rows_v1 1 # table_id: 30 flags: STMT_END_F
|
||
|
# # Query 1 # COMMIT
|
||
|
# # Gtid 1 # BEGIN GTID #-#-#
|
||
|
# # Annotate_rows 1 # select next value for s1, min_value from s1 where max_value> 4
|
||
|
# # Table_map 1 # table_id: 30 (test.s1)
|
||
|
# # Write_rows_v1 1 # table_id: 30 flags: STMT_END_F
|
||
|
# # Query 1 # COMMIT
|
||
|
# # Gtid 1 # GTID #-#-#
|
||
|
# # Query 1 # use `test`; DROP TABLE `s1` /* generated by server */
|
||
|
RESET MASTER;
|