crash when guery hit Unique Key with two more columns

Bug #904142 reported by leechangyeol
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Spider for MySQL
Fix Released
Critical
Kentoku SHIBA

Bug Description

Good afternoon.

mysql crashes when hit a unique key consist of two or more columns,
for example.

  UNIQUE KEY `test_ids` (`id`,`no`)

when i explain this query,
it uses test_ids like below

+----+-------------+---------+-------+---------------+-----------+---------+------+------+-------------------------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+---------+-------+---------------+-----------+---------+------+------+-------------------------------------------------------------+
| 1 | SIMPLE | test| range | test_ids| test_ids | 4 | NULL | 20 | Using where with pushed condition; Using index for group-by |
+----+-------------+---------+-------+---------------+-----------+---------+------+------+-------------------------------------------------------------+

SELECT id, max(no) FROM test WHERE id IN (1010101299,1010101295 ) GROUP BY id;

stacktrace is like this
111214 17:12:57 - 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=2097152
max_used_connections=1
max_threads=50
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 729658 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x21ce3f0
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...
stack_bottom = 0x7f7986c6be58 thread_stack 0x40000
/usr/local/mysql/bin/mysqld(my_print_stacktrace+0x33)[0x89c0d3]
/usr/local/mysql/bin/mysqld(handle_segfault+0x3fb)[0x4faf8b]
/lib64/libpthread.so.0[0x389120f4c0]
/usr/local/mysql/bin/mysqld(_Z7key_cmpP16st_key_part_infoPKhj+0x20)[0x6bb610]
/usr/local/mysql/bin/mysqld(_ZN7handler11compare_keyEP12st_key_range+0x1d)[0x64446d]
/usr/local/mysql/bin/mysqld(_ZN18QUICK_RANGE_SELECT15get_next_prefixEjjPh+0xb2)[0x6e1792]
/usr/local/mysql/bin/mysqld(_ZN26QUICK_GROUP_MIN_MAX_SELECT11next_prefixEv+0x4b)[0x6e198b]
/usr/local/mysql/bin/mysqld(_ZN26QUICK_GROUP_MIN_MAX_SELECT8get_nextEv+0x3b)[0x6e403b]
/usr/local/mysql/bin/mysqld[0x6f54f1]
/usr/local/mysql/bin/mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0x71)[0x583211]
/usr/local/mysql/bin/mysqld[0x5885ed]
/usr/local/mysql/bin/mysqld(_ZN4JOIN4execEv+0xbe3)[0x59a093]
/usr/local/mysql/bin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x162)[0x596092]
/usr/local/mysql/bin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x17c)[0x59b6ec]
/usr/local/mysql/bin/mysqld[0x5602c4]
/usr/local/mysql/bin/mysqld(_Z21mysql_execute_commandP3THD+0x248e)[0x564cce]
/usr/local/mysql/bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x16d)[0x566aed]
/usr/local/mysql/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0xde1)[0x568031]
/usr/local/mysql/bin/mysqld(_Z24do_handle_one_connectionP3THD+0x154)[0x5f00b4]
/usr/local/mysql/bin/mysqld(handle_one_connection+0x4a)[0x5f016a]
/lib64/libpthread.so.0[0x38912077e1]
/lib64/libc.so.6(clone+0x6d)[0x3890ae18ed]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x7f7974002bb0 is an invalid pointer
thd->thread_id=1
thd->killed=NOT_KILLED
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
111214 17:12:57 mysqld_safe Number of processes running now: 0
111214 17:12:57 mysqld_safe mysqld restarted
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
111214 17:12:57 InnoDB: Initializing buffer pool, size = 256.0M
111214 17:12:57 InnoDB: Completed initialization of buffer pool
111214 17:12:57 InnoDB: highest supported file format is Barracuda.
111214 17:12:57 InnoDB: 1.1.4 started; log sequence number 1595675
111214 17:12:57 [Note] Recovering after a crash using tc.log

after this crash, mysql crash each time when i startup, so i have to make all tables again like below
111214 17:12:57 - 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=2097152
max_used_connections=0
max_threads=50
thread_count=0
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 729658 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x0
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...
stack_bottom = (nil) thread_stack 0x40000
/usr/local/mysql/bin/mysqld(my_print_stacktrace+0x33)[0x89c0d3]
/usr/local/mysql/bin/mysqld(handle_segfault+0x3fb)[0x4faf8b]
/lib64/libpthread.so.0[0x389120f4c0]
/usr/local/mysql/bin/mysqld(_ZN11TC_LOG_MMAP7recoverEv+0x14a)[0x6bd08a]
/usr/local/mysql/bin/mysqld(_ZN11TC_LOG_MMAP4openEPKc+0x5e8)[0x6c1058]
/usr/local/mysql/bin/mysqld[0x4fe696]
/usr/local/mysql/bin/mysqld(_Z11mysqld_mainiPPc+0x353)[0x501603]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x3890a1ec5d]
/usr/local/mysql/bin/mysqld[0x4f9259]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
111214 17:12:57 mysqld_safe mysqld from pid file /usr/local/mysql/mysql.pid ended

thanks

Revision history for this message
Kentoku SHIBA (kentokushiba) wrote :

Fixed at 2.28.

Changed in spiderformysql:
status: New → Fix Committed
importance: Undecided → Critical
assignee: nobody → Kentoku SHIBA (kentokushiba)
Changed in spiderformysql:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.