Bug #80440 Assertion `item_in->left_expr->cols() == 1' failed in sql/item_subselect.cc:382
Submitted: 19 Feb 2016 6:13 Modified: 19 Feb 2016 9:12
Reporter: Ramesh Sivaraman Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:5.6.29, 5.6.30 OS:CentOS
Assigned to: CPU Architecture:Any
Tags: debug

[19 Feb 2016 6:13] Ramesh Sivaraman
Description:
+bt
#0  0x00007febc9feb771 in pthread_kill () from /lib64/libpthread.so.0
#1  0x0000000000a96d62 in my_write_core (sig=6) at /sda/mysql-server/mysys/stacktrace.c:422
#2  0x0000000000727f64 in handle_fatal_signal (sig=6) at /sda/mysql-server/sql/signal_handler.cc:230
#3  <signal handler called>
#4  0x00007febc8bea5c9 in raise () from /lib64/libc.so.6
#5  0x00007febc8bebcd8 in abort () from /lib64/libc.so.6
#6  0x00007febc8be3536 in __assert_fail_base () from /lib64/libc.so.6
#7  0x00007febc8be35e2 in __assert_fail () from /lib64/libc.so.6
#8  0x0000000000936e20 in subselect_hash_sj_engine::exec (this=0x7feb95552af8) at /sda/mysql-server/sql/item_subselect.cc:3820
#9  0x000000000092de11 in Item_subselect::exec (this=0x7feb95420df0) at /sda/mysql-server/sql/item_subselect.cc:643
#10 0x000000000092e2f2 in Item_in_subselect::exec (this=0x7feb95420df0) at /sda/mysql-server/sql/item_subselect.cc:768
#11 0x000000000093003e in Item_in_subselect::val_bool (this=0x7feb95420df0) at /sda/mysql-server/sql/item_subselect.cc:1401
#12 0x0000000000649d61 in Item::val_bool_result (this=0x7feb95420df0) at /sda/mysql-server/sql/item.h:1190
#13 0x00000000006799d4 in Item_in_optimizer::val_int (this=0x7feb9547ed68) at /sda/mysql-server/sql/item_cmpfunc.cc:2084
#14 0x000000000064f572 in Item::val_bool (this=0x7feb9547ed68) at /sda/mysql-server/sql/item.cc:203
#15 0x0000000000674cfe in Item_func_not::val_int (this=0x7feb9547d570) at /sda/mysql-server/sql/item_cmpfunc.cc:290
#16 0x0000000000662356 in Item::send (this=0x7feb9547d570, protocol=0x7feba23074d8, buffer=0x7febca5a4c40) at /sda/mysql-server/sql/item.cc:6900
#17 0x000000000071fdc4 in Protocol::send_result_set_row (this=0x7feba23074d8, row_items=0x7feba23095f0) at /sda/mysql-server/sql/protocol.cc:844
#18 0x000000000078cdd9 in select_send::send_data (this=0x7feb9547dc60, items=...) at /sda/mysql-server/sql/sql_class.cc:2538
#19 0x00000000007a869f in end_send (join=0x7feb9547dc88, join_tab=0x7feb95551318, end_of_records=false) at /sda/mysql-server/sql/sql_executor.cc:2783
#20 0x00000000007a5bda in evaluate_join_record (join=0x7feb9547dc88, join_tab=0x7feb95551018) at /sda/mysql-server/sql/sql_executor.cc:1604
#21 0x00000000007a51db in sub_select (join=0x7feb9547dc88, join_tab=0x7feb95551018, end_of_records=false) at /sda/mysql-server/sql/sql_executor.cc:1279
#22 0x00000000007a4abe in do_select (join=0x7feb9547dc88) at /sda/mysql-server/sql/sql_executor.cc:936
#23 0x00000000007a2a5d in JOIN::exec (this=0x7feb9547dc88) at /sda/mysql-server/sql/sql_executor.cc:194
#24 0x0000000000802d07 in mysql_execute_select (thd=0x7feba2307000, select_lex=0x7feba23094d0, free_join=true) at /sda/mysql-server/sql/sql_select.cc:1101
#25 0x0000000000802ff9 in mysql_select (thd=0x7feba2307000, tables=0x7feb9547d648, wild_num=0, fields=..., conds=0x0, order=0x7feba2309698, group=0x7feba23095d0, having=0x0, select_options=2147748608, result=0x7feb9547dc60, unit=0x7feba2308e88, select_lex=0x7feba23094d0) at /sda/mysql-server/sql/sql_select.cc:1222
#26 0x00000000008010df in handle_select (thd=0x7feba2307000, result=0x7feb9547dc60, setup_tables_done_option=0) at /sda/mysql-server/sql/sql_select.cc:110
#27 0x00000000007db19a in execute_sqlcom_select (thd=0x7feba2307000, all_tables=0x7feb9547d648) at /sda/mysql-server/sql/sql_parse.cc:5133
#28 0x00000000007d3f8f in mysql_execute_command (thd=0x7feba2307000) at /sda/mysql-server/sql/sql_parse.cc:2655
#29 0x00000000007ddd20 in mysql_parse (thd=0x7feba2307000, rawbuf=0x7feb9541f010 "SELECT(SELECT 1,2 FROM t2)NOT IN (SELECT 1,2 FROM t1) FROM t1", length=61, parser_state=0x7febca5a66a0) at /sda/mysql-server/sql/sql_parse.cc:6385
#30 0x00000000007d0f09 in dispatch_command (command=COM_QUERY, thd=0x7feba2307000, packet=0x7feb9caa4001 "", packet_length=61) at /sda/mysql-server/sql/sql_parse.cc:1339
#31 0x00000000007cff5c in do_command (thd=0x7feba2307000) at /sda/mysql-server/sql/sql_parse.cc:1036
#32 0x00000000007978ed in do_handle_one_connection (thd_arg=0x7feba2307000) at /sda/mysql-server/sql/sql_connect.cc:982
#33 0x00000000007973d6 in handle_one_connection (arg=0x7feba2307000) at /sda/mysql-server/sql/sql_connect.cc:898
#34 0x0000000000aeda65 in pfs_spawn_thread (arg=0x7febadf27600) at /sda/mysql-server/storage/perfschema/pfs.cc:1860
#35 0x00007febc9fe6df3 in start_thread () from /lib64/libpthread.so.0
#36 0x00007febc8cab1ad in clone () from /lib64/libc.so.6

How to repeat:
Testcase

DROP DATABASE test;CREATE DATABASE test;USE test;
CREATE TABLE t1(c INT,d INT);
INSERT INTO t1 VALUES(1,1),(1,2),(1,3);
CREATE TABLE t2(id CHAR,value CHAR,KEY (id)) ENGINE=InnoDB;
INSERT INTO t1 values(1,1),(1,2);
SELECT(SELECT 1,2 FROM t2)NOT IN (SELECT 1,2 FROM t1) FROM t1;
[19 Feb 2016 6:14] Ramesh Sivaraman
Testcase bundle

Attachment: 1455858251_bug_bundle.tar.gz (application/gzip, text), 1.22 MiB.

[19 Feb 2016 6:44] MySQL Verification Team
Hello Ramesh,

Thank you for the report and test case.
Observed that 5.6.29/5.6.30 daily debug builds are affected.

Thanks,
Umesh
[19 Feb 2016 6:46] MySQL Verification Team
-- Not seeing this issue with 5.7.11 release/debug builds
[19 Feb 2016 9:12] Knut Anders Hatlen
Bug#74357 fixed this in 5.7.6. Closing as duplicate.