Debian Codegraph @

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

raw
1 include/group_replication.inc [rpl_server_count=2]
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 CREATE TABLE t1 (i INT, v INT, PRIMARY KEY (i));
7 INSERT INTO t1 VALUES (1, NULL);
8 INSERT INTO t1 VALUES (2, 9);
9 INSERT INTO t1 VALUES (3, 42);
10 INSERT INTO t1 VALUES (4, 201);
11 ###############################################################################
12 # 2. Confirm default value on M1, M2
13 [connection server1]
14 include/assert.inc [write_concurrency is supposed to be 10 by default]
15 include/assert.inc [write_concurrency (10) should be 10]
16 [connection server2]
17 SET SESSION sql_log_bin = 0;
18 call mtr.add_suppression("Could not execute Write_rows event on table test.t2; Duplicate entry '11'*");
19 call mtr.add_suppression("The applier thread execution was aborted. Unable to process more transactions, this member will now leave the group.");
20 call mtr.add_suppression("Fatal error during execution on the Applier process of Group Replication. The server will now leave the group.");
21 call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
22 call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going.");
23 call mtr.add_suppression(".*Replica SQL for channel 'group_replication_applier': ... The replica coordinator and worker threads are stopped, possibly leaving data in inconsistent state*");
24 SET SESSION sql_log_bin = 1;
25 include/assert.inc [write_concurrency is supposed to be 10 by default]
26 include/assert.inc [write_concurrency (10) should be 10]
27 ###############################################################################
28 # 3. Increase write_concurrency via M1, confirm on M1, M2
29 [connection server1]
30 SELECT group_replication_set_write_concurrency(42);
31 group_replication_set_write_concurrency(42)
32 UDF is asynchronous, check log or call group_replication_get_write_concurrency().
33 include/assert.inc [write_concurrency (42) should be 42]
34 [connection server2]
35 include/assert.inc [write_concurrency (42) should be 42]
36 ###############################################################################
37 # 4. Decrease write_concurrency via M2, confirm on M1, M2
38 SELECT group_replication_set_write_concurrency(10);
39 group_replication_set_write_concurrency(10)
40 UDF is asynchronous, check log or call group_replication_get_write_concurrency().
41 include/assert.inc [write_concurrency (10) should be 10]
42 [connection server1]
43 include/assert.inc [write_concurrency (10) should be 10]
44 ###############################################################################
45 # 5. Confirm invalid calls to group_replication_get_write_concurrency
46 SELECT group_replication_get_write_concurrency(1);
47 ERROR HY000: Can't initialize function 'group_replication_get_write_concurrency'; UDF does not take arguments.
48 SELECT group_replication_get_write_concurrency(1.1);
49 ERROR HY000: Can't initialize function 'group_replication_get_write_concurrency'; UDF does not take arguments.
50 SELECT group_replication_get_write_concurrency("hehe");
51 ERROR HY000: Can't initialize function 'group_replication_get_write_concurrency'; UDF does not take arguments.
52 SELECT group_replication_get_write_concurrency(NULL);
53 ERROR HY000: Can't initialize function 'group_replication_get_write_concurrency'; UDF does not take arguments.
54 ###############################################################################
55 # 6. Confirm invalid calls to group_replication_set_write_concurrency
56 SELECT group_replication_set_write_concurrency();
57 ERROR HY000: Can't initialize function 'group_replication_set_write_concurrency'; UDF takes one integer argument.
58 SELECT group_replication_set_write_concurrency(NULL);
59 ERROR HY000: Can't initialize function 'group_replication_set_write_concurrency'; UDF takes one integer argument.
60 SELECT group_replication_set_write_concurrency(1.1);
61 ERROR HY000: Can't initialize function 'group_replication_set_write_concurrency'; UDF takes one integer argument.
62 SELECT group_replication_set_write_concurrency("hehe");
63 ERROR HY000: Can't initialize function 'group_replication_set_write_concurrency'; UDF takes one integer argument.
64 SELECT group_replication_set_write_concurrency(9);
65 ERROR HY000: Can't initialize function 'group_replication_set_write_concurrency'; Argument must be between 10 and 200.
66 SELECT group_replication_set_write_concurrency(4097);
67 ERROR HY000: Can't initialize function 'group_replication_set_write_concurrency'; Argument must be between 10 and 200.
68 SELECT group_replication_set_write_concurrency(v) FROM test.t1 WHERE i=1;
69 ERROR HY000: The function 'group_replication_set_write_concurrency' failed. UDF takes one integer argument.
70 SELECT group_replication_set_write_concurrency(v) FROM test.t1 WHERE i=2;
71 ERROR HY000: The function 'group_replication_set_write_concurrency' failed. Argument must be between 10 and 200.
72 SELECT group_replication_set_write_concurrency(v) FROM test.t1 WHERE i=3;
73 group_replication_set_write_concurrency(v)
74 UDF is asynchronous, check log or call group_replication_get_write_concurrency().
75 SELECT group_replication_set_write_concurrency(v) FROM test.t1 WHERE i=4;
76 ERROR HY000: The function 'group_replication_set_write_concurrency' failed. Argument must be between 10 and 200.
77 [connection server2]
78 include/stop_group_replication.inc
79 ###############################################################################
80 # 7. Check that it is not possible to modify/query write_concurrency value when server is in RECOVERING state.
81 [connection server2]
82 SET @@GLOBAL.DEBUG='+d,recovery_thread_wait_before_finish';
83 include/start_group_replication.inc
84 SELECT group_replication_set_write_concurrency(111);
85 ERROR HY000: Can't initialize function 'group_replication_set_write_concurrency'; Member must be ONLINE and in the majority partition.
86 SELECT group_replication_get_write_concurrency();
87 ERROR HY000: Can't initialize function 'group_replication_get_write_concurrency'; Member must be ONLINE and in the majority partition.
88 ###############################################################################
89 # 8. Check that it is not possible to update wc value when a member is in ERROR state.
90 [connection server2]
91 SET DEBUG_SYNC= "now WAIT_FOR signal.recovery_thread_wait_before_finish_reached";
92 SET @@GLOBAL.DEBUG='-d,recovery_thread_wait_before_finish';
93 SET DEBUG_SYNC= "now SIGNAL signal.recovery_end";
94 Wait until server2 becomes ONLINE
95 include/gr_wait_for_member_state.inc
96 SET DEBUG_SYNC= 'RESET';
97 CREATE TABLE t2 (a INT PRIMARY KEY);
98 include/rpl_sync.inc
99 [connection server2]
100 SET SESSION sql_log_bin=0;
101 INSERT INTO t2 values(11);
102 SET SESSION sql_log_bin=1;
103 [connection server1]
104 INSERT INTO t2 values(11);
105 [connection server2]
106 wait until server2 goes to ERROR state.
107 SELECT group_replication_set_write_concurrency(11);
108 ERROR HY000: Can't initialize function 'group_replication_set_write_concurrency'; Member must be ONLINE and in the majority partition.
109 SELECT group_replication_get_write_concurrency();
110 ERROR HY000: Can't initialize function 'group_replication_get_write_concurrency'; Member must be ONLINE and in the majority partition.
111 include/stop_group_replication.inc
112 SET SESSION sql_log_bin=0;
113 DELETE FROM t2;
114 SET SESSION sql_log_bin=1;
115 include/start_group_replication.inc
116 DROP TABLE t1;
117 DROP TABLE t2;
118 include/rpl_sync.inc
119 ###############################################################################
120 # 9. Stop GR and try to call group_replication_{get,set}_write_concurrency outside of a group
121 [connection server1]
122 include/group_replication_end.inc
123 SELECT group_replication_get_write_concurrency();
124 ERROR HY000: Can't initialize function 'group_replication_get_write_concurrency'; Member must be ONLINE and in the majority partition.
125 SELECT group_replication_set_write_concurrency(10);
126 ERROR HY000: Can't initialize function 'group_replication_set_write_concurrency'; Member must be ONLINE and in the majority partition.