1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#
# wsrep_max_ws_rows
#
# save the initial value
SET @wsrep_max_ws_rows_global_saved = @@global.wsrep_max_ws_rows;
# default
SELECT @@global.wsrep_max_ws_rows;
@@global.wsrep_max_ws_rows
0
# scope
SELECT @@session.wsrep_max_ws_rows;
ERROR HY000: Variable 'wsrep_max_ws_rows' is a GLOBAL variable
SET @@global.wsrep_max_ws_rows=1;
SELECT @@global.wsrep_max_ws_rows;
@@global.wsrep_max_ws_rows
1
# valid values
SET @@global.wsrep_max_ws_rows=131072;
SELECT @@global.wsrep_max_ws_rows;
@@global.wsrep_max_ws_rows
131072
SET @@global.wsrep_max_ws_rows=131073;
SELECT @@global.wsrep_max_ws_rows;
@@global.wsrep_max_ws_rows
131073
SET @@global.wsrep_max_ws_rows=0;
SELECT @@global.wsrep_max_ws_rows;
@@global.wsrep_max_ws_rows
0
SET @@global.wsrep_max_ws_rows=default;
SELECT @global.wsrep_max_ws_rows;
@global.wsrep_max_ws_rows
NULL
# invalid values
SET @@global.wsrep_max_ws_rows=NULL;
ERROR 42000: Incorrect argument type to variable 'wsrep_max_ws_rows'
SET @@global.wsrep_max_ws_rows='junk';
ERROR 42000: Incorrect argument type to variable 'wsrep_max_ws_rows'
SET @@global.wsrep_max_ws_rows=-1;
Warnings:
Warning 1292 Truncated incorrect wsrep_max_ws_rows value: '-1'
SELECT @global.wsrep_max_ws_rows;
@global.wsrep_max_ws_rows
NULL
# restore the initial value
SET @@global.wsrep_max_ws_rows = @wsrep_max_ws_rows_global_saved;
# End of test
|