| 1 |
# Display the DEFAULT value of information_schema_stats_expiry |
| 2 |
|
| 3 |
SET @@global.information_schema_stats_expiry = DEFAULT; |
| 4 |
SELECT @@global.information_schema_stats_expiry; |
| 5 |
|
| 6 |
SET @@session.information_schema_stats_expiry = DEFAULT; |
| 7 |
SELECT @@session.information_schema_stats_expiry; |
| 8 |
|
| 9 |
|
| 10 |
# Test the variable with different valid and invalid values |
| 11 |
SET @@global.information_schema_stats_expiry= 0; |
| 12 |
SELECT @@global.information_schema_stats_expiry; |
| 13 |
|
| 14 |
SET @@global.information_schema_stats_expiry = 31536000; |
| 15 |
SELECT @@global.information_schema_stats_expiry; |
| 16 |
|
| 17 |
SET @@session.information_schema_stats_expiry =6000; |
| 18 |
SELECT @@session.information_schema_stats_expiry; |
| 19 |
|
| 20 |
SET @@global.information_schema_stats_expiry = 0; |
| 21 |
SELECT @@global.information_schema_stats_expiry; |
| 22 |
|
| 23 |
|
| 24 |
SET @@global.information_schema_stats_expiry = -1024; |
| 25 |
SELECT @@global.information_schema_stats_expiry; |
| 26 |
SET @@global.information_schema_stats_expiry = 123456789031; |
| 27 |
SELECT @@global.information_schema_stats_expiry; |
| 28 |
SET @@global.information_schema_stats_expiry = 31536003; |
| 29 |
SELECT @@global.information_schema_stats_expiry; |
| 30 |
|
| 31 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 32 |
SET @@global.information_schema_stats_expiry = ' '; |
| 33 |
SELECT @@global.information_schema_stats_expiry; |
| 34 |
|
| 35 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 36 |
SET @@global.information_schema_stats_expiry = ON; |
| 37 |
|
| 38 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 39 |
SET @@global.information_schema_stats_expiry = OFF; |
| 40 |
|
| 41 |
SET @@global.information_schema_stats_expiry = True; |
| 42 |
SELECT @@global.information_schema_stats_expiry; |
| 43 |
|
| 44 |
SET @@global.information_schema_stats_expiry = False; |
| 45 |
SELECT @@global.information_schema_stats_expiry; |
| 46 |
|
| 47 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 48 |
SET @@global.information_schema_stats_expiry = 65530.34; |
| 49 |
SELECT @@global.information_schema_stats_expiry; |
| 50 |
|
| 51 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 52 |
SET @@global.information_schema_stats_expiry ="Test"; |
| 53 |
|
| 54 |
|
| 55 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 56 |
SET @@session.information_schema_stats_expiry = ON; |
| 57 |
|
| 58 |
|
| 59 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 60 |
SET @@session.information_schema_stats_expiry = OFF; |
| 61 |
|
| 62 |
SET @@session.information_schema_stats_expiry = True; |
| 63 |
SELECT @@session.information_schema_stats_expiry; |
| 64 |
|
| 65 |
SET @@session.information_schema_stats_expiry = False; |
| 66 |
SELECT @@session.information_schema_stats_expiry; |
| 67 |
|
| 68 |
|
| 69 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 70 |
SET @@session.information_schema_stats_expiry = "Test"; |
| 71 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 72 |
SET @@session.information_schema_stats_expiry = 65530.34; |
| 73 |
SELECT @@session.information_schema_stats_expiry; |
| 74 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 75 |
SET @@session.information_schema_stats_expiry = 'test'; |
| 76 |
SET @@session.information_schema_stats_expiry = 0; |
| 77 |
SELECT @@session.information_schema_stats_expiry; |
| 78 |
--Error ER_WRONG_TYPE_FOR_VAR |
| 79 |
SET @@session.information_schema_stats_expiry = ' '; |
| 80 |
SELECT @@session.information_schema_stats_expiry; |
| 81 |
|
| 82 |
|
| 83 |
# Check if global and session variable are independent of each other |
| 84 |
|
| 85 |
SET @@global.information_schema_stats_expiry = 30000; |
| 86 |
SET @@global.information_schema_stats_expiry = 40000; |
| 87 |
SELECT @@information_schema_stats_expiry = @@global.information_schema_stats_expiry; |
| 88 |
|
| 89 |
# Check if accessing variable with SESSION,LOCAL and without SCOPE |
| 90 |
# points to same session variable |
| 91 |
|
| 92 |
SET @@information_schema_stats_expiry = 100; |
| 93 |
SELECT @@information_schema_stats_expiry = @@local.information_schema_stats_expiry; |
| 94 |
SELECT @@local.information_schema_stats_expiry = @@session.information_schema_stats_expiry; |
| 95 |
|
| 96 |
SET @@global.information_schema_stats_expiry = default; |
| 97 |
SET @@session.information_schema_stats_expiry = default; |