~ubuntu-branches/ubuntu/trusty/mariadb-5.5/trusty-proposed

« back to all changes in this revision

Viewing changes to mysql-test/suite/sys_vars/t/query_cache_strip_comments_basic.test

  • Committer: Package Import Robot
  • Author(s): Otto Kekäläinen
  • Date: 2013-12-22 10:27:05 UTC
  • Revision ID: package-import@ubuntu.com-20131222102705-mndw7s12mz0szrcn
Tags: upstream-5.5.32
Import upstream version 5.5.32

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# bool session
 
2
 
 
3
SET @start_global_value = @@global.query_cache_strip_comments;
 
4
 
 
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';
 
11
 
 
12
#
 
13
# show that it's writable
 
14
#
 
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;
 
21
 
 
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;
 
28
#
 
29
# incorrect types
 
30
#
 
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";
 
37
 
 
38
SET @@global.query_cache_strip_comments = @start_global_value;
 
39