#0 0x0000003f1d5b37d2 in base_list::push_back (this=0x18, info=0x7f04c8054700) at /home/alice/git/10.2/sql/sql_list.h:207
#1 0x0000003f1d7651c3 in List<Item_field>::push_back (this=0x18, a=0x7f04c8054700) at /home/alice/git/10.2/sql/sql_list.h:525
#2 0x0000003f1d75dbde in Field_iterator_table::create_item (this=0x7f0538afb838, thd=0x7f04c8000a98) at /home/alice/git/10.2/sql/table.cc:5715
#3 0x0000003f1d5f4118 in Field_iterator_table_ref::create_item (this=0x7f0538afb810, thd=0x7f04c8000a98) at /home/alice/git/10.2/sql/table.h:2521
#4 0x0000003f1d5f02d7 in insert_fields (thd=0x7f04c8000a98, context=0x7f04c8004de0, db_name=0x0, table_name=0x0, it=0x7f0538afbc20, any_privileges=false) at /home/alice/git/10.2/sql/sql_base.cc:7514
#5 0x0000003f1d5eeb87 in setup_wild (thd=0x7f04c8000a98, tables=0x7f04c801e320, fields=..., sum_func_list=0x0, wild_num=1) at /home/alice/git/10.2/sql/sql_base.cc:6946
#6 0x0000003f1da5feec in mysql_prepare_delete (thd=0x7f04c8000a98, table_list=0x7f04c801e320, wild_num=1, field_list=..., conds=0x7f0538afbd88) at /home/alice/git/10.2/sql/sql_delete.cc:763
#7 0x0000003f1da5e2c6 in mysql_delete (thd=0x7f04c8000a98, table_list=0x7f04c801e320, conds=0x7f04c801f090, order_list=0x7f04c8005028, limit=18446744073709551615, options=0, result=0x7f04c8014b00) at /home/alice/git/10.2/sql/sql_delete.cc:277
#8 0x0000003f1d65931c in mysql_execute_command (thd=0x7f04c8000a98) at /home/alice/git/10.2/sql/sql_parse.cc:4612
#9 0x0000003f1d663b29 in mysql_parse (thd=0x7f04c8000a98, rawbuf=0x7f04c8052260 "DELETE FROM t1 WHERE id NOT IN (SELECT id FROM t2) returning *", length=63, parser_state=0x7f0538afd240, is_com_multi=false, is_next_command=false) at /home/alice/git/10.2/sql/sql_parse.cc:7886
#10 0x0000003f1d65184b in dispatch_command (command=COM_QUERY, thd=0x7f04c8000a98, packet=0x7f04c8007e89 "DELETE FROM t1 WHERE id NOT IN (SELECT id FROM t2) returning *", packet_length=63, is_com_multi=false, is_next_command=false) at /home/alice/git/10.2/sql/sql_parse.cc:1812
#11 0x0000003f1d6501be in do_command (thd=0x7f04c8000a98) at /home/alice/git/10.2/sql/sql_parse.cc:1360
#12 0x0000003f1d79cb66 in do_handle_one_connection (connect=0x3f20c76f18) at /home/alice/git/10.2/sql/sql_connect.cc:1354
#13 0x0000003f1d79c8e6 in handle_one_connection (arg=0x3f20c76f18) at /home/alice/git/10.2/sql/sql_connect.cc:1260
#14 0x00007f053cacf6ba in start_thread (arg=0x7f0538afe700) at pthread_create.c:333
#15 0x00007f053bf643dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Alice Sherepa
added a comment - Thanks for the report.
Reproducible with sql_mode=ONLY_FULL_GROUP_BY on 10.0,10.1,10.2,10.3
set sql_mode= 'ONLY_FULL_GROUP_BY' ;
CREATE TABLE t1 (id INT );
CREATE TABLE t2 (id INT );
INSERT INTO t1 VALUE(1),(2),(3);
INSERT INTO t2 VALUE(3),(4),(5);
DELETE FROM t1 WHERE id NOT IN ( SELECT id FROM t2) returning *;
stack trace (10.2.9 commit a544225d0a772bd4b67c96f5861ecc0ef7e69bba)
Thread 1 (Thread 0x7f0538afe700 (LWP 9988)):
#0 0x0000003f1d5b37d2 in base_list::push_back (this=0x18, info=0x7f04c8054700) at /home/alice/git/10.2/sql/sql_list.h:207
#1 0x0000003f1d7651c3 in List<Item_field>::push_back (this=0x18, a=0x7f04c8054700) at /home/alice/git/10.2/sql/sql_list.h:525
#2 0x0000003f1d75dbde in Field_iterator_table::create_item (this=0x7f0538afb838, thd=0x7f04c8000a98) at /home/alice/git/10.2/sql/table.cc:5715
#3 0x0000003f1d5f4118 in Field_iterator_table_ref::create_item (this=0x7f0538afb810, thd=0x7f04c8000a98) at /home/alice/git/10.2/sql/table.h:2521
#4 0x0000003f1d5f02d7 in insert_fields (thd=0x7f04c8000a98, context=0x7f04c8004de0, db_name=0x0, table_name=0x0, it=0x7f0538afbc20, any_privileges=false) at /home/alice/git/10.2/sql/sql_base.cc:7514
#5 0x0000003f1d5eeb87 in setup_wild (thd=0x7f04c8000a98, tables=0x7f04c801e320, fields=..., sum_func_list=0x0, wild_num=1) at /home/alice/git/10.2/sql/sql_base.cc:6946
#6 0x0000003f1da5feec in mysql_prepare_delete (thd=0x7f04c8000a98, table_list=0x7f04c801e320, wild_num=1, field_list=..., conds=0x7f0538afbd88) at /home/alice/git/10.2/sql/sql_delete.cc:763
#7 0x0000003f1da5e2c6 in mysql_delete (thd=0x7f04c8000a98, table_list=0x7f04c801e320, conds=0x7f04c801f090, order_list=0x7f04c8005028, limit=18446744073709551615, options=0, result=0x7f04c8014b00) at /home/alice/git/10.2/sql/sql_delete.cc:277
#8 0x0000003f1d65931c in mysql_execute_command (thd=0x7f04c8000a98) at /home/alice/git/10.2/sql/sql_parse.cc:4612
#9 0x0000003f1d663b29 in mysql_parse (thd=0x7f04c8000a98, rawbuf=0x7f04c8052260 "DELETE FROM t1 WHERE id NOT IN (SELECT id FROM t2) returning *", length=63, parser_state=0x7f0538afd240, is_com_multi=false, is_next_command=false) at /home/alice/git/10.2/sql/sql_parse.cc:7886
#10 0x0000003f1d65184b in dispatch_command (command=COM_QUERY, thd=0x7f04c8000a98, packet=0x7f04c8007e89 "DELETE FROM t1 WHERE id NOT IN (SELECT id FROM t2) returning *", packet_length=63, is_com_multi=false, is_next_command=false) at /home/alice/git/10.2/sql/sql_parse.cc:1812
#11 0x0000003f1d6501be in do_command (thd=0x7f04c8000a98) at /home/alice/git/10.2/sql/sql_parse.cc:1360
#12 0x0000003f1d79cb66 in do_handle_one_connection (connect=0x3f20c76f18) at /home/alice/git/10.2/sql/sql_connect.cc:1354
#13 0x0000003f1d79c8e6 in handle_one_connection (arg=0x3f20c76f18) at /home/alice/git/10.2/sql/sql_connect.cc:1260
#14 0x00007f053cacf6ba in start_thread (arg=0x7f0538afe700) at pthread_create.c:333
#15 0x00007f053bf643dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
error log
Server version: 10.2.9-MariaDB-debug
Thread pointer: 0x7f04c8000a98
stack_bottom = 0x7f0538afdec0 thread_stack 0x49000
/data/bld/10.2/bin/mysqld(my_print_stacktrace+0x38)[0x3f1e036a15]
/data/bld/10.2/bin/mysqld(handle_fatal_signal+0x3a3)[0x3f1d8c325e]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f053cad9390]
/data/bld/10.2/bin/mysqld(+0x5087d2)[0x3f1d5b37d2]
/data/bld/10.2/bin/mysqld(_ZN4ListI10Item_fieldE9push_backEPS0_+0x23)[0x3f1d7651c3]
mysys/stacktrace.c:267(my_print_stacktrace)[0x3f1d75dbde]
/data/bld/10.2/bin/mysqld(_ZN24Field_iterator_table_ref11create_itemEP3THD+0x3c)[0x3f1d5f4118]
/data/bld/10.2/bin/mysqld(_Z13insert_fieldsP3THDP23Name_resolution_contextPKcS4_P13List_iteratorI4ItemEb+0x3c6)[0x3f1d5f02d7]
/data/bld/10.2/bin/mysqld(_Z10setup_wildP3THDP10TABLE_LISTR4ListI4ItemEPS5_j+0x298)[0x3f1d5eeb87]
/data/bld/10.2/bin/mysqld(_Z20mysql_prepare_deleteP3THDP10TABLE_LISTjR4ListI4ItemEPPS4_+0x13c)[0x3f1da5feec]
/data/bld/10.2/bin/mysqld(_Z12mysql_deleteP3THDP10TABLE_LISTP4ItemP10SQL_I_ListI8st_orderEyyP13select_result+0x3d2)[0x3f1da5e2c6]
/data/bld/10.2/bin/mysqld(_Z21mysql_execute_commandP3THD+0x4cc7)[0x3f1d65931c]
/data/bld/10.2/bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x2a2)[0x3f1d663b29]
sql/sql_list.h:207(base_list::push_back(void*))[0x3f1d65184b]
sql/sql_parse.cc:7886(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x3f1d6501be]
sql/sql_connect.cc:1354(do_handle_one_connection(CONNECT*))[0x3f1d79cb66]
sql/sql_connect.cc:1261(handle_one_connection)[0x3f1d79c8e6]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f053cacf6ba]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f053bf643dd]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f04c8052260): DELETE FROM t1 WHERE id NOT IN (SELECT id FROM t2) returning *
Connection ID (thread ID): 8
Status: NOT_KILLED
Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on
can not reproduce it so far. tried ubuntu 16.04, os x 10.12.6, docker images of debian 9.1 and 8.7
Query OK, 1 row affected (0.03 sec)
Query OK, 1 row affected (0.03 sec)
Query OK, 1 row affected (0.08 sec)
Query OK, 1 row affected (0.02 sec)
Query OK, 1 row affected (0.02 sec)
Query OK, 1 row affected (0.08 sec)
| id |
| 1 |
| 2 |
MariaDB [test]> \! cat /etc/debian_version
9.1
please provide your .cnf file?