Bug #74448 Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2' failed
| Submitted: | 20 Oct 2014 9:18 | Modified: | 20 Oct 2014 9:51 |
|---|---|---|---|
| Reporter: | Ramesh Sivaraman | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
| Version: | 5.6.20-debug, 5.6.22, 5.7.6 | OS: | Linux (CentOS 7) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | debug build | ||
[20 Oct 2014 9:51]
MySQL Verification Team
Hello Ramesh Sivaraman, Thank you for the bug report and test case. Confirmed with 5.6.22 that only debug build asserts. Thanks, Umesh
[20 Oct 2014 9:51]
MySQL Verification Team
//
mysql> show variables like '%version%';
+-------------------------+---------------------------------------------------------------+
| Variable_name | Value |
+-------------------------+---------------------------------------------------------------+
| innodb_version | 5.6.22 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 5.6.22-enterprise-commercial-advanced-debug |
| version_comment | MySQL Enterprise Server - Advanced Edition Debug (Commercial) |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+---------------------------------------------------------------+
7 rows in set (0.00 sec)
mysql> drop table t1,t2;
Query OK, 0 rows affected (0.02 sec)
mysql> create table t2(fl text);
Query OK, 0 rows affected (0.03 sec)
mysql> CREATE TABLE t1(C1 INT,C2 INT,KEY C1(C1),KEY C2(C2)) ENGINE=MYISAM;
Query OK, 0 rows affected (0.00 sec)
mysql> INSERT INTO t1 VALUES("big",GeomFromText('POLYGON ((0 0,0 3,3 3,3 0,0 0))'));
Query OK, 1 row affected, 2 warnings (0.00 sec)
mysql> SELECT c1 FROM t1 WHERE c1=(SELECT MAX(c1)FROM t2);
ERROR 2013 (HY000): Lost connection to MySQL server during query
//
mysqld-debug: /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/handler.cc:2591: int handler::ha_index_init(uint, bool): Assertion `table_share->tmp_table != NO_TMP_TABL
E || m_lock_type != 2' failed.
//
(gdb) bt
#0 0x0000003bf260c8ac in pthread_kill () from /lib64/libpthread.so.0
#1 0x0000000000afe982 in my_write_core (sig=6) at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/mysys/stacktrace.c:422
#2 0x000000000077e6cc in handle_fatal_signal (sig=6) at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/signal_handler.cc:230
#3 <signal handler called>
#4 0x0000003bf2232635 in raise () from /lib64/libc.so.6
#5 0x0000003bf2233e15 in abort () from /lib64/libc.so.6
#6 0x0000003bf222b75e in __assert_fail_base () from /lib64/libc.so.6
#7 0x0000003bf222b820 in __assert_fail () from /lib64/libc.so.6
#8 0x000000000068f23b in handler::ha_index_init (this=0x7f0dc0015d90, idx=0, sorted=true) at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/handler.cc:2591
#9 0x00000000009d0508 in opt_sum_query (thd=0x7d9c860, tables=0x7f0dc00064a0, all_fields=..., conds=0x0)
at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/opt_sum.cc:414
#10 0x0000000000a07bd7 in JOIN::optimize (this=0x7f0dc0022a30) at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/sql_optimizer.cc:296
#11 0x0000000000996c4b in subselect_single_select_engine::exec (this=0x7f0dc0006b38) at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/item_subselect.cc:2747
#12 0x000000000098fc15 in Item_subselect::exec (this=0x7f0dc0006a18) at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/item_subselect.cc:642
#13 0x00000000009910f4 in Item_singlerow_subselect::val_int (this=0x7f0dc0006a18) at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/item_subselect.cc:1081
#14 0x00000000006cb4c8 in Arg_comparator::compare_int_signed (this=0x7f0dc0006c40) at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/item_cmpfunc.cc:1554
#15 0x00000000006dd312 in Arg_comparator::compare (this=0x7f0dc0006c40) at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/item_cmpfunc.h:84
#16 0x00000000006ccf49 in Item_func_eq::val_int (this=0x7f0dc0006b70) at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/item_cmpfunc.cc:2198
#17 0x0000000000a1ae97 in make_join_select (join=0x7f0dc00225f0, cond=0x7f0dc0006b70) at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/sql_optimizer.cc:7616
#18 0x0000000000a08a0e in JOIN::optimize (this=0x7f0dc00225f0) at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/sql_optimizer.cc:492
#19 0x000000000085cc9b in mysql_execute_select (thd=0x7d9c860, select_lex=0x7d9f0d8, free_join=true)
at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/sql_select.cc:1086
#20 0x000000000085d003 in mysql_select (thd=0x7d9c860, tables=0x7f0dc0005208, wild_num=0, fields=..., conds=0x7f0dc0006b70, order=0x7d9f2a0, group=0x7d9f1d8, having=0x0,
select_options=2147748608, result=0x7f0dc0006da8, unit=0x7d9ea90, select_lex=0x7d9f0d8) at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/sql_select.cc:1221
#21 0x000000000085b00f in handle_select (thd=0x7d9c860, result=0x7f0dc0006da8, setup_tables_done_option=0)
at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/sql_select.cc:110
#22 0x0000000000834dfb in execute_sqlcom_select (thd=0x7d9c860, all_tables=0x7f0dc0005208) at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/sql_parse.cc:5103
#23 0x000000000082d553 in mysql_execute_command (thd=0x7d9c860) at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/sql_parse.cc:2649
#24 0x00000000008375d1 in mysql_parse (thd=0x7d9c860, rawbuf=0x7f0dc0004fd0 "SELECT c1 FROM t1 WHERE c1=(SELECT MAX(c1)FROM t2)", length=50, parser_state=0x7f0ddec9a680)
at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/sql_parse.cc:6245
#25 0x000000000082a3a2 in dispatch_command (command=COM_QUERY, thd=0x7d9c860, packet=0x7ecbd51 "SELECT c1 FROM t1 WHERE c1=(SELECT MAX(c1)FROM t2)", packet_length=50)
at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/sql_parse.cc:1332
#26 0x0000000000829407 in do_command (thd=0x7d9c860) at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/sql_parse.cc:1034
#27 0x00000000007f0887 in do_handle_one_connection (thd_arg=0x7d9c860) at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/sql_connect.cc:982
#28 0x00000000007f0358 in handle_one_connection (arg=0x7d9c860) at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/sql/sql_connect.cc:898
#29 0x0000000000e5c19d in pfs_spawn_thread (arg=0x7dc0e00) at /export/home/pb2/build/sb_0-13146752-1409933888.09/mysqlcom-pro-5.6.22/storage/perfschema/pfs.cc:1860
#30 0x0000003bf26079d1 in start_thread () from /lib64/libpthread.so.0
#31 0x0000003bf22e886d in clone () from /lib64/libc.so.6
[20 Oct 2014 10:00]
MySQL Verification Team
mysql> show variables like '%version%';
+-------------------------+---------------------------------------------------------------+
| Variable_name | Value |
+-------------------------+---------------------------------------------------------------+
| innodb_version | 5.7.6 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 5.7.6-m16-enterprise-commercial-advanced-debug |
| version_comment | MySQL Enterprise Server - Advanced Edition Debug (Commercial) |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+---------------------------------------------------------------+
7 rows in set (0.00 sec)
mysql> create database test; use test;
Query OK, 1 row affected (0.00 sec)
Database changed
mysql> create table t2(fl text);
Query OK, 0 rows affected (0.08 sec)
mysql> CREATE TABLE t1(C1 INT,C2 INT,KEY C1(C1),KEY C2(C2)) ENGINE=MYISAM;
Query OK, 0 rows affected (0.01 sec)
mysql> INSERT INTO t1 VALUES("big",GeomFromText('POLYGON ((0 0,0 3,3 3,3 0,0 0))'));
Query OK, 1 row affected, 2 warnings (0.00 sec)
mysql> SELECT c1 FROM t1 WHERE c1=(SELECT MAX(c1)FROM t2);
ERROR 2013 (HY000): Lost connection to MySQL server during query
//
mysqld-debug: /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/handler.cc:2559: int handler::ha_index_init(uint, bool): Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lo
ck_type != 2' failed.
(gdb) bt
#0 0x0000003bf260c8ac in pthread_kill () from /lib64/libpthread.so.0
#1 0x0000000000e794c5 in my_write_core (sig=6) at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/mysys/stacktrace.c:247
#2 0x000000000086cb4e in handle_fatal_signal (sig=6) at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/signal_handler.cc:219
#3 <signal handler called>
#4 0x0000003bf2232635 in raise () from /lib64/libc.so.6
#5 0x0000003bf2233e15 in abort () from /lib64/libc.so.6
#6 0x0000003bf222b75e in __assert_fail_base () from /lib64/libc.so.6
#7 0x0000003bf222b820 in __assert_fail () from /lib64/libc.so.6
#8 0x00000000008d0615 in handler::ha_index_init (this=0x7f34c801e7a0, idx=0, sorted=true) at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/handler.cc:2559
#9 0x0000000000d5466f in opt_sum_query (thd=0x7f34c8000d30, tables=0x7f34c802bc30, all_fields=..., conds=0x0)
at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/opt_sum.cc:428
#10 0x0000000000b7c749 in JOIN::optimize (this=0x7f34c802cae8) at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/sql_optimizer.cc:259
#11 0x0000000000c3c56f in st_select_lex_unit::optimize (this=0x7f34c802b5f0) at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/sql_union.cc:778
#12 0x0000000000a90c7d in Item_subselect::exec (this=0x7f34c802c1c0) at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/item_subselect.cc:598
#13 0x0000000000a92202 in Item_singlerow_subselect::val_int (this=0x7f34c802c1c0) at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/item_subselect.cc:1039
#14 0x000000000090d2a0 in Arg_comparator::compare_int_signed (this=0x7f34c802c3f8) at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/item_cmpfunc.cc:1578
#15 0x0000000000920f52 in Arg_comparator::compare (this=0x7f34c802c3f8) at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/item_cmpfunc.h:86
#16 0x000000000090ed21 in Item_func_eq::val_int (this=0x7f34c802c320) at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/item_cmpfunc.cc:2222
#17 0x0000000000b91c8e in make_join_select (join=0x7f34c802c590, cond=0x7f34c802c320) at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/sql_optimizer.cc:8745
#18 0x0000000000b7d26a in JOIN::optimize (this=0x7f34c802c590) at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/sql_optimizer.cc:433
#19 0x0000000000be189c in mysql_prepare_and_optimize_select (thd=0x7f34c8000d30, fields=..., select_options=2147748608, result=0x7f34c802c568, select_lex=0x7f34c80053a0,
free_join=0x7f35880bed5e) at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/sql_select.cc:1011
#20 0x0000000000be195e in mysql_select (thd=0x7f34c8000d30, fields=..., select_options=2147748608, result=0x7f34c802c568, select_lex=0x7f34c80053a0)
at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/sql_select.cc:1048
#21 0x0000000000bdfe55 in handle_select (thd=0x7f34c8000d30, result=0x7f34c802c568, setup_tables_done_option=0)
at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/sql_select.cc:97
#22 0x0000000000ba9163 in execute_sqlcom_select (thd=0x7f34c8000d30, all_tables=0x7f34c80068c0) at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/sql_parse.cc:5028
#23 0x0000000000ba1007 in mysql_execute_command (thd=0x7f34c8000d30) at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/sql_parse.cc:2488
#24 0x0000000000baa012 in mysql_parse (thd=0x7f34c8000d30, parser_state=0x7f35880c0660) at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/sql_parse.cc:5427
#25 0x0000000000b9dec7 in dispatch_command (command=COM_QUERY, thd=0x7f34c8000d30, packet=0x7f34c80098b1 "SELECT c1 FROM t1 WHERE c1=(SELECT MAX(c1)FROM t2)", packet_length=50)
at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/sql_parse.cc:1250
#26 0x0000000000b9cb7b in do_command (thd=0x7f34c8000d30) at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/sql_parse.cc:834
#27 0x0000000000caa2d8 in handle_connection (arg=0xd54d2a0) at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/sql/conn_handler/connection_handler_per_thread.cc:298
#28 0x0000000001241f24 in pfs_spawn_thread (arg=0xd58a1c0) at /pb2/build/sb_0-13146106-1409929295.44/mysqlcom-pro-5.7.6-m16/storage/perfschema/pfs.cc:2137
#29 0x0000003bf26079d1 in start_thread () from /lib64/libpthread.so.0
#30 0x0000003bf22e886d in clone () from /lib64/libc.so.6
[24 Oct 2014 8:10]
Roel Van de Paar
DROP DATABASE test;CREATE DATABASE test;USE test; FLUSH LOCAL TABLES;DROP TABLE t1;CREATE TABLE t1(id INT KEY);t3 TABLES;USE mysql; CREATE TABLE t2(a int); alter table t2 add unique index idx(a); FLUSH LOCAL TABLES;DROP TABLE t1;CREATE TABLE t1(id INT KEY);t3 TABLES;USE mysql; INSERT INTO t2 VALUES(FROM_UNIXTIME(1000000000.12345)); SELECT a FROM t2 WHERE a=(SELECT MAX(a)FROM t1) AND (a="20060606155555"); Bug looks serious enough. Please change to S2.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.058 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/handler.cc:2591: int handler::ha_index_init(uint, bool): Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2' failed. 09:12:26 UTC - mysqld got signal 6 ; ********* GDB info +bt #0 0x00007fa913e24771 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 0x00007fa912c305c9 in raise () from /lib64/libc.so.6 #5 0x00007fa912c31cd8 in abort () from /lib64/libc.so.6 #6 0x00007fa912c29536 in __assert_fail_base () from /lib64/libc.so.6 #7 0x00007fa912c295e2 in __assert_fail () from /lib64/libc.so.6 #8 0x0000000000637fe4 in handler::ha_index_init (this=0x7fa858c98010, idx=0, sorted=true) at /ssd/ramesh/mysql-server/mysql-5.6/sql/handler.cc:2590 #9 0x0000000000968a56 in opt_sum_query (thd=0x7fa86afb0000, tables=0x7fa858c234e0, all_fields=..., conds=0x0) at /ssd/ramesh/mysql-server/mysql-5.6/sql/opt_sum.cc:414 #10 0x000000000099eeec in JOIN::optimize (this=0x7fa858c7f450) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_optimizer.cc:296 #11 0x000000000093054d in subselect_single_select_engine::exec (this=0x7fa858c23b78) at /ssd/ramesh/mysql-server/mysql-5.6/sql/item_subselect.cc:2747 #12 0x00000000009298bf in Item_subselect::exec (this=0x7fa858c23a58) at /ssd/ramesh/mysql-server/mysql-5.6/sql/item_subselect.cc:642 #13 0x000000000092ad36 in Item_singlerow_subselect::val_int (this=0x7fa858c23a58) at /ssd/ramesh/mysql-server/mysql-5.6/sql/item_subselect.cc:1081 #14 0x0000000000673318 in Arg_comparator::compare_int_signed (this=0x7fa858c23c80) at /ssd/ramesh/mysql-server/mysql-5.6/sql/item_cmpfunc.cc:1554 #15 0x0000000000684bc0 in Arg_comparator::compare (this=0x7fa858c23c80) at /ssd/ramesh/mysql-server/mysql-5.6/sql/item_cmpfunc.h:84 #16 0x0000000000674d61 in Item_func_eq::val_int (this=0x7fa858c23bb0) at /ssd/ramesh/mysql-server/mysql-5.6/sql/item_cmpfunc.cc:2198 #17 0x00000000009b1656 in make_join_select (join=0x7fa858c7f010, cond=0x7fa858c23bb0) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_optimizer.cc:7588 #18 0x000000000099fca4 in JOIN::optimize (this=0x7fa858c7f010) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_optimizer.cc:492 #19 0x00000000007fe0ee in mysql_execute_select (thd=0x7fa86afb0000, select_lex=0x7fa86afb2878, free_join=true) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_select.cc:1086 #20 0x00000000007fe43f in mysql_select (thd=0x7fa86afb0000, tables=0x7fa858c22248, wild_num=0, fields=..., conds=0x7fa858c23bb0, order=0x7fa86afb2a40, group=0x7fa86afb2978, having=0x0, select_options=2147748608, result=0x7fa858c23de8, unit=0x7fa86afb2230, select_lex=0x7fa86afb2878) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_select.cc:1221 #21 0x00000000007fc4c7 in handle_select (thd=0x7fa86afb0000, result=0x7fa858c23de8, setup_tables_done_option=0) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_select.cc:110 #22 0x00000000007d681b in execute_sqlcom_select (thd=0x7fa86afb0000, all_tables=0x7fa858c22248) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_parse.cc:5103 #23 0x00000000007cf5cb in mysql_execute_command (thd=0x7fa86afb0000) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_parse.cc:2649 #24 0x00000000007d8fa4 in mysql_parse (thd=0x7fa86afb0000, rawbuf=0x7fa858c22010 "SELECT c1 FROM t1 WHERE c1=(SELECT MAX(c1)FROM t2)", length=50, parser_state=0x7fa91441be70) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_parse.cc:6245 #25 0x00000000007cc557 in dispatch_command (command=COM_QUERY, thd=0x7fa86afb0000, packet=0x7fa86afed001 "SELECT c1 FROM t1 WHERE c1=(SELECT MAX(c1)FROM t2)", packet_length=50) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_parse.cc:1332 #26 0x00000000007cb646 in do_command (thd=0x7fa86afb0000) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_parse.cc:1034 #27 0x0000000000793a61 in do_handle_one_connection (thd_arg=0x7fa86afb0000) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_connect.cc:982 #28 0x000000000079354a in handle_one_connection (arg=0x7fa86afb0000) at /ssd/ramesh/mysql-server/mysql-5.6/sql/sql_connect.cc:898 #29 0x0000000000ad4b5c in pfs_spawn_thread (arg=0x7fa9123d7b00) at /ssd/ramesh/mysql-server/mysql-5.6/storage/perfschema/pfs.cc:1860 #30 0x00007fa913e1fdf3 in start_thread () from /lib64/libpthread.so.0 #31 0x00007fa912cf101d in clone () from /lib64/libc.so.6 (gdb) +set logging off How to repeat: create table t2(fl text); CREATE TABLE t1(C1 INT,C2 INT,KEY C1(C1),KEY C2(C2)) ENGINE=MYISAM; INSERT INTO t1 VALUES("big",GeomFromText('POLYGON ((0 0,0 3,3 3,3 0,0 0))')); SELECT c1 FROM t1 WHERE c1=(SELECT MAX(c1)FROM t2);