6
--source include/have_innodb.inc
8
SET @start_global_value = @@global.innodb_optimize_fulltext_only;
9
SELECT @start_global_value;
12
# exists as global only
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';
25
# show that it's writable
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';
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';
69
SET @@global.innodb_optimize_fulltext_only = @start_global_value;
70
SELECT @@global.innodb_optimize_fulltext_only;