Bug #2398 MySQL crashes on boolean fulltext search
Submitted: 15 Jan 2004 7:02 Modified: 15 Jan 2004 7:26
Reporter: Chris Allen Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S1 (Critical)
Version:4.0.17 OS:Linux (Linux 2.6.0)
Assigned to: CPU Architecture:Any

[15 Jan 2004 7:02] Chris Allen
Description:
256MB Memory

When the following SQL query is sent, MySQL closes all connections and restarts:

SELECT artists.artist, albums.album, albums.tracks, albums.year, albums.alid FROM artists LEFT JOIN albums ON artists.aid = albums.aid WHERE 1 AND MATCH(artists.artist) AGAINST('\"doggy style\"' IN BOOLEAN MODE) GROUP BY albums.alid ORDER BY artists.artist, albums.album

Yet this one works:

SELECT artists.artist, albums.album, albums.tracks, albums.year, albums.alid FROM artists LEFT JOIN albums ON artists.aid = albums.aid WHERE 1 AND MATCH(albums.album) AGAINST('\"spaz ass\"' IN BOOLEAN MODE) GROUP BY albums.alid ORDER BY artists.artist, albums.album

However as long as I do not use any of the BOOLEAN methods on the artists.artist field (still with IN BOOLEAN MODE in the query), the query works fine.  I have rebuilt the FULLTEXT index and still have the same result.

Here is a dump of the tables:

#
# Table structure for table `albums`
#

CREATE TABLE `albums` (
  `alid` int(10) unsigned NOT NULL auto_increment,
  `aid` int(10) unsigned NOT NULL default '0',
  `gid` int(10) unsigned NOT NULL default '0',
  `discid` varchar(8) NOT NULL default '',
  `album` varchar(80) NOT NULL default '',
  `year` smallint(4) unsigned NOT NULL default '0',
  `tracks` tinyint(2) unsigned NOT NULL default '0',
  `comments` varchar(255) NOT NULL default '',
  `disclength` smallint(5) unsigned NOT NULL default '0',
  PRIMARY KEY  (`alid`),
  KEY `aid` (`aid`),
  KEY `gid` (`gid`),
  KEY `discid` (`discid`),
  FULLTEXT KEY `album` (`album`)
) TYPE=MyISAM;

# --------------------------------------------------------

#
# Table structure for table `artists`
#

CREATE TABLE `artists` (
  `aid` int(10) unsigned NOT NULL auto_increment,
  `artist` varchar(80) NOT NULL default '',
  PRIMARY KEY  (`aid`),
  FULLTEXT KEY `artist` (`artist`)
) TYPE=MyISAM;
    

MySQL was compiled using the following script and strip(ped):

#!/bin/sh
CFLAGS="-O3 -mcpu=pentium3 -march=pentium3 -fomit-frame-pointer" \
CXX=gcc \
CXXFLAGS="-O3 -mcpu=pentium3 -march=pentium3 -felide-constructors -fno-exceptions -fno-rtti -fomit-frame-pointer" \
./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --without-debug --enable-assembler \
--with-vio --with-openssl --without-innodb --without-isam --enable-thread-safe-client \
--enable-local-infile

How to repeat:
See Description
[15 Jan 2004 7:26] Alexander Keremidarski
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.mysql.com/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.

Additional info:

Please provide some more information. 

First of all try repeating the same with our binary downloaded from www.mysql.com/downloads.

I have tested with your tables and some random data, but both queries succeed. 

Try to get core file or at least look at .err log for backtrace.

btw. I'm testing under kernel 2.6.1