| 1 |
|
| 2 |
# |
| 3 |
# Fulltext configurable parameters |
| 4 |
# |
| 5 |
--disable_warnings |
| 6 |
drop table if exists t1; |
| 7 |
--enable_warnings |
| 8 |
|
| 9 |
|
| 10 |
# Save ft_boolean_syntax variable |
| 11 |
let $saved_ft_boolean_syntax=`select @@global.ft_boolean_syntax`; |
| 12 |
|
| 13 |
show variables like "ft\_%"; |
| 14 |
|
| 15 |
# INNODB_FTS: Please note original table do not have fulltext index. |
| 16 |
# InnoDB will return 1214. I added "fulltext(b)" to the create table statement |
| 17 |
# In addition, we do not support MyISAM configure parameter |
| 18 |
create table t1 (b text not null, fulltext(b)) engine = innodb; |
| 19 |
insert t1 values ('aaaaaa bbbbbb cccccc'); |
| 20 |
insert t1 values ('bbbbbb cccccc'); |
| 21 |
insert t1 values ('aaaaaa cccccc'); |
| 22 |
select * from t1 where match b against ('+aaaaaa bbbbbb' in boolean mode); |
| 23 |
-- error 1229 |
| 24 |
set ft_boolean_syntax=' +-><()~*:""&|'; |
| 25 |
set global ft_boolean_syntax=' +-><()~*:""&|'; |
| 26 |
select * from t1 where match b against ('+aaaaaa bbbbbb' in boolean mode); |
| 27 |
set global ft_boolean_syntax='@ -><()~*:""&|'; |
| 28 |
select * from t1 where match b against ('+aaaaaa bbbbbb' in boolean mode); |
| 29 |
|
| 30 |
--error ER_PARSE_ERROR |
| 31 |
select * from t1 where match b against ('+aaaaaa @bbbbbb' in boolean mode); |
| 32 |
-- error 1231 |
| 33 |
set global ft_boolean_syntax='@ -><()~*:""@|'; |
| 34 |
-- error 1231 |
| 35 |
set global ft_boolean_syntax='+ -><()~*:""@!|'; |
| 36 |
drop table t1; |
| 37 |
|
| 38 |
# Restore ft_boolean_syntax variable |
| 39 |
--disable_query_log |
| 40 |
eval set global ft_boolean_syntax='$saved_ft_boolean_syntax'; |
| 41 |
--enable_query_log |
| 42 |
|
| 43 |
# End of 4.1 tests |