Debian Codegraph @

mysql-test/suite/sys_vars/t/innodb_ft_enable_stopword_basic.test

raw
1
2
3 # 2011-11-15 - Added
4 #
5
6
7 SET @start_global_value = @@global.innodb_ft_enable_stopword;
8 SELECT @start_global_value;
9
10 #
11 # exists as global and session
12 #
13 --echo Valid values are 'ON' and 'OFF'
14 select @@global.innodb_ft_enable_stopword in (0, 1);
15 select @@global.innodb_ft_enable_stopword;
16 select @@session.innodb_ft_enable_stopword in (0, 1);
17 select @@session.innodb_ft_enable_stopword;
18 show global variables like 'innodb_ft_enable_stopword';
19 show session variables like 'innodb_ft_enable_stopword';
20 --disable_warnings
21 select * from performance_schema.global_variables where variable_name='innodb_ft_enable_stopword';
22 select * from performance_schema.session_variables where variable_name='innodb_ft_enable_stopword';
23 --enable_warnings
24
25 #
26 # show that it's writable
27 #
28 set global innodb_ft_enable_stopword='OFF';
29 set session innodb_ft_enable_stopword='OFF';
30 select @@global.innodb_ft_enable_stopword;
31 select @@session.innodb_ft_enable_stopword;
32 --disable_warnings
33 select * from performance_schema.global_variables where variable_name='innodb_ft_enable_stopword';
34 select * from performance_schema.session_variables where variable_name='innodb_ft_enable_stopword';
35 --enable_warnings
36 set @@global.innodb_ft_enable_stopword=1;
37 set @@session.innodb_ft_enable_stopword=1;
38 select @@global.innodb_ft_enable_stopword;
39 select @@session.innodb_ft_enable_stopword;
40 --disable_warnings
41 select * from performance_schema.global_variables where variable_name='innodb_ft_enable_stopword';
42 select * from performance_schema.session_variables where variable_name='innodb_ft_enable_stopword';
43 --enable_warnings
44 set global innodb_ft_enable_stopword=0;
45 set session innodb_ft_enable_stopword=0;
46 select @@global.innodb_ft_enable_stopword;
47 select @@session.innodb_ft_enable_stopword;
48 --disable_warnings
49 select * from performance_schema.global_variables where variable_name='innodb_ft_enable_stopword';
50 select * from performance_schema.session_variables where variable_name='innodb_ft_enable_stopword';
51 --enable_warnings
52 set @@global.innodb_ft_enable_stopword='ON';
53 set @@session.innodb_ft_enable_stopword='ON';
54 select @@global.innodb_ft_enable_stopword;
55 select @@session.innodb_ft_enable_stopword;
56 --disable_warnings
57 select * from performance_schema.global_variables where variable_name='innodb_ft_enable_stopword';
58 select * from performance_schema.session_variables where variable_name='innodb_ft_enable_stopword';
59 --enable_warnings
60
61 #
62 # incorrect types
63 #
64 --error ER_WRONG_TYPE_FOR_VAR
65 set global innodb_ft_enable_stopword=1.1;
66 --error ER_WRONG_TYPE_FOR_VAR
67 set session innodb_ft_enable_stopword=1.1;
68 --error ER_WRONG_TYPE_FOR_VAR
69 set global innodb_ft_enable_stopword=1e1;
70 --error ER_WRONG_TYPE_FOR_VAR
71 set session innodb_ft_enable_stopword=1e1;
72 --error ER_WRONG_VALUE_FOR_VAR
73 set global innodb_ft_enable_stopword=2;
74 --error ER_WRONG_VALUE_FOR_VAR
75 set session innodb_ft_enable_stopword=2;
76 --error ER_WRONG_VALUE_FOR_VAR
77 set global innodb_ft_enable_stopword='AUTO';
78 --error ER_WRONG_VALUE_FOR_VAR
79 set session innodb_ft_enable_stopword='AUTO';
80 --error ER_WRONG_VALUE_FOR_VAR
81 set global innodb_ft_enable_stopword=-3;
82 --error ER_WRONG_VALUE_FOR_VAR
83 set session innodb_ft_enable_stopword=-7;
84 select @@global.innodb_ft_enable_stopword;
85 select @@session.innodb_ft_enable_stopword;
86 --disable_warnings
87 select * from performance_schema.global_variables where variable_name='innodb_ft_enable_stopword';
88 select * from performance_schema.session_variables where variable_name='innodb_ft_enable_stopword';
89 --enable_warnings
90
91 #
92 # Cleanup
93 #
94
95 SET @@global.innodb_ft_enable_stopword = @start_global_value;
96 SELECT @@global.innodb_ft_enable_stopword;