~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
 
 
3
# 2011-11-16 - Added
 
4
#
 
5
 
 
6
--source include/have_innodb.inc
 
7
 
 
8
SET @start_global_value = @@global.innodb_optimize_fulltext_only;
 
9
SELECT @start_global_value;
 
10
 
 
11
#
 
12
# exists as global only
 
13
#
 
14
--echo Valid values are 'ON' and 'OFF' 
 
15
select @@global.innodb_optimize_fulltext_only in (0, 1);
 
16
select @@global.innodb_optimize_fulltext_only;
 
17
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
 
18
select @@session.innodb_optimize_fulltext_only;
 
19
show global variables like 'innodb_optimize_fulltext_only';
 
20
show session variables like 'innodb_optimize_fulltext_only';
 
21
select * from information_schema.global_variables where variable_name='innodb_optimize_fulltext_only';
 
22
select * from information_schema.session_variables where variable_name='innodb_optimize_fulltext_only';
 
23
 
 
24
#
 
25
# show that it's writable
 
26
#
 
27
set global innodb_optimize_fulltext_only='ON';
 
28
select @@global.innodb_optimize_fulltext_only;
 
29
select * from information_schema.global_variables where variable_name='innodb_optimize_fulltext_only';
 
30
select * from information_schema.session_variables where variable_name='innodb_optimize_fulltext_only';
 
31
set @@global.innodb_optimize_fulltext_only=0;
 
32
select @@global.innodb_optimize_fulltext_only;
 
33
select * from information_schema.global_variables where variable_name='innodb_optimize_fulltext_only';
 
34
select * from information_schema.session_variables where variable_name='innodb_optimize_fulltext_only';
 
35
set global innodb_optimize_fulltext_only=1;
 
36
select @@global.innodb_optimize_fulltext_only;
 
37
select * from information_schema.global_variables where variable_name='innodb_optimize_fulltext_only';
 
38
select * from information_schema.session_variables where variable_name='innodb_optimize_fulltext_only';
 
39
set @@global.innodb_optimize_fulltext_only='OFF';
 
40
select @@global.innodb_optimize_fulltext_only;
 
41
select * from information_schema.global_variables where variable_name='innodb_optimize_fulltext_only';
 
42
select * from information_schema.session_variables where variable_name='innodb_optimize_fulltext_only';
 
43
--error ER_GLOBAL_VARIABLE
 
44
set session innodb_optimize_fulltext_only='OFF';
 
45
--error ER_GLOBAL_VARIABLE
 
46
set @@session.innodb_optimize_fulltext_only='ON';
 
47
 
 
48
#
 
49
# incorrect types
 
50
#
 
51
--error ER_WRONG_TYPE_FOR_VAR
 
52
set global innodb_optimize_fulltext_only=1.1;
 
53
--error ER_WRONG_TYPE_FOR_VAR
 
54
set global innodb_optimize_fulltext_only=1e1;
 
55
--error ER_WRONG_VALUE_FOR_VAR
 
56
set global innodb_optimize_fulltext_only=2;
 
57
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
 
58
set global innodb_optimize_fulltext_only=-3;
 
59
select @@global.innodb_optimize_fulltext_only;
 
60
select * from information_schema.global_variables where variable_name='innodb_optimize_fulltext_only';
 
61
select * from information_schema.session_variables where variable_name='innodb_optimize_fulltext_only';
 
62
--error ER_WRONG_VALUE_FOR_VAR
 
63
set global innodb_optimize_fulltext_only='AUTO';
 
64
 
 
65
#
 
66
# Cleanup
 
67
#
 
68
 
 
69
SET @@global.innodb_optimize_fulltext_only = @start_global_value;
 
70
SELECT @@global.innodb_optimize_fulltext_only;