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