[MDEV-7264] Assertion `0' failed in subselect_engine::get_identifier() on EXPLAIN FORMAT=JSON Created: 2014-12-04  Updated: 2014-12-09  Resolved: 2014-12-06

Status: Closed
Project: MariaDB Server
Component/s: Optimizer
Affects Version/s: 10.1
Fix Version/s: 10.1.3

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Petrunia
Resolution: Fixed Votes: 0
Labels: explain_json

Issue Links:
Relates
relates to MDEV-6109 EXPLAIN JSON Closed

 Description   

CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
 
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (3),(4);
 
EXPLAIN FORMAT=JSON SELECT * FROM t1 WHERE a <> ALL ( SELECT b FROM t2 );

Stack trace from d1522af7

10.1/sql/item_subselect.h:808: virtual int subselect_engine::get_identifier(): Assertion `0' failed.
141204 18:27:17 [ERROR] mysqld got signal 6 ;
 
#6  0x00007fc6c10686f1 in *__GI___assert_fail (assertion=0x7fc6c4304700 "0", file=<optimized out>, line=808, function=0x7fc6c4305a40 "virtual int subselect_engine::get_identifier()") at assert.c:81
#7  0x00007fc6c3b0c27d in subselect_engine::get_identifier (this=0x7fc6b7e05108) at 10.1/sql/item_subselect.h:808
#8  0x00007fc6c3c504ec in Item_subselect::print (this=0x7fc6b7d83b78, str=0x7fc6c344ac50, query_type=QT_EXPLAIN) at 10.1/sql/item_subselect.cc:904
#9  0x00007fc6c3c57336 in Item_in_subselect::print (this=0x7fc6b7d83b78, str=0x7fc6c344ac50, query_type=QT_EXPLAIN) at 10.1/sql/item_subselect.cc:3107
#10 0x00007fc6c3c10a2b in Item_func::print_args (this=0x7fc6b7c18c80, str=0x7fc6c344ac50, from=0, query_type=QT_EXPLAIN) at 10.1/sql/item_func.cc:479
#11 0x00007fc6c3c10999 in Item_func::print (this=0x7fc6b7c18c80, str=0x7fc6c344ac50, query_type=QT_EXPLAIN) at 10.1/sql/item_func.cc:468
#12 0x00007fc6c3bd37bd in Item_cache_wrapper::print (this=0x7fc6b7c5cdc0, str=0x7fc6c344ac50, query_type=QT_EXPLAIN) at 10.1/sql/item.cc:7554
#13 0x00007fc6c3c10a2b in Item_func::print_args (this=0x7fc6b7d83d70, str=0x7fc6c344ac50, from=0, query_type=QT_EXPLAIN) at 10.1/sql/item_func.cc:479
#14 0x00007fc6c3c10999 in Item_func::print (this=0x7fc6b7d83d70, str=0x7fc6c344ac50, query_type=QT_EXPLAIN) at 10.1/sql/item_func.cc:468
#15 0x00007fc6c3be1ce0 in Item_func_not::print (this=0x7fc6b7d83d70, str=0x7fc6c344ac50, query_type=QT_EXPLAIN) at 10.1/sql/item_cmpfunc.cc:353
#16 0x00007fc6c3aeaba4 in write_item (writer=0x7fc6c344b020, item=0x7fc6b7d83d70) at 10.1/sql/sql_explain.cc:1065
#17 0x00007fc6c3aeadba in Explain_table_access::tag_to_json (this=0x7fc6b7c5d098, writer=0x7fc6c344b020, tag=ET_USING_WHERE) at 10.1/sql/sql_explain.cc:1110
#18 0x00007fc6c3aeb5ac in Explain_table_access::print_explain_json (this=0x7fc6b7c5d098, query=0x7fc6b7e05ee8, writer=0x7fc6c344b020, is_analyze=false) at 10.1/sql/sql_explain.cc:1254
#19 0x00007fc6c3ae9b2e in Explain_basic_join::print_explain_json (this=0x7fc6b7e05fd0, query=0x7fc6b7e05ee8, writer=0x7fc6c344b020, is_analyze=false) at 10.1/sql/sql_explain.cc:739
#20 0x00007fc6c3ae9a3a in Explain_select::print_explain_json (this=0x7fc6b7e05fd0, query=0x7fc6b7e05ee8, writer=0x7fc6c344b020, is_analyze=false) at 10.1/sql/sql_explain.cc:720
#21 0x00007fc6c3ae7fb0 in Explain_query::print_explain_json (this=0x7fc6b7e05ee8, output=0x7fc6b7d83ed0, is_analyze=false) at 10.1/sql/sql_explain.cc:205
#22 0x00007fc6c398fd57 in execute_sqlcom_select (thd=0x7fc6bbf26070, all_tables=0x7fc6b7d822e0) at 10.1/sql/sql_parse.cc:5706
#23 0x00007fc6c39866c3 in mysql_execute_command (thd=0x7fc6bbf26070) at 10.1/sql/sql_parse.cc:2892
#24 0x00007fc6c39931d7 in mysql_parse (thd=0x7fc6bbf26070, rawbuf=0x7fc6b7d82088 "EXPLAIN FORMAT=JSON SELECT * FROM t1 WHERE a <> ALL ( SELECT b FROM t2 )", length=72, parser_state=0x7fc6c344c1c0) at 10.1/sql/sql_parse.cc:7028
#25 0x00007fc6c3982ade in dispatch_command (command=COM_QUERY, thd=0x7fc6bbf26070, packet=0x7fc6bc3fa071 "", packet_length=72) at 10.1/sql/sql_parse.cc:1460
#26 0x00007fc6c39818fc in do_command (thd=0x7fc6bbf26070) at 10.1/sql/sql_parse.cc:1089
#27 0x00007fc6c3ab0538 in do_handle_one_connection (thd_arg=0x7fc6bbf26070) at 10.1/sql/sql_connect.cc:1347
#28 0x00007fc6c3ab027d in handle_one_connection (arg=0x7fc6bbf26070) at 10.1/sql/sql_connect.cc:1258
#29 0x00007fc6c404cfee in pfs_spawn_thread (arg=0x7fc6c08249f0) at 10.1/storage/perfschema/pfs.cc:1860
#30 0x00007fc6c3082b50 in start_thread (arg=<optimized out>) at pthread_create.c:304


Generated at Thu Feb 08 07:18:16 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.