Bug #74505 Assertion tab->select->quick->index==(uint)best_key' in test_if_skip_sort_order
| Submitted: | 22 Oct 2014 12:22 | Modified: | 20 Nov 2019 21:46 |
|---|---|---|---|
| Reporter: | Ramesh Sivaraman | Email Updates: | |
| Status: | Can't repeat | Impact on me: | |
| Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
| Version: | 5.6.20-debug | OS: | Linux (CentOS 7) |
| Assigned to: | CPU Architecture: | Any |
[22 Oct 2014 12:43]
MySQL Verification Team
[miguel@cuzcatlan 5.6]$ 5.6/mysql -uroot --socket=/tmp/mysql.sock
bash: 5.6/mysql: No such file or directory
[miguel@cuzcatlan 5.6]$ 5.6/bin/mysql -uroot --socket=/tmp/mysql.sock
bash: 5.6/bin/mysql: No such file or directory
[miguel@cuzcatlan 5.6]$ bin/mysql -uroot --socket=/tmp/mysql.sock
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.22-debug Source distribution
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database g;
Query OK, 1 row affected (0.00 sec)
mysql> use g
Database changed
mysql> CREATE TABLE t1(a int,b int,c int,primary key(a,b),index (a)) ENGINE=INNODB partition by range (a) partitions 3 (partition x1 values less than (5) nodegroup 12,partition x2 values less than (10) nodegroup 13,partition x3 values less than (20) nodegroup 14);
Query OK, 0 rows affected (2.76 sec)
mysql> INSERT INTO t1(a)VALUES ('');
Query OK, 1 row affected, 1 warning (0.09 sec)
mysql> INSERT INTO t1 VALUES(1,1,1),(6,2,2),(5,3,3),(1,4,4);
Query OK, 4 rows affected (0.10 sec)
Records: 4 Duplicates: 0 Warnings: 0
mysql> set global innodb_stats_persistent=false;
Query OK, 0 rows affected (0.00 sec)
mysql> INSERT INTO t1(a,c)VALUES (4,b'');
Query OK, 1 row affected (0.19 sec)
mysql> ALTER TABLE t1 ORDER BY a;
Query OK, 6 rows affected, 1 warning (3.98 sec)
Records: 6 Duplicates: 0 Warnings: 1
mysql> EXPLAIN SELECT a,MAX(b)FROM t1 WHERE a IN (10,100,3) GROUP BY a;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
[22 Oct 2014 12:46]
MySQL Verification Team
Thank you for the bug report.
[20 Nov 2019 21:46]
Roy Lyseng
Posted by developer: Not reproducible in 5.7.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: mysqld: /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_select.cc:4253: bool test_if_skip_sort_order(JOIN_TAB*, ORDER*, ha_rows, bool, const key_map*, const char*): Assertion `tab->select->quick->index==(uint)best_key' failed. 12:14:58 UTC - mysqld got signal 6 ; ****** GDB info #0 0x00007ff49e560771 in pthread_kill () from /lib64/libpthread.so.0 #1 0x0000000000a9035e in my_write_core (sig=6) at /ssd/ramesh/mysql-server/mysql-5.6/mysys/stacktrace.c:422 #2 0x0000000000723688 in handle_fatal_signal (sig=6) at /ssd/ramesh/mysql-server/mysql-5.6/sql/signal_handler.cc:230 #3 <signal handler called> #4 0x00007ff49d36c5c9 in raise () from /lib64/libc.so.6 #5 0x00007ff49d36dcd8 in abort () from /lib64/libc.so.6 #6 0x00007ff49d365536 in __assert_fail_base () from /lib64/libc.so.6 #7 0x00007ff49d3655e2 in __assert_fail () from /lib64/libc.so.6 #8 0x000000000080515e in test_if_skip_sort_order (tab=0x7ff40207cd70, order=0x7ff402020180, select_limit=5, no_changes=false, map=0x7ff40204da90, clause_type=0xf9442d "GROUP BY") at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_select.cc:4253 #9 0x00000000009a180d in JOIN::optimize (this=0x7ff402020a68) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_optimizer.cc:949 #10 0x00000000007fe0ee in mysql_execute_select (thd=0x7ff40b324000, select_lex=0x7ff40b326878, free_join=true) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_select.cc:1086 #11 0x00000000007fe43f in mysql_select (thd=0x7ff40b324000, tables=0x7ff40201f658, wild_num=0, fields=..., conds=0x7ff40201ff30, order=0x7ff40b326a40, group=0x7ff40b326978, having=0x0, select_options=2147748612, result=0x7ff402020268, unit=0x7ff40b326230, select_lex=0x7ff40b326878) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_select.cc:1221 #12 0x000000000093b4d1 in mysql_explain_unit (thd=0x7ff40b324000, unit=0x7ff40b326230, result=0x7ff402020268) at /ssd/ramesh/mysql-server/mysql-5.6/sql/opt_explain.cc:2132 #13 0x000000000093b0a7 in explain_query_expression (thd=0x7ff40b324000, result=0x7ff402020268) at /ssd/ramesh/mysql-server/mysql-5.6/sql/opt_explain.cc:2034 #14 0x00000000007d6715 in execute_sqlcom_select (thd=0x7ff40b324000, all_tables=0x7ff40201f658) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_parse.cc:5088 #15 0x00000000007cf5cb in mysql_execute_command (thd=0x7ff40b324000) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_parse.cc:2649 #16 0x00000000007d8fa4 in mysql_parse (thd=0x7ff40b324000, rawbuf=0x7ff40201f010 "EXPLAIN SELECT a,MAX(b)FROM t1 WHERE a IN (10,100,3) GROUP BY a", length=63, parser_state=0x7ff49eb57e70) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_parse.cc:6245 #17 0x00000000007cc557 in dispatch_command (command=COM_QUERY, thd=0x7ff40b324000, packet=0x7ff40b362001 "", packet_length=63) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_parse.cc:1332 #18 0x00000000007cb646 in do_command (thd=0x7ff40b324000) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_parse.cc:1034 #19 0x0000000000793a61 in do_handle_one_connection (thd_arg=0x7ff40b324000) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_connect.cc:982 #20 0x000000000079354a in handle_one_connection (arg=0x7ff40b324000) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_connect.cc:898 #21 0x0000000000ad4b5c in pfs_spawn_thread (arg=0x7ff497f38b00) at /ssd/ramesh/mysql-server/mysql-5.6/storage/perfschema/pfs.cc:1860 #22 0x00007ff49e55bdf3 in start_thread () from /lib64/libpthread.so.0 #23 0x00007ff49d42d01d in clone () from /lib64/libc.so.6 How to repeat: CREATE TABLE t1(a int,b int,c int,primary key(a,b),index (a)) ENGINE=INNODB partition by range (a) partitions 3 (partition x1 values less than (5) nodegroup 12,partition x2 values less than (10) nodegroup 13,partition x3 values less than (20) nodegroup 14); INSERT INTO t1(a)VALUES (''); INSERT INTO t1 VALUES(1,1,1),(6,2,2),(5,3,3),(1,4,4); set global innodb_stats_persistent=false; INSERT INTO t1(a,c)VALUES (4,b''); ALTER TABLE t1 ORDER BY a; EXPLAIN SELECT a,MAX(b)FROM t1 WHERE a IN (10,100,3) GROUP BY a;