Bug #77194 | Assertion `param.sort_length != 0' failed in sql/filesort.cc:361 | ||
---|---|---|---|
Submitted: | 29 May 2015 17:10 | Modified: | 19 Jun 2015 12:58 |
Reporter: | Ramesh Sivaraman | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
Version: | 5.6.23 | OS: | Linux (CentOS 7) |
Assigned to: | CPU Architecture: | Any | |
Tags: | debug |
[29 May 2015 17:10]
Ramesh Sivaraman
[29 May 2015 17:11]
Ramesh Sivaraman
Testcase bundle
Attachment: 1432888901_bug_bundle.tar.gz (application/gzip, text), 1013.27 KiB.
[29 May 2015 22:17]
MySQL Verification Team
C:\dbs>c:\dbs\5.6\bin\mysql -uroot --port=3560 --debug-info --prompt="mysql 5.6 > " Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.6.26-debug Source distribution PULL: 2015/05/04 Copyright (c) 2000, 2015, 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 5.6 > DROP DATABASE test;CREATE DATABASE test;USE test; Query OK, 1 row affected (0.09 sec) Query OK, 1 row affected (0.02 sec) Database changed mysql 5.6 > CREATE TABLE t1(a CHAR(0),b CHAR(0) NOT NULL,c int); Query OK, 0 rows affected (0.25 sec) mysql 5.6 > INSERT INTO t1(b,c)VALUES (0,0),(0,0),(0,0); Query OK, 3 rows affected, 3 warnings (0.06 sec) Records: 3 Duplicates: 0 Warnings: 3 mysql 5.6 > INSERT INTO t1(a,b)VALUES (0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0); Query OK, 20 rows affected, 40 warnings (0.08 sec) Records: 20 Duplicates: 0 Warnings: 40 mysql 5.6 > REPLACE INTO t1(a)SELECT 3 FROM t1,t1 AS c; Query OK, 529 rows affected, 530 warnings (0.17 sec) Records: 529 Duplicates: 0 Warnings: 530 mysql 5.6 > insert INTO t1(b)select a as b FROM t1; Query OK, 552 rows affected, 3 warnings (0.25 sec) Records: 552 Duplicates: 0 Warnings: 3 mysql 5.6 > SELECT COUNT(DISTINCT a)FROM t1 GROUP BY b; ERROR 2013 (HY000): Lost connection to MySQL server during query
[29 May 2015 22:21]
MySQL Verification Team
2015-05-29 19:14:48 6024 [Note] C:\dbs\5.6\bin\mysqld: ready for connections. Version: '5.6.26-debug' socket: '' port: 3560 Source distribution PULL: 2015/05/04 Assertion failed: param.sort_length != 0, file C:\2015may04\mysql-5.6\sql\filesort.cc, line 369 22:16:52 UTC - mysqld got exception 0x80000003 ; 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=8388608 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 = 67956 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0xb9b33522a0 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... 7ff6cde896c5 mysqld.exe!my_sigabrt_handler()[my_thr_init.c:458] 7ff6ce46445f mysqld.exe!raise()[winsig.c:594] 7ff6ce471270 mysqld.exe!abort()[abort.c:82] 7ff6ce461a2b mysqld.exe!_wassert()[assert.c:380] 7ff6cdd02dc8 mysqld.exe!filesort()[filesort.cc:369] 7ff6cdd55aac mysqld.exe!create_sort_index()[sql_executor.cc:3339] 7ff6cdd50253 mysqld.exe!st_join_table::sort_table()[sql_executor.cc:2508] 7ff6cdd4dc02 mysqld.exe!join_init_read_record()[sql_executor.cc:2382] 7ff6cdd4cb12 mysqld.exe!sub_select()[sql_executor.cc:1256] 7ff6cdd5277c mysqld.exe!do_select()[sql_executor.cc:933] 7ff6cdd50e95 mysqld.exe!JOIN::exec()[sql_executor.cc:194] 7ff6cdcd235e mysqld.exe!mysql_execute_select()[sql_select.cc:1103] 7ff6cdcc51a9 mysqld.exe!mysql_select()[sql_select.cc:1221] 7ff6cdcc4dbd mysqld.exe!handle_select()[sql_select.cc:110] 7ff6cdad3c23 mysqld.exe!execute_sqlcom_select()[sql_parse.cc:5134] 7ff6cdac56c5 mysqld.exe!mysql_execute_command()[sql_parse.cc:2656] 7ff6cdac415a mysqld.exe!mysql_parse()[sql_parse.cc:6386] 7ff6cdacd7a2 mysqld.exe!dispatch_command()[sql_parse.cc:1343] 7ff6cdacc865 mysqld.exe!do_command()[sql_parse.cc:1037] 7ff6cdb1dc02 mysqld.exe!do_handle_one_connection()[sql_connect.cc:982] 7ff6cdb1da32 mysqld.exe!handle_one_connection()[sql_connect.cc:899] 7ff6ce33db95 mysqld.exe!pfs_spawn_thread()[pfs.cc:1862] 7ff6cde87c66 mysqld.exe!pthread_start()[my_winthread.c:62] 7ff6ce474ab5 mysqld.exe!_callthreadstartex()[threadex.c:376] 7ff6ce474d07 mysqld.exe!_threadstartex()[threadex.c:359] 7ffa72e313d2 KERNEL32.DLL!BaseThreadInitThunk() 7ffa739e5444 ntdll.dll!RtlUserThreadStart() Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (b9b3609890): SELECT COUNT(DISTINCT a)FROM t1 GROUP BY bConnection ID (thread ID): 1
[29 May 2015 22:26]
MySQL Verification Team
C:\dbs>c:\dbs\5.6\bin\mysql -uroot --port=3560 --debug-info --prompt="mysql 5.6 > " Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.6.26 Source distribution PULL: 2015/05/04 Copyright (c) 2000, 2015, 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 5.6 > DROP DATABASE test;CREATE DATABASE test;USE test; Query OK, 1 row affected (0.17 sec) Query OK, 1 row affected (0.00 sec) Database changed mysql 5.6 > CREATE TABLE t1(a CHAR(0),b CHAR(0) NOT NULL,c int); Query OK, 0 rows affected (0.19 sec) mysql 5.6 > INSERT INTO t1(b,c)VALUES (0,0),(0,0),(0,0); Query OK, 3 rows affected, 3 warnings (0.03 sec) Records: 3 Duplicates: 0 Warnings: 3 mysql 5.6 > INSERT INTO t1(a,b)VALUES (0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0); Query OK, 20 rows affected, 40 warnings (0.06 sec) Records: 20 Duplicates: 0 Warnings: 40 mysql 5.6 > REPLACE INTO t1(a)SELECT 3 FROM t1,t1 AS c; Query OK, 529 rows affected, 530 warnings (0.03 sec) Records: 529 Duplicates: 0 Warnings: 530 mysql 5.6 > insert INTO t1(b)select a as b FROM t1; Query OK, 552 rows affected, 3 warnings (0.05 sec) Records: 552 Duplicates: 0 Warnings: 3 mysql 5.6 > SELECT COUNT(DISTINCT a)FROM t1 GROUP BY b; +-------------------+ | COUNT(DISTINCT a) | +-------------------+ | 1 | +-------------------+ 1 row in set (0.00 sec)
[29 May 2015 22:39]
MySQL Verification Team
Thank you for the bug report. Debug version of 5.5 and 5.7 not affected I was able to repeat only with 5.6 debug version.
[12 Jun 2015 10:41]
Tor Didriksen
Posted by developer: This affects debug versions only. The bug was fixed (for order-by-with-limit) in 5.6.22 by the patch for Bug #19660891 HANDLE_FATAL_SIGNAL (SIG=11) IN QUEUE_INSERT Merge-sort uses the same compare function, and *does* handle zero-length keys during merge sort. So the DBUG_ASSERT is wrong.
[19 Jun 2015 12:58]
Tor Didriksen
Duplicate of Bug #74008 handle_fatal_signal (sig=11) in queue_insert