Debian Codegraph @

mysql-test/suite/group_replication/t/gr_single_primary_with_transaction_isolation.test

raw
1 ############################################################
2 # WL#9426: Single Primary Mode in Group Replication
3 #
4 # This test case verifies that one can override the ISOLATION
5 # level restrictions in the SINGLE PRIMARY mode.
6 ############################################################
7 --source include/big_test.inc
8 --source include/have_group_replication_plugin.inc
9
10 SET SQL_LOG_BIN=0;
11 call mtr.add_suppression("Transaction isolation level .tx_isolation. is set to SERIALIZABLE, which is not compatible with Group Replication");
12 SET SQL_LOG_BIN=1;
13
14 --let $server1_uuid= `SELECT @@server_uuid`
15
16 --let $rpl_skip_group_replication_start= 1
17 --let $rpl_server_count= 2
18 --let $rpl_group_replication_single_primary_mode=1
19 --source include/group_replication.inc
20
21 --echo #
22 --echo # 1) START GROUP IN SINGLE PRIMARY MODE AND CHECK IF FLAG SET TO FALSE IN
23 --echo # `group_replication_enforce_update_everywhere_checks` FORCES THE PLUGIN
24 --echo # TO IGNORE THE FAULTY CONFIGURATION OF `tx_isolate`
25 --echo #
26 --let $test_parameter_enforce_checks= FALSE
27 --let $test_parameter_single_primary_mode= TRUE
28 --let $test_parameter_tx_isolation= 'SERIALIZABLE'
29 --let $test_parameter_sql_execution_error= 0
30 --let $test_parameter_primary_uuid= $server1_uuid
31 --source ../include/gr_single_primary_with_transaction_isolation.inc
32
33 --echo #
34 --echo # 2) START GROUP IN MULTI PRIMARY MODE AND CHECK IF FLAG SET TO FALSE IN
35 --echo # `group_replication_enforce_update_everywhere_checks` FORCES THE PLUGIN
36 --echo # TO IGNORE THE FAULTY CONFIGURATION OF `tx_isolate`
37 --echo #
38 --let $test_parameter_enforce_checks= FALSE
39 --let $test_parameter_single_primary_mode= FALSE
40 --let $test_parameter_tx_isolation= 'SERIALIZABLE'
41 --let $test_parameter_sql_execution_error= 0
42 --let $test_parameter_primary_uuid=
43 --source ../include/gr_single_primary_with_transaction_isolation.inc
44
45 --echo #
46 --echo # 3) START GROUP IN MULTI PRIMARY MODE AND CHECK IF FLAG SET TO TRUE IN
47 --echo # `group_replication_enforce_update_everywhere_checks` FORCES THE PLUGIN
48 --echo # TO THROW AN ERROR WHEN THERE IS FAULTY CONFIGURATION OF `tx_isolate`
49 --echo #
50 --let $test_parameter_enforce_checks= TRUE
51 --let $test_parameter_single_primary_mode= FALSE
52 --let $test_parameter_tx_isolation= 'SERIALIZABLE'
53 --let $test_parameter_sql_execution_error= 3098
54 --let $test_parameter_primary_uuid=
55 --source ../include/gr_single_primary_with_transaction_isolation.inc
56
57 --echo #
58 --echo # 4) START GROUP IN MULTI PRIMARY MODE AND
59 --echo # WITH CORRECT CONFIGURATION OF `tx_isolate` then the flag
60 --echo # `group_replication_enforce_update_everywhere_checks` doesn't matter
61 --echo #
62 --let $test_parameter_enforce_checks= TRUE
63 --let $test_parameter_single_primary_mode= FALSE
64 --let $test_parameter_tx_isolation= 'REPEATABLE-READ'
65 --let $test_parameter_sql_execution_error= 0
66 --let $test_parameter_primary_uuid=
67 --source ../include/gr_single_primary_with_transaction_isolation.inc
68
69 --echo #
70 --echo # 5) START GROUP IN MULTI PRIMARY MODE AND
71 --echo # WITH CORRECT CONFIGURATION OF `tx_isolate` then the flag
72 --echo # `group_replication_enforce_update_everywhere_checks` doesn't matter
73 --echo #
74 --let $test_parameter_enforce_checks= FALSE
75 --let $test_parameter_single_primary_mode= FALSE
76 --let $test_parameter_tx_isolation= 'REPEATABLE-READ'
77 --let $test_parameter_sql_execution_error= 0
78 --let $test_parameter_primary_uuid=
79 --source ../include/gr_single_primary_with_transaction_isolation.inc
80
81 --echo # CLEANUP
82 --connection server1
83 --source include/group_replication_end.inc