Bug #34872 5.0.x-64bit crash by SQL select photo_id from t_tribe_photo_map where tribe_id .
Submitted: 27 Feb 2008 5:30 Modified: 27 Feb 2008 10:23
Reporter: w ww Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.0.51a OS:Linux (opensuse 10 64bit)
Assigned to: CPU Architecture:Any
Tags: crash, SQL

[27 Feb 2008 5:30] w ww
Description:
080227 12:57:58 - 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=536870912
read_buffer_size=1044480
max_used_connections=2
max_connections=100
threads_connected=2
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 728687 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x1268040
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=0x440ca0f0, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
(nil)
New value of fp=0x1268040 failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/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 0x12721e0 = select photo_id from t_tribe_photo_map where tribe_id = 1900414 and category_id = 103 and photo_id < 76 order by photo_id desc limit 1
thd->thread_id=2
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.

How to repeat:
create table:

-- ----------------------------
-- Table structure for t_tribe_photo_map
-- ----------------------------
CREATE TABLE `t_tribe_photo_map` (
  `tribe_id` bigint(20) NOT NULL,
  `category_id` bigint(20) NOT NULL,
  `photo_id` bigint(20) NOT NULL,
  `gid` bigint(20) NOT NULL default '0',
  `is_top` tinyint(4) NOT NULL default '0',
  `mod_value` tinyint(4) NOT NULL default '1',
  `create_date` bigint(20) NOT NULL,
  UNIQUE KEY `tribe_photo_idx` (`tribe_id`,`photo_id`,`is_top`,`gid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

execute sql below:

select photo_id from t_tribe_photo_map where tribe_id = 1900414 and category_id = 103 and photo_id < 76 order by photo_id desc limit 1

and the mysql server will crash.
[27 Feb 2008 5:31] w ww
insert data from data.sql please

Attachment: data.sql (text/plain), 24.52 KiB.

[27 Feb 2008 10:23] MySQL Verification Team
Thank you for the bug report. I wasn't able to repeat with server built
with the current source tree, so please wait for the next release and
test again. Thanks in advance.

Query OK, 1 row affected (0.00 sec)

mysql> select photo_id from t_tribe_photo_map where tribe_id = 1900414 and category_id = 103 and
    -> photo_id < 76 order by photo_id desc limit 1
    -> ;
Empty set (0.02 sec)

mysql> show variables like "%version%";
+-------------------------+---------------------+
| Variable_name           | Value               |
+-------------------------+---------------------+
| protocol_version        | 10                  | 
| version                 | 5.0.58-debug        | 
| version_comment         | Source distribution | 
| version_compile_machine | x86_64              | 
| version_compile_os      | unknown-linux-gnu   | 
+-------------------------+---------------------+
5 rows in set (0.00 sec)

mysql>