Debian Codegraph @

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

raw
1 SET SQL_LOG_BIN=0;
2 call mtr.add_suppression("Transaction isolation level .tx_isolation. is set to SERIALIZABLE, which is not compatible with Group Replication");
3 SET SQL_LOG_BIN=1;
4 include/group_replication.inc [rpl_server_count=2]
5 Warnings:
6 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
7 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.
8 [connection server1]
9 #
10 # 1) START GROUP IN SINGLE PRIMARY MODE AND CHECK IF FLAG SET TO FALSE IN
11 # `group_replication_enforce_update_everywhere_checks` FORCES THE PLUGIN
12 # TO IGNORE THE FAULTY CONFIGURATION OF `tx_isolate`
13 #
14 include/gr_single_primary_with_transaction_isolation.inc
15 # CONFIGURE SERVER 1
16 SET GLOBAL group_replication_enforce_update_everywhere_checks= FALSE;
17 SET GLOBAL group_replication_single_primary_mode= TRUE;
18 SET SESSION transaction_isolation='SERIALIZABLE';
19 # CONFIGURE SERVER 2
20 SET GLOBAL group_replication_enforce_update_everywhere_checks= FALSE;
21 SET GLOBAL group_replication_single_primary_mode= TRUE;
22 SET SESSION transaction_isolation='SERIALIZABLE';
23 # WRITE DATA ON SERVER 1 (ISOLATION LEVEL 'SERIALIZABLE')
24 # AND VERIFY PRESENCE OF THE DATA ON SERVER 2
25 CREATE TABLE first(c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
26 INSERT INTO first(c1) VALUES(2),(4);
27 SELECT * FROM first;
28 c1
29 2
30 4
31 DROP TABLE first;
32 #
33 # 2) START GROUP IN MULTI PRIMARY MODE AND CHECK IF FLAG SET TO FALSE IN
34 # `group_replication_enforce_update_everywhere_checks` FORCES THE PLUGIN
35 # TO IGNORE THE FAULTY CONFIGURATION OF `tx_isolate`
36 #
37 include/gr_single_primary_with_transaction_isolation.inc
38 # CONFIGURE SERVER 1
39 SET GLOBAL group_replication_enforce_update_everywhere_checks= FALSE;
40 SET GLOBAL group_replication_single_primary_mode= FALSE;
41 SET SESSION transaction_isolation='SERIALIZABLE';
42 # CONFIGURE SERVER 2
43 SET GLOBAL group_replication_enforce_update_everywhere_checks= FALSE;
44 SET GLOBAL group_replication_single_primary_mode= FALSE;
45 SET SESSION transaction_isolation='SERIALIZABLE';
46 # WRITE DATA ON SERVER 1 (ISOLATION LEVEL 'SERIALIZABLE')
47 # AND VERIFY PRESENCE OF THE DATA ON SERVER 2
48 CREATE TABLE first(c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
49 INSERT INTO first(c1) VALUES(2),(4);
50 SELECT * FROM first;
51 c1
52 2
53 4
54 DROP TABLE first;
55 #
56 # 3) START GROUP IN MULTI PRIMARY MODE AND CHECK IF FLAG SET TO TRUE IN
57 # `group_replication_enforce_update_everywhere_checks` FORCES THE PLUGIN
58 # TO THROW AN ERROR WHEN THERE IS FAULTY CONFIGURATION OF `tx_isolate`
59 #
60 include/gr_single_primary_with_transaction_isolation.inc
61 # CONFIGURE SERVER 1
62 SET GLOBAL group_replication_enforce_update_everywhere_checks= TRUE;
63 SET GLOBAL group_replication_single_primary_mode= FALSE;
64 SET SESSION transaction_isolation='SERIALIZABLE';
65 # CONFIGURE SERVER 2
66 SET GLOBAL group_replication_enforce_update_everywhere_checks= TRUE;
67 SET GLOBAL group_replication_single_primary_mode= FALSE;
68 SET SESSION transaction_isolation='SERIALIZABLE';
69 # WRITE DATA ON SERVER 1 (ISOLATION LEVEL 'SERIALIZABLE')
70 # AND VERIFY PRESENCE OF THE DATA ON SERVER 2
71 CREATE TABLE first(c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
72 INSERT INTO first(c1) VALUES(2),(4);
73 ERROR HY000: The table does not comply with the requirements by an external plugin.
74 DROP TABLE first;
75 #
76 # 4) START GROUP IN MULTI PRIMARY MODE AND
77 # WITH CORRECT CONFIGURATION OF `tx_isolate` then the flag
78 # `group_replication_enforce_update_everywhere_checks` doesn't matter
79 #
80 include/gr_single_primary_with_transaction_isolation.inc
81 # CONFIGURE SERVER 1
82 SET GLOBAL group_replication_enforce_update_everywhere_checks= TRUE;
83 SET GLOBAL group_replication_single_primary_mode= FALSE;
84 SET SESSION transaction_isolation='REPEATABLE-READ';
85 # CONFIGURE SERVER 2
86 SET GLOBAL group_replication_enforce_update_everywhere_checks= TRUE;
87 SET GLOBAL group_replication_single_primary_mode= FALSE;
88 SET SESSION transaction_isolation='REPEATABLE-READ';
89 # WRITE DATA ON SERVER 1 (ISOLATION LEVEL 'REPEATABLE-READ')
90 # AND VERIFY PRESENCE OF THE DATA ON SERVER 2
91 CREATE TABLE first(c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
92 INSERT INTO first(c1) VALUES(2),(4);
93 SELECT * FROM first;
94 c1
95 2
96 4
97 DROP TABLE first;
98 #
99 # 5) START GROUP IN MULTI PRIMARY MODE AND
100 # WITH CORRECT CONFIGURATION OF `tx_isolate` then the flag
101 # `group_replication_enforce_update_everywhere_checks` doesn't matter
102 #
103 include/gr_single_primary_with_transaction_isolation.inc
104 # CONFIGURE SERVER 1
105 SET GLOBAL group_replication_enforce_update_everywhere_checks= FALSE;
106 SET GLOBAL group_replication_single_primary_mode= FALSE;
107 SET SESSION transaction_isolation='REPEATABLE-READ';
108 # CONFIGURE SERVER 2
109 SET GLOBAL group_replication_enforce_update_everywhere_checks= FALSE;
110 SET GLOBAL group_replication_single_primary_mode= FALSE;
111 SET SESSION transaction_isolation='REPEATABLE-READ';
112 # WRITE DATA ON SERVER 1 (ISOLATION LEVEL 'REPEATABLE-READ')
113 # AND VERIFY PRESENCE OF THE DATA ON SERVER 2
114 CREATE TABLE first(c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
115 INSERT INTO first(c1) VALUES(2),(4);
116 SELECT * FROM first;
117 c1
118 2
119 4
120 DROP TABLE first;
121 # CLEANUP
122 include/group_replication_end.inc