Bug #7419 Searching with fulltext seems to drop the server
Submitted: 20 Dec 2004 1:18 Modified: 4 Mar 2005 13:30
Reporter: Sebastián Araya Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.8 OS:Linux (Gentoo)
Assigned to: CPU Architecture:Any

[20 Dec 2004 1:18] Sebastián Araya
Description:
Hello,

  I was trying to perform this query:

Select distinct summary.* from summary, details 
  where summary.entry = details.entry 
  and exists (select * from product 
    where match (description) against ('+remote +control' in boolean mode) 
    and summary.product = product.code ) 
  and match( brand,model) against ( 'technics' );

  which it would have return "remote control" from product's table, with "technics" brand from details' table, and the administrative information from summary table, but it drops the connection, saying:

ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...

  It seems the problem is the "in boolean mode", 'cos when I issue:

Select distinct summary.* from summary, details 
  where summary.entry = details.entry 
  and exists (select * from product 
    where match (description) against ('remote control' ) 
    and summary.product = product.code ) 
  and match( brand,model) against ( 'technics' );

  it works fine, giving some results (but without boolean argument processing).

  Additional information, gathered from mysqld:

Version: '4.1.8'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Gentoo Linux mysql-4.1.8
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.

key_buffer_size=1073741824
read_buffer_size=67104768
max_used_connections=2
max_connections=256
threads_connected=2
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 1047550 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x84a0c28
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
frame pointer (ebp) is NULL, did you compile with
-fomit-frame-pointer? Aborting backtrace!
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x84aa128 = select distinct summary.* from summary, details where summary.entry = details.entry and exists (select * from nomenc where match (complete) against ('+remote +control' in boolean mode) and summary.product = product.code ) and match( brand,model) against ( 'technics' ) limit 0,10
thd->thread_id=2

  Thanks in advance.

cbi.
  

How to repeat:
  Populate three tables, two of them with fulltext indexes, then try one subselect which got a match(...) against(... in boolean mode) predicate.
[20 Dec 2004 3:00] Sebastián Araya
A deepest look ahead in the query shows that the problem only appears when I issue a subselect with match (...) against (... boolean mode), independently of the fulltext query at the select level.
[20 Dec 2004 7:00] Hartmut Holzgraefe
Could you please add the CREATE TABLE statements for the table(s) involved?
[20 Dec 2004 11:10] Sebastián Araya
Create Table Statements:

CREATE TABLE `product` (
  `type` char(1) NOT NULL default '0',
  `code` varchar(11) NOT NULL default '',
  `opened` date NOT NULL default '0000-00-00',
  `closed` date NOT NULL default '0000-00-00',
  `brief` text,
  `description` text,
  PRIMARY KEY  (`type`,`code`,`opened`,`closed`),
  KEY `code` (`code`),
  FULLTEXT KEY `description` (`description`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `details` (
  `entry` int(10) unsigned default NULL,
  `brand` varchar(25) default NULL,
  `model` varchar(25) default NULL,
  `quantity` double default NULL,
  `value` double default NULL,
  `relevance` double default NULL,
  KEY `entry` (`entry`),
  FULLTEXT KEY `branding` (`brand`,`model`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `summary` (
  `entry` int(11) default NULL,
  `operation` char(1) default NULL,
  `year` smallint(5) unsigned default NULL,
  `broker` bigint(20) default NULL,
  `product` char(11) default NULL,
  `country` char(3) default NULL,
  `customs` char(3) default NULL,
  `quantity` double default NULL,
  `value` double default NULL,
  `movements` int(11) default NULL,
  UNIQUE KEY `entry` (`entry`),
  KEY `operation` (`operation`),
  KEY `year` (`year`),
  KEY `broker` (`broker`),
  KEY `product` (`product`),
  KEY `customs` (`customs`),
  KEY `grouping` (`product`,`broker`,`country`,`customs`,`operation`,`year`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
[29 Dec 2004 17:03] MySQL Verification Team
Hi,

I wasn't able reproduce it with my test data.
Could you provide some data for testing?
[20 Jan 2005 12:27] Sebastián Araya
I try to make a little set of records to show the issue, but it didn't appear... it seems that the number of records is the condition for the error generation. I'm working with three tables:

* Table A:    150,361 records
* Table B: 10,347,793 records
* Table C:  7,769,051 records

when I issue two FT with "in boolean mode" predicate (one per table with more than 1 million records), the server says:

ERROR 1030 (HY000): Got error 127 from storage engine.

I'll forward any direction to perform the error check in my server.

Thanks.
[20 Jan 2005 13:41] Sebastián Araya
It still persists in MySQL-4.1.9
[4 Feb 2005 13:30] MySQL Verification Team
Hi,

I generated new test tables but can not reproduce it.
Could upload gzipped tables to our ftp?
ftp://ftp.mysql.com/pub/mysql/upload/
[5 Mar 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".