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