Debian Codegraph @

mysql-test/suite/group_replication/r/gr_disregard_nonunique_key.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 # Create a table on server1.
9 [connection server1]
10 CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT, KEY `c2` (`c2`));
11 include/rpl_sync.inc
12
13 ############################################################
14 # 0. Initial setup and checks.
15 [connection server1]
16 SET SESSION sql_log_bin= 0;
17 include/gtid_utils.inc
18 SET SESSION sql_log_bin= 1;
19 include/gtid_step_reset.inc
20
21 ############################################################
22 # 1. Set a debug sync before broadcast message to group on
23 # connection local_server_connection1.
24 [connection server1]
25 SET @debug_save= @@GLOBAL.DEBUG;
26 SET @@GLOBAL.DEBUG='d,group_replication_before_message_broadcast';
27
28 #####################################################################
29 # 2. Commit local_transaction that will be blocked before broadcast.
30 BEGIN;
31 INSERT INTO t1 VALUES (1, 2);
32 COMMIT;
33
34 ############################################################
35 # 3. Wait until local transaction reaches the
36 # group_replication_before_message_broadcast debug sync point.
37 [connection server_1]
38
39 ############################################################
40 # 4. Execute a transaction on remote server, that will reach first
41 # certification, since transaction on the local server
42 # is blocked before broadcast.
43 [connection server2]
44 BEGIN;
45 INSERT INTO t1 VALUES (3, 2);
46 COMMIT;
47
48 ############################################################
49 # 5. Signal the waiting thread on local server to resume the
50 # transaction.
51 [connection server_1]
52 SET DEBUG_SYNC='now SIGNAL waiting';
53 SET @@GLOBAL.DEBUG= @debug_save;
54
55 ############################################################
56 # 6. Wait for remote transaction to be executed succesfully
57 on local server.
58 [connection server2]
59 include/sync_slave_sql_with_master.inc
60 ############################################################
61 # 7. If the test case is conflict scenario, local transaction
62 # will end up in an error stating that it was aborted,
63 # since transactions are conflicting and transaction on
64 # remote server was ordered first. If the test case is
65 # is positive scenario, no error will be seen here.
66 [connection server1]
67 [connection server1]
68 SET @@GLOBAL.DEBUG=@debug_save;
69 ############################################################
70 # 8. Sync everything
71 include/rpl_sync.inc
72 ############################################################
73 # 9. Assert that number of certified transactions are the
74 # expected ones.
75 include/assert.inc [The value of Count_Transactions_Checked should be 3 after starting group replication]
76 include/assert.inc [The value of Count_Conflicts_Detected should be 0 after starting group replication]
77 ############################################################
78 # 10. Assert that GTID is increased as expected
79 include/gtid_step_assert.inc [count=2, only_count=1]
80 [connection server1]
81 SET SESSION sql_log_bin= 0;
82 include/gtid_utils_end.inc
83 SET SESSION sql_log_bin= 1;
84 ############################################################
85 # 11. Cleanup (restore the connection back to original)
86 [connection server1]
87
88 ############################################################
89 # Check data sanity.
90 include/assert.inc [The table should have two rows due to the two successful inserts]
91 DROP TABLE t1;
92 include/group_replication_end.inc