Debian Codegraph @

mysql-test/suite/sys_vars/r/show_old_temporals_basic.result

raw
1 SELECT @@session.show_old_temporals;
2 @@session.show_old_temporals
3 0
4 Warnings:
5 Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
6 SHOW SESSION VARIABLES LIKE 'show_old_temporals';
7 Variable_name Value
8 show_old_temporals OFF
9 SELECT * FROM performance_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
15 0
16 Warnings:
17 Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
18 SHOW GLOBAL VARIABLES LIKE 'show_old_temporals';
19 Variable_name Value
20 show_old_temporals OFF
21 SELECT * FROM performance_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.
25 #Boolean values.
26 SET SESSION show_old_temporals= ON;
27 Warnings:
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
31 1
32 Warnings:
33 Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
34 SET SESSION show_old_temporals= OFF;
35 Warnings:
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
39 0
40 Warnings:
41 Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
42 SET SESSION show_old_temporals= 1;
43 Warnings:
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
47 1
48 Warnings:
49 Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
50 SET SESSION show_old_temporals= 0;
51 Warnings:
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
55 0
56 Warnings:
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;
60 Warnings:
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
64 0
65 Warnings:
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;
73 Warnings:
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;
77 @@show_old_temporals
78 1
79 Warnings:
80 Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
81 #cleanup
82 SET SESSION show_old_temporals= DEFAULT;
83 Warnings:
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.
86 #Boolean values.
87 SET GLOBAL show_old_temporals= ON;
88 Warnings:
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
92 1
93 Warnings:
94 Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
95 SET GLOBAL show_old_temporals= OFF;
96 Warnings:
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
100 0
101 Warnings:
102 Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
103 SET GLOBAL show_old_temporals= 1;
104 Warnings:
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
108 1
109 Warnings:
110 Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
111 SET GLOBAL show_old_temporals= 0;
112 Warnings:
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
116 0
117 Warnings:
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;
121 Warnings:
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
125 0
126 Warnings:
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'
131 CREATE USER foo, bar;
132 GRANT SESSION_VARIABLES_ADMIN ON *.* TO bar;
133 SELECT @@session.show_old_temporals;
134 @@session.show_old_temporals
135 0
136 Warnings:
137 Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
138 SET @@session.show_old_temporals = 0;
139 ERROR 42000: Access denied; you need (at least one of) the SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMIN privilege(s) for this operation
140 SELECT @@session.show_old_temporals;
141 @@session.show_old_temporals
142 0
143 Warnings:
144 Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
145 SET @@session.show_old_temporals = 0;
146 Warnings:
147 Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
148 SELECT @@session.show_old_temporals;
149 @@session.show_old_temporals
150 0
151 Warnings:
152 Warning 1287 '@@show_old_temporals' is deprecated and will be removed in a future release.
153 SET @@global.show_old_temporals = 0;
154 ERROR 42000: Access denied; you need (at least one of) the SUPER or SYSTEM_VARIABLES_ADMIN privilege(s) for this operation
155 DROP USER foo, bar;