| 1 |
|
| 2 |
# |
| 3 |
# Display default value |
| 4 |
# |
| 5 |
select @@global.performance_schema_max_statement_stack; |
| 6 |
|
| 7 |
# |
| 8 |
# Only global |
| 9 |
# |
| 10 |
|
| 11 |
select @@global.performance_schema_max_statement_stack; |
| 12 |
|
| 13 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 14 |
select @@session.performance_schema_max_statement_stack; |
| 15 |
|
| 16 |
show global variables like 'performance_schema_max_statement_stack'; |
| 17 |
|
| 18 |
show session variables like 'performance_schema_max_statement_stack'; |
| 19 |
|
| 20 |
--disable_warnings |
| 21 |
select * from performance_schema.global_variables |
| 22 |
where variable_name='performance_schema_max_statement_stack'; |
| 23 |
|
| 24 |
select * from performance_schema.session_variables |
| 25 |
where variable_name='performance_schema_max_statement_stack'; |
| 26 |
--enable_warnings |
| 27 |
|
| 28 |
# |
| 29 |
# Read-only |
| 30 |
# |
| 31 |
|
| 32 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 33 |
set global performance_schema_max_statement_stack=1; |
| 34 |
|
| 35 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 36 |
set session performance_schema_max_statement_stack=1; |
| 37 |
|
| 38 |
# |
| 39 |
# Check if the value in GLOBAL Table matches value in variable |
| 40 |
# |
| 41 |
|
| 42 |
--disable_warnings |
| 43 |
SELECT @@GLOBAL.performance_schema_max_statement_stack = VARIABLE_VALUE |
| 44 |
FROM performance_schema.global_variables |
| 45 |
WHERE VARIABLE_NAME='performance_schema_max_statement_stack'; |
| 46 |
--enable_warnings |
| 47 |
|
| 48 |
select @@global.performance_schema_max_statement_stack; |
| 49 |
|
| 50 |
--disable_warnings |
| 51 |
select * from performance_schema.global_variables |
| 52 |
where variable_name='performance_schema_max_statement_stack'; |
| 53 |
--enable_warnings |
| 54 |
|
| 55 |
# |
| 56 |
# Check if accessing variable with and without GLOBAL point to same variable |
| 57 |
# |
| 58 |
|
| 59 |
SELECT @@performance_schema_max_statement_stack = @@GLOBAL.performance_schema_max_statement_stack; |
| 60 |
|