[debian-mysql] Bug#447028: Extra info and cause of the crash

Gertjan Oude Lohuis gertjan at byte.nl
Thu Oct 18 10:34:14 UTC 2007


I've managed to retrieve the complete query mentioned in one of the 
errorlogs, and this was indeed the query that made the server crash. 
After some testing, I managed to isolate the piece that made it crash:

repeat(' ', cms_nodes.level-1)

To reproduce this behaviour, the following steps should be sufficient:

CREATE DATABASE `gertjan`;
USE `gertjan`;

DROP TABLE IF EXISTS `banaan`;
CREATE TABLE `banaan` (
  `level` int(10) unsigned NOT NULL default '0'
) ENGINE=MyISAM;

INSERT INTO `banaan` VALUES (1);


Now, the server will crash when queried with:

select repeat('a', level - 1) from banaan;

but the following queries execute correctly:

select repeat('a', level - 2) from banaan;
select repeat('a', level - 0) from banaan;


I've tested this with different charactersets (utf8 and latin1), which 
made no difference. The only important part is the unsigned integer. If 
the integer is signed there is no problem.

This problem exists is 5.0.32-7etch1, but not in 5.0.45-1~bpo.1 from 
etch-backports.





More information about the pkg-mysql-maint mailing list