Bug #35361 different ft_boolean_syntax does not produce result as default operators
Submitted: 18 Mar 2008 6:05 Modified: 28 Nov 2008 21:50
Reporter: Rizwan Maredia Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: FULLTEXT search Severity:S3 (Non-critical)
Version:5.1.22, 4.1, 5.0, 5.1, 6.0 BK OS:Any (MS Windows, Linux)
Assigned to: CPU Architecture:Any
Tags: ft_boolean_syntax

[18 Mar 2008 6:05] Rizwan Maredia
Description:
Different ft_boolean_syntax does not produce result as default operators. Docs says that space has to be either in 1 or 2 position and operator functionality is determined from its position. I wonder if space acts as + operator when positioned at one. Also if space cant be substituted with any other character than its position should be fixed or removed altogether.

How to repeat:
This script can be tested in mysql test environment.

CREATE TABLE articles (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(200),
body TEXT,
FULLTEXT (title,body)
);
INSERT INTO articles (title,body) VALUES
('MySQL Tutorial','DBMS stands for DataBase ...'),
('MySQL vs. YourSQL','In the following database comparison ...');
SET @@global.ft_boolean_syntax=' ~/!@#$%^&*()-';
SELECT * FROM articles WHERE MATCH (title,body)
AGAINST (' mySQL~/yourSQL' IN BOOLEAN MODE);
+id	title	body
+2	MySQL vs. YourSQL	In the following database comparison ...
SELECT * FROM articles WHERE MATCH (title,body)
AGAINST ('~mySQL /yourSQL' IN BOOLEAN MODE);
+id	title	body
+1	MySQL Tutorial	DBMS stands for DataBase ...
SET @@global.ft_boolean_syntax='~ /!@#$%^&*()-';
SELECT * FROM articles WHERE MATCH (title,body)
AGAINST ('~mySQL /yourSQL' IN BOOLEAN MODE);
+id	title	body
+1	MySQL Tutorial	DBMS stands for DataBase ...

Suggested fix:
The second result should have come on the first case also. Also if space is positioned at first then operator at second position acts as +. This behavior should be documented.
[19 Mar 2008 11:20] Sveta Smirnova
Thank you for the report.

Verified as described.