Debian Codegraph @

mysql-test/suite/binlog_gtid/t/binlog_gtid_mix_response_packet.test

raw
1 #
2 # WL#6972: Collect GTIDs to include in the protocol's OK packet
3 #
4 --source include/have_binlog_format_mixed.inc
5
6 # need debug build to be able to set a deterministic server uuid
7 --source include/have_debug.inc
8
9 # BUG#19667258: WL#6972 - SERVER CRASH ON SET SESSION SESSION_TRACK_GTIDS='OFF'
10
11 RESET MASTER;
12
13 --enable_session_track_info
14 CREATE TABLE t1 (c1 INT) Engine=InnoDB;
15 DROP TABLE t1;
16 set session session_track_gtids='own_gtid';
17 CREATE TABLE t1 (c1 INT) Engine=InnoDB;
18 INSERT INTO t1 VALUES (1);
19 set session session_track_gtids='all_gtids';
20 SELECT * FROM t1;
21 DROP TABLE t1;
22 set session session_track_gtids='off';
23 RESET MASTER;
24 --disable_session_track_info
25
26 ########################################################
27 # Sanity Test.
28 #
29 # Verifies that we collect the right GTIDs when
30 # switching between values of SESSION_TRACK_GTIDS.
31 ########################################################
32
33 --enable_session_track_info
34
35 --let $saved_session_track_gtids= `SELECT @@SESSION.SESSION_TRACK_GTIDS`
36
37 SELECT @@server_uuid;
38
39 SET SESSION SESSION_TRACK_GTIDS=OFF;
40 SET SESSION GTID_NEXT='11111111-AAAA-2222-BBBB-000000000000:1';
41 CREATE TABLE t1 (c1 INT) Engine=InnoDB;
42 SET SESSION GTID_NEXT=AUTOMATIC;
43
44 SET SESSION SESSION_TRACK_GTIDS=OWN_GTID;
45 SET SESSION GTID_NEXT='11111111-AAAA-2222-BBBB-111111111111:1';
46 CREATE TABLE t2 (c1 INT) Engine=InnoDB;
47 SET SESSION GTID_NEXT=AUTOMATIC;
48
49 SET SESSION SESSION_TRACK_GTIDS=ALL_GTIDS;
50 CREATE TABLE t3 (c1 INT) Engine=InnoDB;
51
52 DROP TABLE t1, t2, t3;
53
54 --disable_session_track_info
55
56 --eval SET SESSION SESSION_TRACK_GTIDS= $saved_session_track_gtids
57 RESET MASTER;
58
59 ######################################################
60 # Tests for the OK packet data
61 ######################################################
62 --source suite/binlog/include/binlog_gtid_mix_response_packet.inc