Debian Codegraph @

mysql-test/suite/group_replication/r/gr_consistent_reads_before_gtid_next.result

raw
1 include/group_replication.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection server1]
6
7 ############################################################
8 # 01. Create a table on the group.
9 [connection server1]
10 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY);
11
12 ############################################################
13 # 02. Use the next GTID generated by the group on GTID_NEXT.
14 # The GTID will be UUID:4.
15 include/assert.inc [GTID_EXECUTED is UUID:1-3]
16 SET @@SESSION.GTID_NEXT= "GROUP_NAME:4";
17
18 ############################################################
19 # 03. Commit a transaction on the group that will be logged
20 # with GTID UUID:4.
21 [connection server_1]
22 INSERT INTO t1 VALUES (1);
23 include/assert.inc [GTID_EXECUTED is UUID:1-4]
24
25 ############################################################
26 # 04. Wait until `received_transaction_set` from
27 # is updated with the GTID_EXECUTED set.
28
29 ############################################################
30 # 05. Perform a consistent read.
31 # The read will not be blocked by the GTID_NEXT set on session server1.
32 SET @@SESSION.group_replication_consistency= 'BEFORE';
33 SELECT * FROM t1;
34 c1
35 1
36
37 ############################################################
38 # 06. Clean up.
39 [connection server_1]
40 SET @@SESSION.group_replication_consistency= DEFAULT;
41 [connection server1]
42 ROLLBACK;
43 SET @@SESSION.GTID_NEXT= "AUTOMATIC";
44 DROP TABLE t1;
45 include/group_replication_end.inc