| 1 |
# |
| 2 |
# wsrep_retry_autocommit |
| 3 |
# |
| 4 |
# save the initial values |
| 5 |
SET @wsrep_retry_autocommit_global_saved = @@global.wsrep_retry_autocommit; |
| 6 |
SET @wsrep_retry_autocommit_session_saved = @@session.wsrep_retry_autocommit; |
| 7 |
# default |
| 8 |
SELECT @@global.wsrep_retry_autocommit; |
| 9 |
@@global.wsrep_retry_autocommit |
| 10 |
1 |
| 11 |
|
| 12 |
# scope |
| 13 |
SET @@session.wsrep_retry_autocommit=1; |
| 14 |
SELECT @@session.wsrep_retry_autocommit; |
| 15 |
@@session.wsrep_retry_autocommit |
| 16 |
1 |
| 17 |
SET @@global.wsrep_retry_autocommit=1; |
| 18 |
SELECT @@global.wsrep_retry_autocommit; |
| 19 |
@@global.wsrep_retry_autocommit |
| 20 |
1 |
| 21 |
|
| 22 |
# valid values |
| 23 |
SET @@global.wsrep_retry_autocommit=10; |
| 24 |
SELECT @@global.wsrep_retry_autocommit; |
| 25 |
@@global.wsrep_retry_autocommit |
| 26 |
10 |
| 27 |
SET @@global.wsrep_retry_autocommit=0; |
| 28 |
SELECT @@global.wsrep_retry_autocommit; |
| 29 |
@@global.wsrep_retry_autocommit |
| 30 |
0 |
| 31 |
SET @@global.wsrep_retry_autocommit=default; |
| 32 |
SELECT @global.wsrep_retry_autocommit; |
| 33 |
@global.wsrep_retry_autocommit |
| 34 |
NULL |
| 35 |
SET @@session.wsrep_retry_autocommit=10; |
| 36 |
SELECT @@session.wsrep_retry_autocommit; |
| 37 |
@@session.wsrep_retry_autocommit |
| 38 |
10 |
| 39 |
SET @@session.wsrep_retry_autocommit=0; |
| 40 |
SELECT @@session.wsrep_retry_autocommit; |
| 41 |
@@session.wsrep_retry_autocommit |
| 42 |
0 |
| 43 |
SET @@session.wsrep_retry_autocommit=default; |
| 44 |
SELECT @session.wsrep_retry_autocommit; |
| 45 |
@session.wsrep_retry_autocommit |
| 46 |
NULL |
| 47 |
|
| 48 |
# invalid values |
| 49 |
SET @@global.wsrep_retry_autocommit=NULL; |
| 50 |
ERROR 42000: Incorrect argument type to variable 'wsrep_retry_autocommit' |
| 51 |
SET @@global.wsrep_retry_autocommit='junk'; |
| 52 |
ERROR 42000: Incorrect argument type to variable 'wsrep_retry_autocommit' |
| 53 |
SET @@global.wsrep_retry_autocommit=-1; |
| 54 |
Warnings: |
| 55 |
Warning 1292 Truncated incorrect wsrep_retry_autocommit value: '-1' |
| 56 |
SELECT @global.wsrep_retry_autocommit; |
| 57 |
@global.wsrep_retry_autocommit |
| 58 |
NULL |
| 59 |
|
| 60 |
# restore the initial value |
| 61 |
SET @@global.wsrep_retry_autocommit = @wsrep_retry_autocommit_global_saved; |
| 62 |
SET @@session.wsrep_retry_autocommit = @wsrep_retry_autocommit_session_saved; |
| 63 |
# End of test |