Bug #37851 | Crash in test_if_skip_sort_order tab->select is zero | ||
---|---|---|---|
Submitted: | 3 Jul 2008 20:20 | Modified: | 20 Nov 2010 23:08 |
Reporter: | Philip Stoev | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S1 (Critical) |
Version: | 6.0 | OS: | Any |
Assigned to: | Sergey Petrunya | CPU Architecture: | Any |
Tags: | ICP, index condition pushdown, regression |
[3 Jul 2008 20:20]
Philip Stoev
[3 Jul 2008 20:32]
Philip Stoev
Test case simplified to the bare essentials: CREATE TABLE t1 ( `pk` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`pk`) ) ENGINE=MyISAM; INSERT INTO t1 VALUES (1); CREATE TABLE t2 ( `pk` int(11) NOT NULL AUTO_INCREMENT, `int_key` int(11) DEFAULT NULL, PRIMARY KEY (`pk`), KEY `int_key` (`int_key`) ) ENGINE=MyISAM; INSERT INTO t2 VALUES (1,1),(2,6),(3,0); EXPLAIN EXTENDED SELECT MIN(t1.pk) FROM t1 WHERE EXISTS ( SELECT t2.pk FROM t2 WHERE t2.int_key IS NULL GROUP BY t2.pk ); The EXPLAIN EXTENDED, the WHERE on int_key and the GROUP BY are all requred.
[9 Jul 2008 16:05]
Philip Stoev
Setting to Open so that the bug verification team can check previous releases.
[7 Aug 2008 15:47]
MySQL Verification Team
Not repeatable on 5.1/5.0 and 6.0.4 released version. Version: '6.0.7-alpha-nt-debug-log' socket: '' port: 3600 Source distribution 080807 12:36:30 - mysqld got exception 0xc0000005 ; 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=8388572 read_buffer_size=131072 max_used_connections=1 max_threads=151 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 = 337737 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. thd: 0x3636380 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... 006C26F9 mysqld.exe!test_if_skip_sort_order()[sql_select.cc:15895] 006A4710 mysqld.exe!JOIN::exec()[sql_select.cc:2357] 006A62E0 mysqld.exe!mysql_select()[sql_select.cc:3003] 006CC254 mysqld.exe!mysql_explain_union()[sql_select.cc:19378] 006CBC56 mysqld.exe!select_describe()[sql_select.cc:19319] 006B464F mysqld.exe!return_zero_rows()[sql_select.cc:8949] 006A453C mysqld.exe!JOIN::exec()[sql_select.cc:2325] 006A62E0 mysqld.exe!mysql_select()[sql_select.cc:3003] 006CC254 mysqld.exe!mysql_explain_union()[sql_select.cc:19378] 00666280 mysqld.exe!execute_sqlcom_select()[sql_parse.cc:4849] 0065EF8B mysqld.exe!mysql_execute_command()[sql_parse.cc:2107] 006681ED mysqld.exe!mysql_parse()[sql_parse.cc:5841] 0065D505 mysqld.exe!dispatch_command()[sql_parse.cc:1120] 0065CD3D mysqld.exe!do_command()[sql_parse.cc:807] 0076CA67 mysqld.exe!handle_one_connection()[sql_connect.cc:1153] 0084684D mysqld.exe!pthread_start()[my_winthread.c:86] 00B7C877 mysqld.exe!_threadstart()[thread.c:196] 7C80B713 kernel32.dll!GetModuleFileNameA() Trying to get some variables. Some pointers may be invalid and cause the dump to abort... thd->query at 036CE020=EXPLAIN EXTENDED SELECT MIN(t1.pk) FROM t1 WHERE EXISTS ( SELECT t2.pk FROM t2 WHERE t2.int_key IS NULL GROUP BY t2.pk ) 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.
[7 Sep 2008 19:27]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/53457 2688 Sergey Petrunia 2008-09-05 BUG#37851: Crash in test_if_skip_sort_order tab->select is zero - Don't touch tab->select->cond in test_if_skip_sort_order(). We only use tab->select_cond at this and later stages.
[1 Nov 2008 18:30]
Bugs System
Pushed into 6.0.7-alpha (revid:sergefp@mysql.com-20080905192307-hutnawwpqgoi8wtu) (version source revid:sergefp@mysql.com-20080905192307-hutnawwpqgoi8wtu) (pib:5)
[12 Nov 2008 16:23]
Sergey Petrunya
Note for the changelog: mysqld could crash when one issues a query that could use an index to produce a query that could use one index to produce the desired ordering and another index for range access with index condition pushdown.
[12 Nov 2008 16:23]
Sergey Petrunya
Note for the changelog: mysqld could crash when one issues a query that could use an index to produce a query that could use one index to produce the desired ordering and another index for range access with index condition pushdown.
[13 Nov 2008 3:21]
Paul DuBois
Noted in 6.0.9 changelog.
[16 Aug 2010 6:33]
Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100816062819-bluwgdq8q4xysmlg) (version source revid:alik@sun.com-20100816062612-enatdwnv809iw3s9) (pib:20)
[13 Nov 2010 16:22]
Bugs System
Pushed into mysql-trunk 5.6.99-m5 (revid:alexander.nozdrin@oracle.com-20101113155825-czmva9kg4n31anmu) (version source revid:vasil.dimov@oracle.com-20100629074804-359l9m9gniauxr94) (merge vers: 5.6.99-m4) (pib:21)
[20 Nov 2010 23:09]
Paul DuBois
Noted in 5.6.1 changelog.