Package: mysql-server-5.0
Version: 5.0.32-7etch4
Severity: important

I'm fairly certain this is the same as upstream bug #27807
(http://bugs.mysql.com/bug.php?id=27807)

The issues does not occur with the latest upstream binary release.

I've attached two files. One is the smallest set of SQL I've come up
with to reproduce the crash. The other is a resolved stack trace.

The crash occurs only when running EXPLAIN. Executing the actual query
produces the expected results.

I'd be gratified if a fix could be included in an etch point release.
Unfortunately there are no less than four commits mentioned in the
upstream bug report so I'm not sure how easy it will be to backport the
fix.

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-5-686
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)

Versions of packages mysql-server-5.0 depends on:
ii  adduser                3.102             Add and remove users and groups
ii  debconf [debconf-2.0]  1.5.11etch1       Debian configuration management sy
ii  libc6                  2.3.6.ds1-13etch4 GNU C Library: Shared libraries
ii  libdbi-perl            1.53-1etch1       Perl5 database interface by Tim Bu
ii  libgcc1                1:4.1.1-21        GCC support library
ii  libmysqlclient15off    5.0.32-7etch4     mysql database client library
ii  libncurses5            5.5-5             Shared libraries for terminal hand
ii  libreadline5           5.2-2             GNU readline and history libraries
ii  libstdc++6             4.1.1-21          The GNU Standard C++ Library v3
ii  libwrap0               7.6.dbs-13        Wietse Venema's TCP wrappers libra
ii  lsb-base               3.1-23.2etch1     Linux Standard Base 3.1 init scrip
ii  mysql-client-5.0       5.0.32-7etch4     mysql database client binaries
ii  mysql-common           5.0.32-7etch4     mysql database common files (e.g. 
ii  passwd                 1:4.0.18.1-7      change and administer password and
ii  perl                   5.8.8-7etch1      Larry Wall's Practical Extraction 
ii  psmisc                 22.3-1            Utilities that use the proc filesy
ii  zlib1g                 1:1.2.3-13        compression library - runtime

Versions of packages mysql-server-5.0 recommends:
ii  mailx            1:8.1.2-0.20050715cvs-1 A simple mail user agent

-- debconf information excluded
CREATE DATABASE crash;

USE crash;

CREATE TABLE `PV` (
  `pvID` int(11) NOT NULL auto_increment,
  `wID` int(11) unsigned NOT NULL,
  PRIMARY KEY  (`pvID`),
  KEY `wID` (`wID`)
);

CREATE TABLE `WO` (
  `woID` int(11) NOT NULL auto_increment,
  `wID` int(11) NOT NULL,
  `oID` int(11) NOT NULL,
  PRIMARY KEY  (`woID`),
  KEY `wID` (`wID`),
  KEY `oID` (`oID`)
);

INSERT INTO WO SET wID=1, oID=1;
INSERT INTO WO SET wID=2, oID=2;

INSERT INTO PV SELECT 0 AS pvID, wID AS wID FROM WO;

SELECT wID FROM PV WHERE pvID = (SELECT MAX(pvID) FROM WO NATURAL JOIN PV WHERE 
oID=1 GROUP BY WO.wID);
EXPLAIN SELECT wID FROM PV WHERE pvID = (SELECT MAX(pvID) FROM WO NATURAL JOIN 
PV WHERE oID=1 GROUP BY WO.wID);
0x81c0619 handle_segfault + 681
0x821edbc select_describe(JOIN*, bool, bool, bool, char const*) + 4316
0x8220392 JOIN::exec() + 1890
0x82221c0 _Z12mysql_selectP3THDPPP4ItemP13st_table_listjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_sel + 304
0x82228e3 mysql_explain_union(THD*, st_select_lex_unit*, select_result*) + 547
0x821e055 select_describe(JOIN*, bool, bool, bool, char const*) + 885
0x8220392 JOIN::exec() + 1890
0x82221c0 _Z12mysql_selectP3THDPPP4ItemP13st_table_listjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_sel + 304
0x82228e3 mysql_explain_union(THD*, st_select_lex_unit*, select_result*) + 547
0x81da0a9 mysql_execute_command(THD*) + 20329
0x81dbba7 mysql_parse(THD*, char*, unsigned int) + 471
0x81dc060 dispatch_command(enum_server_command, THD*, char*, unsigned int) + 1120
0x81dd328 do_command(THD*) + 136
0x81ddd34 handle_one_connection + 2308
0xb7f9b240 _end + -1349833552
0xb7dd649e _end + -1351688434

Reply via email to