3
SET @start_global_value = @@global.query_cache_strip_comments;
5
select @@global.query_cache_strip_comments;
6
select @@session.query_cache_strip_comments;
7
show global variables like 'query_cache_strip_comments';
8
show session variables like 'query_cache_strip_comments';
9
select * from information_schema.global_variables where variable_name='query_cache_strip_comments';
10
select * from information_schema.session_variables where variable_name='query_cache_strip_comments';
13
# show that it's writable
15
set global query_cache_strip_comments=ON;
16
select @@global.query_cache_strip_comments;
17
set global query_cache_strip_comments=OFF;
18
select @@global.query_cache_strip_comments;
19
set global query_cache_strip_comments=1;
20
select @@global.query_cache_strip_comments;
22
set session query_cache_strip_comments=ON;
23
select @@session.query_cache_strip_comments;
24
set session query_cache_strip_comments=OFF;
25
select @@session.query_cache_strip_comments;
26
set session query_cache_strip_comments=1;
27
select @@session.query_cache_strip_comments;
31
--error ER_WRONG_TYPE_FOR_VAR
32
set global query_cache_strip_comments=1.1;
33
--error ER_WRONG_TYPE_FOR_VAR
34
set session query_cache_strip_comments=1e1;
35
--error ER_WRONG_VALUE_FOR_VAR
36
set session query_cache_strip_comments="foo";
38
SET @@global.query_cache_strip_comments = @start_global_value;