Bug #13516 SQL segfaults mysql
Submitted: 27 Sep 2005 8:59 Modified: 10 Dec 2005 16:40
Reporter: Gary F. Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.1.14 OS:Linux (Gentoo Linux)
Assigned to: CPU Architecture:Any

[27 Sep 2005 8:59] Gary F.
Description:
Queries using fulltext boolean mode segfaults mysql, if the IN BOOLEAN MODE section contains double quotes around a single word of repeating characters.

Partial SQL examples:

...MATCH (FT, description) AGAINST ('+john +"00" +fleming' IN BOOLEAN MODE)...
...MATCH (FT, description) AGAINST ('+"II"' IN BOOLEAN MODE)...

where "00" and "II" are the patterns in the query at fault for crashing mysql. If the pattern is changed or deleted the query no longer crashes mysql.

NOTE: After this problem has been identified, I've deleted all double quotes enclosing a single word in the queries. However, this did not stop mysql from segfaulting periodically, with uptimes of a few hours to a few days. This is a long term problem for me, even when I was running mysql on debian so it's not a gentoo ebuild problem.

How to repeat:
Run queries as described.

Suggested fix:
My fix on application side would be to drop double quotes around single words containing no space, as a phrase search (double quotes) around a single word is redundant.
[27 Sep 2005 13:29] Hartmut Holzgraefe
Thank you for your interest in the MySQL graphical administration tools.
We recommend that you use our MySQL Administrator and MySQL Query
Browser.  The MySQLGUI and MySQL Command Center legacy products are
deprecated, and we are no longer maintaining those projects.

For more information on MySQL Administrator, see:
http://www.mysql.com/products/administrator/

Additional info:

I can't reproduce this using a test table with fulltext indexes on SuSE Linux, 
can you please add a full self contained SQL script showing the problem?
[28 Sep 2005 13:06] Gary F.
First off, I'm talking about mysql the server, not any admin/GUI. For reproducing the bug, perhaps your table/fulltext index size isn't big enough. My table is about 400mb with 250k rows.
[28 Sep 2005 13:07] Allen Parker
Mr. Holzgraefe, it would also be nice to know what version of MySQL you're using, since you know which version we're using.
[28 Sep 2005 13:13] Valeriy Kravchuk
OK, now we know how large is your table... But what about "self contained SQL script showing the problem"? 

If you do not want to create it yourself, please, send the table structure at least (SHOW CREATE TABLE your_table will be enough). General description of your data (indexed with fulltext indexes, with a couple of samples, not real data) will be useful. Otherwise we are simply not able to repeat your problem, and will not be able to solve it in any case...

And if you had a segmentation fault, there is something in the error log usually. Please, send the appropriate part of the error log.
[28 Sep 2005 14:29] Allen Parker
I'd be happy to add more information, I'll have to wait until Gary wakes up to have him attach the file with the information for you.
[29 Sep 2005 16:28] Allen Parker
pure virtual method called
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

that's from the error log after most recent segfault... not very helpful, is it?
[10 Nov 2005 16:40] Valeriy Kravchuk
I had found a very similar bug report - http://bugs.mysql.com/bug.php?id=8351. The bug is claimed to be fixed in your version, but I am not sure. What do you think?

Please, send the results of the following statements:

show variables like 'ft%';
show variables like 'character_set%';

If you compiled from sources (resonable on Gentoo), what configure options and gcc version were used?

Just to be sure...
[11 Dec 2005 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".