Bug #7858 IN BOOLEAN MODE with no FULLTEXT index and multiple *s hangs server
Submitted: 13 Jan 2005 1:32 Modified: 21 Jun 2005 23:54
Reporter: Neal Poole Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S3 (Non-critical)
Version:MySQL 4.1.7-nt OS:Microsoft Windows (Windows XP SP2)
Assigned to: Jim Winstead CPU Architecture:Any

[13 Jan 2005 1:32] Neal Poole
When you're using the fulltext search feature with IN BOOLEAN MODE on a column without a FULLTEXT index and enter certain data, you can cause the server to hang.
First I tried a normal IN BOOLEAN MODE search, without a FULLTEXT index: took 0.02-0.00 seconds
Then I tried an IN BOOLEAN MODE search with the data I mentioned before: server
Then I tried an IN BOOLEAN MODE search with the data mentioned above AND a FULLTEXT index: same results as a regular, normal IN BOOLEAN MODE search without a FULLTEXT index (I used it on a rather small table).

How to repeat:
Run the query
SELECT * FROM table_name WHERE match(column_name) against ("*a*b*c*d*e*f*" IN BOOLEAN MODE);

with table_name being any table, column_name being any column in the table without a FULLTEXT index, and a through f being any characters (as far as I've been able to tell, only the number of characters and their placement matters, not the actual characters).

Suggested fix:
Either restrict the number of *s when using match against on a column without a FULLTEXT index, or require a FULLTEXT index to use IN BOOLEAN MODE.
[13 Jan 2005 13:36] Victoria Reznichenko
Verified with 4.1.8.
Uploaded t1.sql - table structure and test data.
[13 Jan 2005 13:37] Victoria Reznichenko
table structure and data

Attachment: t1.sql (application/octet-stream, text), 1.46 KiB.

[22 Feb 2005 20:56] Sergei Golubchik
it's apparently windows only bug :(
[17 Jun 2005 19:44] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

[21 Jun 2005 0:30] Jim Winstead
Fixed in 4.1.13 and 5.0.8.
[21 Jun 2005 23:54] Mike Hillyer
Documented in 5.0.8 and 4.1.13 changelog:

<listitem><para>Fixed hang/crash with Boolean full-text search against an unindexed field for which the query contained more words than we allocated space. (Bug #7858)</para></listitem>