| 1 |
SET @global_start_value = @@global.time_zone; |
| 2 |
SELECT @global_start_value; |
| 3 |
@global_start_value |
| 4 |
SYSTEM |
| 5 |
SET @session_start_value = @@session.time_zone; |
| 6 |
SELECT @session_start_value; |
| 7 |
@session_start_value |
| 8 |
SYSTEM |
| 9 |
'#--------------------FN_DYNVARS_001_01------------------------#' |
| 10 |
SET @@time_zone = "+02:00"; |
| 11 |
SET @@time_zone = DEFAULT; |
| 12 |
SELECT @@time_zone; |
| 13 |
@@time_zone |
| 14 |
SYSTEM |
| 15 |
SET @@global.time_zone = "-00:30"; |
| 16 |
SET @@global.time_zone = DEFAULT; |
| 17 |
SELECT @@global.time_zone; |
| 18 |
@@global.time_zone |
| 19 |
SYSTEM |
| 20 |
'#---------------------FN_DYNVARS_001_02-------------------------#' |
| 21 |
SET @@session.time_zone = "+02:00"; |
| 22 |
SELECT @@session.time_zone; |
| 23 |
@@session.time_zone |
| 24 |
+02:00 |
| 25 |
SET @@global.time_zone = "+05:00"; |
| 26 |
SELECT @@global.time_zone; |
| 27 |
@@global.time_zone |
| 28 |
+05:00 |
| 29 |
SELECT @@session.time_zone AS res_is_02_00; |
| 30 |
res_is_02_00 |
| 31 |
+02:00 |
| 32 |
SET @@session.time_zone = "-02:00"; |
| 33 |
SELECT @@session.time_zone; |
| 34 |
@@session.time_zone |
| 35 |
-02:00 |
| 36 |
SELECT @@global.time_zone AS res_is_05_00; |
| 37 |
res_is_05_00 |
| 38 |
+05:00 |
| 39 |
SELECT @@global.time_zone=@@session.time_zone AS res_is_false; |
| 40 |
res_is_false |
| 41 |
0 |
| 42 |
'#--------------------FN_DYNVARS_001_03------------------------#' |
| 43 |
SET @@time_zone = "+14:00"; |
| 44 |
SELECT @@time_zone; |
| 45 |
@@time_zone |
| 46 |
+14:00 |
| 47 |
SET @@time_zone = "-12:00"; |
| 48 |
SELECT @@time_zone; |
| 49 |
@@time_zone |
| 50 |
-12:00 |
| 51 |
SET @@time_zone = "+12:59"; |
| 52 |
SELECT @@time_zone; |
| 53 |
@@time_zone |
| 54 |
+12:59 |
| 55 |
SET @@time_zone = "-11:30"; |
| 56 |
SELECT @@time_zone; |
| 57 |
@@time_zone |
| 58 |
-11:30 |
| 59 |
SET @@time_zone = "+00:00"; |
| 60 |
SELECT @@time_zone; |
| 61 |
@@time_zone |
| 62 |
+00:00 |
| 63 |
SET @@time_zone = "-12:59"; |
| 64 |
SELECT @@time_zone; |
| 65 |
@@time_zone |
| 66 |
-12:59 |
| 67 |
SET @@time_zone = "-00:00"; |
| 68 |
SELECT @@time_zone; |
| 69 |
@@time_zone |
| 70 |
+00:00 |
| 71 |
SET @@time_zone = "+10:00"; |
| 72 |
SELECT @@time_zone; |
| 73 |
@@time_zone |
| 74 |
+10:00 |
| 75 |
SET @@time_zone = "+0:0"; |
| 76 |
SELECT @@time_zone; |
| 77 |
@@time_zone |
| 78 |
+00:00 |
| 79 |
SET @@time_zone = "-10:00"; |
| 80 |
SELECT @@time_zone; |
| 81 |
@@time_zone |
| 82 |
-10:00 |
| 83 |
SET @@time_zone = "+2:00"; |
| 84 |
SELECT @@time_zone; |
| 85 |
@@time_zone |
| 86 |
+02:00 |
| 87 |
SET @@global.time_zone = "+14:00"; |
| 88 |
SELECT @@global.time_zone; |
| 89 |
@@global.time_zone |
| 90 |
+14:00 |
| 91 |
SET @@global.time_zone = "-12:00"; |
| 92 |
SELECT @@global.time_zone; |
| 93 |
@@global.time_zone |
| 94 |
-12:00 |
| 95 |
SET @@global.time_zone = "+12:59"; |
| 96 |
SELECT @@global.time_zone; |
| 97 |
@@global.time_zone |
| 98 |
+12:59 |
| 99 |
SET @@global.time_zone = "-11:30"; |
| 100 |
SELECT @@global.time_zone; |
| 101 |
@@global.time_zone |
| 102 |
-11:30 |
| 103 |
SET @@global.time_zone = "+00:00"; |
| 104 |
SELECT @@global.time_zone; |
| 105 |
@@global.time_zone |
| 106 |
+00:00 |
| 107 |
SET @@global.time_zone = "-12:59"; |
| 108 |
SELECT @@global.time_zone; |
| 109 |
@@global.time_zone |
| 110 |
-12:59 |
| 111 |
SET @@global.time_zone = "-00:00"; |
| 112 |
SELECT @@global.time_zone; |
| 113 |
@@global.time_zone |
| 114 |
+00:00 |
| 115 |
SET @@global.time_zone = "+10:00"; |
| 116 |
SELECT @@global.time_zone; |
| 117 |
@@global.time_zone |
| 118 |
+10:00 |
| 119 |
SET @@global.time_zone = "+0:0"; |
| 120 |
SELECT @@global.time_zone; |
| 121 |
@@global.time_zone |
| 122 |
+00:00 |
| 123 |
SET @@global.time_zone = "-10:00"; |
| 124 |
SELECT @@global.time_zone; |
| 125 |
@@global.time_zone |
| 126 |
-10:00 |
| 127 |
SET @@global.time_zone = "+2:00"; |
| 128 |
SELECT @@global.time_zone; |
| 129 |
@@global.time_zone |
| 130 |
+02:00 |
| 131 |
'#--------------------FN_DYNVARS_001_04-------------------------#' |
| 132 |
SET @@time_zone = "+24:00"; |
| 133 |
ERROR HY000: Unknown or incorrect time zone: '+24:00' |
| 134 |
SET @@time_zone = "+23:59"; |
| 135 |
ERROR HY000: Unknown or incorrect time zone: '+23:59' |
| 136 |
SET @@time_zone = "+14:01"; |
| 137 |
ERROR HY000: Unknown or incorrect time zone: '+14:01' |
| 138 |
SET @@time_zone = "-14:01"; |
| 139 |
ERROR HY000: Unknown or incorrect time zone: '-14:01' |
| 140 |
SET @@global.time_zone = "+24:00"; |
| 141 |
ERROR HY000: Unknown or incorrect time zone: '+24:00' |
| 142 |
SET @@global.time_zone = "+23:59"; |
| 143 |
ERROR HY000: Unknown or incorrect time zone: '+23:59' |
| 144 |
SET @@global.time_zone = "+14:01"; |
| 145 |
ERROR HY000: Unknown or incorrect time zone: '+14:01' |
| 146 |
SET @@global.time_zone = "-14:01"; |
| 147 |
ERROR HY000: Unknown or incorrect time zone: '-14:01' |
| 148 |
'#-------------------FN_DYNVARS_001_05----------------------------#' |
| 149 |
SET @@global.time_zone = 'SYSTEM'; |
| 150 |
SELECT @@global.time_zone; |
| 151 |
@@global.time_zone |
| 152 |
SYSTEM |
| 153 |
SET @@time_zone = 'SYSTEM'; |
| 154 |
SELECT @@time_zone; |
| 155 |
@@time_zone |
| 156 |
SYSTEM |
| 157 |
'#----------------------FN_DYNVARS_001_06------------------------#' |
| 158 |
SELECT @@time_zone = VARIABLE_VALUE |
| 159 |
FROM performance_schema.session_variables |
| 160 |
WHERE VARIABLE_NAME='time_zone'; |
| 161 |
@@time_zone = VARIABLE_VALUE |
| 162 |
1 |
| 163 |
'#----------------------FN_DYNVARS_001_07------------------------#' |
| 164 |
SELECT @@global.time_zone = VARIABLE_VALUE |
| 165 |
FROM performance_schema.global_variables |
| 166 |
WHERE VARIABLE_NAME='time_zone'; |
| 167 |
@@global.time_zone = VARIABLE_VALUE |
| 168 |
1 |
| 169 |
'#---------------------FN_DYNVARS_001_08-------------------------#' |
| 170 |
SET @@time_zone = OFF; |
| 171 |
ERROR HY000: Unknown or incorrect time zone: 'OFF' |
| 172 |
SET @@time_zone = ON; |
| 173 |
ERROR HY000: Unknown or incorrect time zone: 'ON' |
| 174 |
SET @@time_zone = TRUE; |
| 175 |
ERROR 42000: Incorrect argument type to variable 'time_zone' |
| 176 |
SET @@time_zone = FALSE; |
| 177 |
ERROR 42000: Incorrect argument type to variable 'time_zone' |
| 178 |
SET @@global.time_zone = OFF; |
| 179 |
ERROR HY000: Unknown or incorrect time zone: 'OFF' |
| 180 |
SET @@global.time_zone = ON; |
| 181 |
ERROR HY000: Unknown or incorrect time zone: 'ON' |
| 182 |
SET @@global.time_zone = TRUE; |
| 183 |
ERROR 42000: Incorrect argument type to variable 'time_zone' |
| 184 |
SET @@global.time_zone = FALSE; |
| 185 |
ERROR 42000: Incorrect argument type to variable 'time_zone' |
| 186 |
'#---------------------FN_DYNVARS_001_09----------------------#' |
| 187 |
SET @@time_zone = 1; |
| 188 |
ERROR 42000: Incorrect argument type to variable 'time_zone' |
| 189 |
SET @@time_zone = +0200; |
| 190 |
ERROR 42000: Incorrect argument type to variable 'time_zone' |
| 191 |
SET @@time_zone = GMT+; |
| 192 |
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 |
| 193 |
SET @@time_zone = ""; |
| 194 |
ERROR HY000: Unknown or incorrect time zone: '' |
| 195 |
SET @@global.time_zone = 1; |
| 196 |
ERROR 42000: Incorrect argument type to variable 'time_zone' |
| 197 |
SET @@global.time_zone = +0200; |
| 198 |
ERROR 42000: Incorrect argument type to variable 'time_zone' |
| 199 |
SET @@global.time_zone = GMT+; |
| 200 |
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 |
| 201 |
SET @@global.time_zone = ""; |
| 202 |
ERROR HY000: Unknown or incorrect time zone: '' |
| 203 |
'#---------------------FN_DYNVARS_001_10----------------------#' |
| 204 |
SET @@time_zone = '+02:30'; |
| 205 |
SELECT @@time_zone = @@local.time_zone and @@time_zone = @@session.time_zone; |
| 206 |
@@time_zone = @@local.time_zone and @@time_zone = @@session.time_zone |
| 207 |
1 |
| 208 |
SET @@time_zone = '-01:30'; |
| 209 |
SELECT @@time_zone = @@local.time_zone and @@time_zone = @@session.time_zone; |
| 210 |
@@time_zone = @@local.time_zone and @@time_zone = @@session.time_zone |
| 211 |
1 |
| 212 |
'#---------------------FN_DYNVARS_001_11----------------------#' |
| 213 |
SET time_zone = "+01:00"; |
| 214 |
SELECT @@time_zone; |
| 215 |
@@time_zone |
| 216 |
+01:00 |
| 217 |
SELECT local.time_zone; |
| 218 |
ERROR 42S02: Unknown table 'local' in field list |
| 219 |
SELECT session.time_zone; |
| 220 |
ERROR 42S02: Unknown table 'session' in field list |
| 221 |
SELECT time_zone = @@session.time_zone; |
| 222 |
ERROR 42S22: Unknown column 'time_zone' in 'field list' |
| 223 |
SET @@time_zone = @session_start_value; |
| 224 |
SELECT @@time_zone; |
| 225 |
@@time_zone |
| 226 |
SYSTEM |
| 227 |
SET @@global.time_zone = @global_start_value; |
| 228 |
SELECT @@global.time_zone; |
| 229 |
@@global.time_zone |
| 230 |
SYSTEM |