Debian Codegraph @

mysql-test/suite/galera/t/galera_var_max_ws_size.test

raw
1 #
2 # This test sets wsrep_max_ws_size to a very low value and checks that the transaction is rejected
3 #
4
5 --source include/galera_cluster.inc
6 --source include/have_innodb.inc
7
8 --connection node_1
9
10 CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 VARCHAR(1024)) Engine=InnoDB;
11
12 --let $wsrep_max_ws_size_orig = `SELECT @@wsrep_max_ws_size`
13 SET GLOBAL wsrep_max_ws_size = 1024;
14
15 --error ER_UNKNOWN_ERROR
16 INSERT INTO t1 VALUES (DEFAULT, REPEAT('X', 1024));
17 SELECT COUNT(*) = 0 FROM t1;
18
19 #
20 # Changing repl.max_ws_size also changes wsrep_max_ws_size
21 #
22
23 SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=10000';
24 SELECT @@wsrep_max_ws_size = 10000;
25
26
27 #
28 # Changing wsrep_max_ws_size is equivalent to changing repl.max_ws_size
29 #
30
31 SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=20000';
32 --let $provider_options = `SELECT @@wsrep_provider_options`
33 SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=10000';
34
35 SET GLOBAL wsrep_max_ws_size = 20000;
36 --let $provider_options_updated = `SELECT @@wsrep_provider_options`
37
38 --disable_query_log
39 --eval SELECT STRCMP('$provider_options', '$provider_options_updated') = 0 AS provider_options_match
40 --enable_query_log
41
42 --disable_query_log
43 --eval SET GLOBAL wsrep_max_ws_size = $wsrep_max_ws_size_orig
44 --enable_query_log
45
46 DROP TABLE t1;