blob: cd0d545f80e7131c03229185eabf2900d6a76fe6 (
plain)
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
|
--source include/have_wsrep.inc
--echo #
--echo # wsrep_sync_wait
--echo #
--echo # save the initial values
SET @wsrep_sync_wait_global_saved = @@global.wsrep_sync_wait;
SET @wsrep_sync_wait_session_saved = @@session.wsrep_sync_wait;
--echo # default
SELECT @@global.wsrep_sync_wait;
SELECT @@session.wsrep_sync_wait;
--echo
--echo # scope and valid values
SET @@global.wsrep_sync_wait=0;
SELECT @@global.wsrep_sync_wait;
SET @@global.wsrep_sync_wait=7;
SELECT @@global.wsrep_sync_wait;
SET @@session.wsrep_sync_wait=0;
SELECT @@session.wsrep_sync_wait;
SET @@session.wsrep_sync_wait=7;
SELECT @@session.wsrep_sync_wait;
SET @@session.wsrep_sync_wait=default;
SELECT @@session.wsrep_sync_wait;
SET @@session.wsrep_sync_wait=8;
SELECT @@session.wsrep_sync_wait;
--echo
--echo # invalid values
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_sync_wait=NULL;
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_sync_wait='junk';
--error ER_WRONG_TYPE_FOR_VAR
SET @@session.wsrep_sync_wait=NULL;
--error ER_WRONG_TYPE_FOR_VAR
SET @@session.wsrep_sync_wait='junk';
--echo
--echo # restore the initial values
SET @@global.wsrep_sync_wait = @wsrep_sync_wait_global_saved;
SET @@session.wsrep_sync_wait = @wsrep_sync_wait_session_saved;
--echo # End of test
|