1
SELECT @@global.avoid_temporal_upgrade;
2
@@global.avoid_temporal_upgrade
5
Warning 1287 '@@avoid_temporal_upgrade' is deprecated and will be removed in a future release.
6
SHOW GLOBAL VARIABLES LIKE 'avoid_temporal_upgrade';
8
avoid_temporal_upgrade OFF
9
SELECT * FROM information_schema.global_variables WHERE variable_name='avoid_temporal_upgrade';
10
VARIABLE_NAME VARIABLE_VALUE
11
AVOID_TEMPORAL_UPGRADE OFF
12
#It is not a session variable.
13
SELECT @@session.avoid_temporal_upgrade;
14
ERROR HY000: Variable 'avoid_temporal_upgrade' is a GLOBAL variable
15
SHOW SESSION VARIABLES LIKE 'avoid_temporal_upgrade';
17
avoid_temporal_upgrade OFF
18
SELECT * FROM information_schema.session_variables WHERE variable_name='avoid_temporal_upgrade';
19
VARIABLE_NAME VARIABLE_VALUE
20
AVOID_TEMPORAL_UPGRADE OFF
21
SET SESSION avoid_temporal_upgrade= ON;
22
ERROR HY000: Variable 'avoid_temporal_upgrade' is a GLOBAL variable and should be set with SET GLOBAL
23
#Test setting the variable to various values.
25
SET GLOBAL avoid_temporal_upgrade= ON;
27
Warning 1287 '@@avoid_temporal_upgrade' is deprecated and will be removed in a future release.
28
SELECT @@global.avoid_temporal_upgrade;
29
@@global.avoid_temporal_upgrade
32
Warning 1287 '@@avoid_temporal_upgrade' is deprecated and will be removed in a future release.
33
SET GLOBAL avoid_temporal_upgrade= OFF;
35
Warning 1287 '@@avoid_temporal_upgrade' is deprecated and will be removed in a future release.
36
SELECT @@global.avoid_temporal_upgrade;
37
@@global.avoid_temporal_upgrade
40
Warning 1287 '@@avoid_temporal_upgrade' is deprecated and will be removed in a future release.
41
SET GLOBAL avoid_temporal_upgrade= 1;
43
Warning 1287 '@@avoid_temporal_upgrade' is deprecated and will be removed in a future release.
44
SELECT @@global.avoid_temporal_upgrade;
45
@@global.avoid_temporal_upgrade
48
Warning 1287 '@@avoid_temporal_upgrade' is deprecated and will be removed in a future release.
49
SET GLOBAL avoid_temporal_upgrade= 0;
51
Warning 1287 '@@avoid_temporal_upgrade' is deprecated and will be removed in a future release.
52
SELECT @@global.avoid_temporal_upgrade;
53
@@global.avoid_temporal_upgrade
56
Warning 1287 '@@avoid_temporal_upgrade' is deprecated and will be removed in a future release.
57
#Test for DEFAULT value.
58
SET GLOBAL avoid_temporal_upgrade= DEFAULT;
60
Warning 1287 '@@avoid_temporal_upgrade' is deprecated and will be removed in a future release.
61
SELECT @@global.avoid_temporal_upgrade;
62
@@global.avoid_temporal_upgrade
65
Warning 1287 '@@avoid_temporal_upgrade' is deprecated and will be removed in a future release.
66
#Test for invalid value.
67
SET GLOBAL avoid_temporal_upgrade= 2;
68
ERROR 42000: Variable 'avoid_temporal_upgrade' can't be set to the value of '2'
69
#Test for invalid statement for setting the
71
SET avoid_temporal_upgrade= 1;
72
ERROR HY000: Variable 'avoid_temporal_upgrade' is a GLOBAL variable and should be set with SET GLOBAL
73
#Fetches the current global value for the variable.
74
SELECT @@avoid_temporal_upgrade;
75
@@avoid_temporal_upgrade
78
Warning 1287 '@@avoid_temporal_upgrade' is deprecated and will be removed in a future release.