1# Displaying default value
2SELECT COUNT(@@GLOBAL.have_statement_timeout);
3COUNT(@@GLOBAL.have_statement_timeout)
41
51 Expected
6# Check if Value can set
7SET @@GLOBAL.have_statement_timeout=1;
8ERROR HY000: Variable 'have_statement_timeout' is a read only variable
9Expected error 'Read only variable'
10SELECT COUNT(@@GLOBAL.have_statement_timeout);
11COUNT(@@GLOBAL.have_statement_timeout)
121
131 Expected
14# Check if the value in GLOBAL Table matches value in variable
15SELECT @@GLOBAL.have_statement_timeout = VARIABLE_VALUE
16FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
17WHERE VARIABLE_NAME='have_statement_timeout';
18@@GLOBAL.have_statement_timeout = VARIABLE_VALUE
191
201 Expected
21SELECT COUNT(@@GLOBAL.have_statement_timeout);
22COUNT(@@GLOBAL.have_statement_timeout)
231
241 Expected
25SELECT COUNT(VARIABLE_VALUE)
26FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
27WHERE VARIABLE_NAME='have_statement_timeout';
28COUNT(VARIABLE_VALUE)
291
301 Expected
31# Check if accessing variable with and without GLOBAL point to same variable
32SELECT @@have_statement_timeout = @@GLOBAL.have_statement_timeout;
33@@have_statement_timeout = @@GLOBAL.have_statement_timeout
341
351 Expected
36# Check if have_statement_timeout can be accessed with and without @@ sign
37SELECT COUNT(@@have_statement_timeout);
38COUNT(@@have_statement_timeout)
391
401 Expected
41SELECT COUNT(@@local.have_statement_timeout);
42ERROR HY000: Variable 'have_statement_timeout' is a GLOBAL variable
43Expected error 'Variable is a GLOBAL variable'
44SELECT COUNT(@@SESSION.have_statement_timeout);
45ERROR HY000: Variable 'have_statement_timeout' is a GLOBAL variable
46Expected error 'Variable is a GLOBAL variable'
47SELECT COUNT(@@GLOBAL.have_statement_timeout);
48COUNT(@@GLOBAL.have_statement_timeout)
491
501 Expected
51SELECT have_statement_timeout = @@SESSION.have_statement_timeout;
52ERROR 42S22: Unknown column 'have_statement_timeout' in 'field list'
53Expected error 'Readonly variable'
54