1
SELECT @@session.show_old_temporals;
2
@@session.show_old_temporals
5
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
6
SHOW SESSION VARIABLES LIKE 'show_old_temporals';
9
SELECT * FROM information_schema.session_variables WHERE variable_name='show_old_temporals';
10
VARIABLE_NAME VARIABLE_VALUE
11
SHOW_OLD_TEMPORALS OFF
12
#Also can be set as a global variable.
13
SELECT @@global.show_old_temporals;
14
@@global.show_old_temporals
17
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
18
SHOW GLOBAL VARIABLES LIKE 'show_old_temporals';
20
show_old_temporals OFF
21
SELECT * FROM information_schema.global_variables WHERE variable_name='show_old_temporals';
22
VARIABLE_NAME VARIABLE_VALUE
23
SHOW_OLD_TEMPORALS OFF
24
#Test setting the variable to various values.
26
SET SESSION show_old_temporals= ON;
28
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
29
SELECT @@session.show_old_temporals;
30
@@session.show_old_temporals
33
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
34
SET SESSION show_old_temporals= OFF;
36
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
37
SELECT @@session.show_old_temporals;
38
@@session.show_old_temporals
41
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
42
SET SESSION show_old_temporals= 1;
44
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
45
SELECT @@session.show_old_temporals;
46
@@session.show_old_temporals
49
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
50
SET SESSION show_old_temporals= 0;
52
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
53
SELECT @@session.show_old_temporals;
54
@@session.show_old_temporals
57
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
58
#Test for DEFAULT value.
59
SET SESSION show_old_temporals= DEFAULT;
61
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
62
SELECT @@session.show_old_temporals;
63
@@session.show_old_temporals
66
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
67
#Test for invalid value.
68
SET SESSION show_old_temporals= 2;
69
ERROR 42000: Variable 'show_old_temporals' can't be set to the value of '2'
70
#Test for setting the session variable
71
#using different syntax.
72
SET show_old_temporals= 1;
74
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
75
#Fetches the current session value for the variable.
76
SELECT @@show_old_temporals;
80
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
82
SET SESSION show_old_temporals= DEFAULT;
84
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
85
#Test setting the global value of the variable.
87
SET GLOBAL show_old_temporals= ON;
89
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
90
SELECT @@global.show_old_temporals;
91
@@global.show_old_temporals
94
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
95
SET GLOBAL show_old_temporals= OFF;
97
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
98
SELECT @@global.show_old_temporals;
99
@@global.show_old_temporals
102
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
103
SET GLOBAL show_old_temporals= 1;
105
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
106
SELECT @@global.show_old_temporals;
107
@@global.show_old_temporals
110
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
111
SET GLOBAL show_old_temporals= 0;
113
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
114
SELECT @@session.show_old_temporals;
115
@@session.show_old_temporals
118
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
119
#Test for DEFAULT value.
120
SET GLOBAL show_old_temporals= DEFAULT;
122
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
123
SELECT @@global.show_old_temporals;
124
@@global.show_old_temporals
127
Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
128
#Test for invalid value.
129
SET GLOBAL show_old_temporals= 2;
130
ERROR 42000: Variable 'show_old_temporals' can't be set to the value of '2'