Debian Codegraph @

mysql-test/suite/sql_sequence/binlog.test

raw
1 --source include/have_sequence.inc
2 --source include/have_binlog_format_mixed_or_row.inc
3 --source include/binlog_start_pos.inc
4
5 #
6 # Testing binary logging of sequences
7 #
8
9 --disable_query_log
10 reset master; # get rid of previous tests binlog
11 --enable_query_log
12
13 create or replace sequence s1 cache 3;
14 --disable_ps2_protocol
15 select next value for s1, minimum_value from s1 where maximum_value> 1;
16 select next value for s1, minimum_value from s1 where maximum_value> 2;
17 select next value for s1, minimum_value from s1 where maximum_value> 3;
18 select next value for s1, minimum_value from s1 where maximum_value> 4;
19 --enable_ps2_protocol
20
21 #
22 # Alter sequence
23 #
24 alter sequence s1 maxvalue 1000;
25
26 # MDEV-24617 OPTIMIZE on a sequence causes unexpected
27 # ER_BINLOG_UNSAFE_STATEMENT The test below verifies no unsafe
28 # warnings anymore for any relavant commands that like OPTIMIZE can
29 # not produce ROW format events therefore the unsafe warning either.
30 optimize table s1;
31 analyze table s1;
32 repair table s1;
33 check table s1;
34 rename table s1 to tmp_s;
35 rename table tmp_s to s1;
36
37 drop sequence s1;
38
39 --let $binlog_file = LAST
40 source include/show_binlog_events.inc;