Bug #13976 Server Crash
Submitted: 12 Oct 2005 19:55 Modified: 12 Oct 2005 21:28
Reporter: Majdi Swais Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.13 OS:Linux (Fedora c3)
Assigned to: MySQL Verification Team CPU Architecture:Any

[12 Oct 2005 19:55] Majdi Swais
Description:
Server Crashes after executing the following query, this executes fine with mysql 4.1.14

Select *
From jv_details Inner Join chart ON jv_details.jv_account = chart.chart_id
 where
 (jv_year,jv_no) in ((2005,1))

the tables are as follows

CREATE TABLE `chart` (
  `chart_id` int(10) unsigned NOT NULL default '0',
  `chart_code` varchar(50) NOT NULL default '',
  `chart_level` tinyint(3) unsigned NOT NULL default '0',
  `chart_parent` int(10) unsigned NOT NULL default '0',
  `chart_name` varchar(100) NOT NULL default '',
  `chart_name_a` varchar(100) NOT NULL default '',
  `chart_type` tinyint(4) NOT NULL default '-1',
  PRIMARY KEY  (`chart_id`),
  UNIQUE KEY `chart_code` (`chart_code`),
  KEY `chart_parent` (`chart_parent`),
  KEY `chart_type` (`chart_type`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `jv_details` (
  `jv_year` smallint(5) unsigned NOT NULL default '0',
  `jv_no` smallint(5) unsigned NOT NULL default '0',
  `jv_seq` tinyint(3) unsigned NOT NULL default '0',
  `jv_account` int(10) unsigned NOT NULL default '0',
  `jv_type` tinyint(4) NOT NULL default '0',
  `jv_description` varchar(100) NOT NULL default '',
  `jv_amount` float(12,3) NOT NULL default '0.000',
  `jv_curr` tinyint(3) unsigned NOT NULL default '0',
  `jv_rate` float(12,3) NOT NULL default '0.000',
  PRIMARY KEY  (`jv_year`,`jv_no`,`jv_seq`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

How to repeat:
keep executing the query

Select *
From jv_details Inner Join chart ON jv_details.jv_account = chart.chart_id
 where
 (jv_year,jv_no) in ((1,2))
[12 Oct 2005 21:28] MySQL Verification Team
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

mysql> Select *
    -> From jv_details Inner Join chart ON jv_details.jv_account = chart.chart_id
    -> where
    -> (jv_year,jv_no) in ((2005,1));
Empty set (0.00 sec)

mysql> select version();
+-----------------+
| version()       |
+-----------------+
| 5.0.15-rc-debug |
+-----------------+
1 row in set (0.00 sec)