Crash in MySQL-4.0.4
am 21.09.2002 22:42:15 von Jocelyn FournierHi,
I've just hit a bug in MySQL-4.0.4 (latest pull).
How-to-repeat :
CREATE TABLE `prive` (
`titre` char(80) NOT NULL default '',
`numeropost` mediumint(8) unsigned NOT NULL auto_increment,
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`auteur` char(35) NOT NULL default '',
`icone` tinyint(2) unsigned NOT NULL default '0',
`lastauteur` char(35) NOT NULL default '',
`nbrep` smallint(6) unsigned NOT NULL default '0',
`dest` char(35) NOT NULL default '',
`lu` tinyint(1) unsigned NOT NULL default '0',
`vue` mediumint(8) unsigned NOT NULL default '0',
`ludest` tinyint(1) unsigned NOT NULL default '0',
`ouvert` tinyint(1) unsigned NOT NULL default '1',
PRIMARY KEY (`numeropost`),
KEY `date` (`date`),
KEY `dest` (`dest`,`ludest`),
KEY `auteur` (`auteur`,`lu`),
KEY `auteur_2` (`auteur`,`date`),
KEY `dest_2` (`dest`,`date`)
) TYPE=MyISAM CHECKSUM=1
CREATE TABLE `indexprive` (
`numeropost` mediumint(8) unsigned NOT NULL default '0',
`pseudo` char(35) NOT NULL default '',
PRIMARY KEY (`numeropost`,`pseudo`),
KEY `pseudo` (`pseudo`)
) TYPE=MyISAM
INSERT INTO prive (titre,auteur,dest) VALUES ('test','joce','bug');
INSERT INTO indexprive (numeropost,pseudo) VALUES (1,'joce'),(1,'bug');
SELECT
titre,prive.numeropost,auteur,icone,nbrep,0,date,vue,ouvert, lastauteur,dest
FROM indexprive LEFT JOIN prive USING(numeropost) WHERE
indexprive.pseudo='joce' ORDER BY date DESC LIMIT 0,30;
+-------+------------+--------+-------+-------+-----------+- ----------------
----+------+--------+------------+------+
| titre | numeropost | auteur | icone | nbrep | 0 | date
| vue | ouvert | lastauteur | dest |
+-------+------------+--------+-------+-------+-----------+- ----------------
----+------+--------+------------+------+
| test | 1 | joce | 0 | 0 | 145143528 | 0000-00-00
00:00:00 | 0 | 1 | | bug |
+-------+------------+--------+-------+-------+-----------+- ----------------
----+------+--------+------------+------+
1 row in set (0.01 sec)
The column "0" display and unexpected value.
Then :
SELECT
titre,prive.numeropost,auteur,icone,nbrep,'0',date,vue,ouver t,lastauteur,des
t FROM indexprive LEFT JOIN prive USING(numeropost) WHERE
indexprive.pseudo='joce' ORDER BY date DESC LIMIT 0,30;
crashes the server with the following stack trace :
thd=0x6e463f50
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...
Cannot determine thread, fp=0xa49feae8, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x8095277 _Z15handle_segfaulti + 487
0x826518a pthread_sighandler + 138
(nil)
0x80ba32f
_Z12mysql_selectP3THDP13st_table_listR4ListI4ItemEPS4_P8st_o rderS9_S7_S9_mP1
3select_result + 3471
0x80b958f _Z13handle_selectP3THDP6st_lexP13select_result + 175
0x809f0a9 _Z21mysql_execute_commandv + 649
0x80a361c _Z11mysql_parseP3THDPcj + 316
0x809e07f _Z16dispatch_command19enum_server_commandP3THDPcj + 1119
0x809dc0d _Z10do_commandP3THD + 109
0x809d508 _Z21handle_one_connectionPv + 888
0x826277e pthread_start_thread + 222
0x829949a thread_start + 4
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://www.mysql.com/doc/U/s/Using_stack_trace.html and follow
instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x8a6a500 = SELECT
titre,prive.numeropost,auteur,icone,nbrep,'0',date,vue,ouver t,lastauteur,des
t FROM indexprive LEFT JOIN prive USING(numeropost) WHERE
indexprive.pseudo='joce' ORDER BY date DESC LIMIT 0,30
thd->thread_id=208
Regards,
Jocelyn Fournier
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12571@lists.mysql.com
To unsubscribe, e-mail