| 1 |
# Displaying default value |
| 2 |
SELECT COUNT(@@GLOBAL.have_statement_timeout); |
| 3 |
COUNT(@@GLOBAL.have_statement_timeout) |
| 4 |
1 |
| 5 |
1 Expected |
| 6 |
# Check if Value can set |
| 7 |
SET @@GLOBAL.have_statement_timeout=1; |
| 8 |
ERROR HY000: Variable 'have_statement_timeout' is a read only variable |
| 9 |
Expected error 'Read only variable' |
| 10 |
SELECT COUNT(@@GLOBAL.have_statement_timeout); |
| 11 |
COUNT(@@GLOBAL.have_statement_timeout) |
| 12 |
1 |
| 13 |
1 Expected |
| 14 |
# Check if the value in GLOBAL Table matches value in variable |
| 15 |
SELECT @@GLOBAL.have_statement_timeout = VARIABLE_VALUE |
| 16 |
FROM performance_schema.global_variables |
| 17 |
WHERE VARIABLE_NAME='have_statement_timeout'; |
| 18 |
@@GLOBAL.have_statement_timeout = VARIABLE_VALUE |
| 19 |
1 |
| 20 |
1 Expected |
| 21 |
SELECT COUNT(@@GLOBAL.have_statement_timeout); |
| 22 |
COUNT(@@GLOBAL.have_statement_timeout) |
| 23 |
1 |
| 24 |
1 Expected |
| 25 |
SELECT COUNT(VARIABLE_VALUE) |
| 26 |
FROM performance_schema.global_variables |
| 27 |
WHERE VARIABLE_NAME='have_statement_timeout'; |
| 28 |
COUNT(VARIABLE_VALUE) |
| 29 |
1 |
| 30 |
1 Expected |
| 31 |
# Check if accessing variable with and without GLOBAL point to same variable |
| 32 |
SELECT @@have_statement_timeout = @@GLOBAL.have_statement_timeout; |
| 33 |
@@have_statement_timeout = @@GLOBAL.have_statement_timeout |
| 34 |
1 |
| 35 |
1 Expected |
| 36 |
# Check if have_statement_timeout can be accessed with and without @@ sign |
| 37 |
SELECT COUNT(@@have_statement_timeout); |
| 38 |
COUNT(@@have_statement_timeout) |
| 39 |
1 |
| 40 |
1 Expected |
| 41 |
SELECT COUNT(@@local.have_statement_timeout); |
| 42 |
ERROR HY000: Variable 'have_statement_timeout' is a GLOBAL variable |
| 43 |
Expected error 'Variable is a GLOBAL variable' |
| 44 |
SELECT COUNT(@@SESSION.have_statement_timeout); |
| 45 |
ERROR HY000: Variable 'have_statement_timeout' is a GLOBAL variable |
| 46 |
Expected error 'Variable is a GLOBAL variable' |
| 47 |
SELECT COUNT(@@GLOBAL.have_statement_timeout); |
| 48 |
COUNT(@@GLOBAL.have_statement_timeout) |
| 49 |
1 |
| 50 |
1 Expected |
| 51 |
SELECT have_statement_timeout; |
| 52 |
ERROR 42S22: Unknown column 'have_statement_timeout' in 'field list' |
| 53 |
Expected error 'Unknown column' |