| 1 |
# |
| 2 |
# performance_schema_max_digest_sample_age |
| 3 |
# |
| 4 |
|
| 5 |
|
| 6 |
SET @global_start_value = @@global.performance_schema_max_digest_sample_age; |
| 7 |
SELECT @global_start_value; |
| 8 |
|
| 9 |
--echo # |
| 10 |
--echo # Default value |
| 11 |
--echo # |
| 12 |
|
| 13 |
SET @@global.performance_schema_max_digest_sample_age = 1; |
| 14 |
SET @@global.performance_schema_max_digest_sample_age = DEFAULT; |
| 15 |
SELECT @@global.performance_schema_max_digest_sample_age; |
| 16 |
|
| 17 |
--echo |
| 18 |
--echo # Check if performance_schema_max_digest_sample_age can be accessed with and without @@ |
| 19 |
--echo |
| 20 |
--Error ER_GLOBAL_VARIABLE |
| 21 |
SET performance_schema_max_digest_sample_age = 1; |
| 22 |
SELECT @@performance_schema_max_digest_sample_age; |
| 23 |
|
| 24 |
--Error ER_UNKNOWN_TABLE |
| 25 |
SELECT local.performance_schema_max_digest_sample_age; |
| 26 |
|
| 27 |
SET global performance_schema_max_digest_sample_age = 1; |
| 28 |
SELECT @@global.performance_schema_max_digest_sample_age; |
| 29 |
|
| 30 |
--echo |
| 31 |
--echo # Change the value of performance_schema_max_digest_sample_age to a valid value |
| 32 |
--echo |
| 33 |
SET @@global.performance_schema_max_digest_sample_age = 1; |
| 34 |
SELECT @@global.performance_schema_max_digest_sample_age; |
| 35 |
SET @@global.performance_schema_max_digest_sample_age = 5000; |
| 36 |
SELECT @@global.performance_schema_max_digest_sample_age; |
| 37 |
SET @@global.performance_schema_max_digest_sample_age = 1048576; |
| 38 |
SELECT @@global.performance_schema_max_digest_sample_age; |
| 39 |
|
| 40 |
--echo |
| 41 |
--echo # Change the value of performance_schema_max_digest_sample_age to invalid value |
| 42 |
--echo |
| 43 |
SET @@global.performance_schema_max_digest_sample_age = 0; |
| 44 |
SELECT @@global.performance_schema_max_digest_sample_age; |
| 45 |
|
| 46 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 47 |
SET @@global.performance_schema_max_digest_sample_age = "T"; |
| 48 |
SELECT @@global.performance_schema_max_digest_sample_age; |
| 49 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 50 |
SET @@global.performance_schema_max_digest_sample_age = 'Y'; |
| 51 |
SELECT @@global.performance_schema_max_digest_sample_age; |
| 52 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 53 |
SET @@global.performance_schema_max_digest_sample_age = ' '; |
| 54 |
SELECT @@global.performance_schema_max_digest_sample_age; |
| 55 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 56 |
SET @@global.performance_schema_max_digest_sample_age = " "; |
| 57 |
SELECT @@global.performance_schema_max_digest_sample_age; |
| 58 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 59 |
SET @@global.performance_schema_max_digest_sample_age = 1.1; |
| 60 |
SELECT @@global.performance_schema_max_digest_sample_age; |
| 61 |
|
| 62 |
SET @@global.performance_schema_max_digest_sample_age = 1048577; |
| 63 |
SELECT @@global.performance_schema_max_digest_sample_age; |
| 64 |
|
| 65 |
--echo |
| 66 |
--echo # Check if the value in GLOBAL Table matches value in variable |
| 67 |
--echo |
| 68 |
|
| 69 |
--disable_warnings |
| 70 |
SELECT @@global.performance_schema_max_digest_sample_age = |
| 71 |
VARIABLE_VALUE FROM performance_schema.global_variables |
| 72 |
WHERE VARIABLE_NAME='performance_schema_max_digest_sample_age'; |
| 73 |
--enable_warnings |
| 74 |
SELECT @@global.performance_schema_max_digest_sample_age; |
| 75 |
--disable_warnings |
| 76 |
SELECT VARIABLE_VALUE FROM performance_schema.global_variables |
| 77 |
WHERE VARIABLE_NAME='performance_schema_max_digest_sample_age'; |
| 78 |
--enable_warnings |
| 79 |
|
| 80 |
--echo |
| 81 |
--echo # Check if ON and OFF values can be used on variable |
| 82 |
--echo |
| 83 |
|
| 84 |
--ERROR ER_WRONG_TYPE_FOR_VAR |
| 85 |
SET @@global.performance_schema_max_digest_sample_age = OFF; |
| 86 |
SELECT @@global.performance_schema_max_digest_sample_age; |
| 87 |
|
| 88 |
--ERROR ER_WRONG_TYPE_FOR_VAR |
| 89 |
SET @@global.performance_schema_max_digest_sample_age = ON; |
| 90 |
SELECT @@global.performance_schema_max_digest_sample_age; |
| 91 |
|
| 92 |
--echo |
| 93 |
--echo # Check if TRUE and FALSE values can be used on variable |
| 94 |
--echo |
| 95 |
SET @@global.performance_schema_max_digest_sample_age = TRUE; |
| 96 |
SELECT @@global.performance_schema_max_digest_sample_age; |
| 97 |
SET @@global.performance_schema_max_digest_sample_age = FALSE; |
| 98 |
SELECT @@global.performance_schema_max_digest_sample_age; |
| 99 |
|
| 100 |
--echo |
| 101 |
--echo # Restore initial value |
| 102 |
--echo |
| 103 |
SET @@global.performance_schema_max_digest_sample_age = @global_start_value; |
| 104 |
SELECT @@global.performance_schema_max_digest_sample_age; |
| 105 |
|