|
Another testcase with a different stack. Also affects 10.5+
CREATE TABLE t (a CHAR,b INET6) ENGINE=InnoDB;
|
SELECT * FROM t WHERE (a,b) IN (('',''),('',''));
|
Leads to:
|
10.5.20 c41c79650aa2ef8eaf3f887b94db8cc7478eadd1 (Debug)
|
mariadbd: /test/10.5_dbg/plugin/type_inet/sql_type_inet.cc:600: virtual int cmp_item_inet6::compare(cmp_item*): Assertion `!m_null_value' failed.
|
|
10.5.20 c41c79650aa2ef8eaf3f887b94db8cc7478eadd1 (Debug)
|
Core was generated by `/test/MD110223-mariadb-10.5.20-linux-x86_64-dbg/bin/mariadbd --no-defaults --co'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22592240682560)
|
at ./nptl/pthread_kill.c:44
|
[Current thread is 1 (Thread 0x148c2a7b0640 (LWP 3645857))]
|
(gdb) bt
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22592240682560) at ./nptl/pthread_kill.c:44
|
#1 __pthread_kill_internal (signo=6, threadid=22592240682560) at ./nptl/pthread_kill.c:78
|
#2 __GI___pthread_kill (threadid=22592240682560, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
|
#3 0x0000148c43656476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
|
#4 0x0000148c4363c7f3 in __GI_abort () at ./stdlib/abort.c:79
|
#5 0x0000148c4363c71b in __assert_fail_base (fmt=0x148c437f1150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x560ec206349d "!m_null_value", file=0x560ec2063240 "/test/10.5_dbg/plugin/type_inet/sql_type_inet.cc", line=600, function=<optimized out>) at ./assert/assert.c:92
|
#6 0x0000148c4364de96 in __GI___assert_fail (assertion=0x560ec206349d "!m_null_value", file=0x560ec2063240 "/test/10.5_dbg/plugin/type_inet/sql_type_inet.cc", line=600, function=0x560ec20634c0 "virtual int cmp_item_inet6::compare(cmp_item*)") at ./assert/assert.c:101
|
#7 0x0000560ec1ad2e9c in cmp_item_inet6::compare (this=0x148be8015bc8, ci=0x148be8015c40) at /test/10.5_dbg/plugin/type_inet/sql_type_inet.cc:600
|
#8 0x0000560ec12b8ec9 in cmp_item_row::compare (this=0x148be8015a40, c=0x148be8015a60) at /test/10.5_dbg/sql/item_cmpfunc.cc:4162
|
#9 0x0000560ec12b8c85 in cmp_row (cmp_arg=cmp_arg@entry=0x0, a=a@entry=0x148be8015a40, b=b@entry=0x148be8015a60) at /test/10.5_dbg/sql/item_cmpfunc.cc:3647
|
#10 0x0000560ec1991889 in my_qsort2 (base_ptr=<optimized out>, count=2, size=32, cmp=<optimized out>, cmp_argument=<optimized out>) at /test/10.5_dbg/mysys/mf_qsort.c:131
|
#11 0x0000560ec12c9029 in in_vector::sort (this=<optimized out>) at /test/10.5_dbg/sql/item_cmpfunc.h:1358
|
#12 Item_func_in::fix_in_vector (this=this@entry=0x148be80143a0) at /test/10.5_dbg/sql/item_cmpfunc.cc:4480
|
#13 0x0000560ec12c9adc in Item_func_in::fix_for_row_comparison_using_bisection (this=this@entry=0x148be80143a0, thd=thd@entry=0x148be8000d58) at /test/10.5_dbg/sql/item_cmpfunc.cc:4620
|
#14 0x0000560ec119eabb in Type_handler_row::Item_func_in_fix_comparator_compatible_types (this=<optimized out>, thd=0x148be8000d58, func=0x148be80143a0) at /test/10.5_dbg/sql/sql_type.cc:5918
|
#15 0x0000560ec12cee7d in Item_func_in::fix_length_and_dec (this=0x148be80143a0) at /test/10.5_dbg/sql/item_cmpfunc.cc:4434
|
#16 0x0000560ec12f92c5 in Item_func::fix_fields (this=0x148be80143a0, thd=0x148be8000d58, ref=<optimized out>) at /test/10.5_dbg/sql/item_func.cc:373
|
#17 0x0000560ec12c8b7b in Item_func_in::fix_fields (this=<optimized out>, thd=<optimized out>, ref=<optimized out>) at /test/10.5_dbg/sql/item_cmpfunc.cc:4350
|
#18 0x0000560ec0f8d60f in Item::fix_fields_if_needed (ref=0x148be8015320, thd=0x148be8000d58, this=0x148be80143a0) at /test/10.5_dbg/sql/item.h:990
|
#19 Item::fix_fields_if_needed_for_scalar (ref=0x148be8015320, thd=0x148be8000d58, this=0x148be80143a0) at /test/10.5_dbg/sql/item.h:994
|
#20 Item::fix_fields_if_needed_for_bool (ref=0x148be8015320, thd=0x148be8000d58, this=0x148be80143a0) at /test/10.5_dbg/sql/item.h:998
|
#21 setup_conds (thd=thd@entry=0x148be8000d58, tables=tables@entry=0x148be8013450, leaves=@0x148be8013068: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x148be8015608, last = 0x148be8015608, elements = 1}, <No data fields>}, conds=conds@entry=0x148be8015320) at /test/10.5_dbg/sql/sql_base.cc:8455
|
#22 0x0000560ec1057d15 in setup_without_group (reserved=0x148be801314c, hidden_group_fields=0x148be80151f7, win_funcs=@0x148be8013288: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x560ec23f65c0 <end_of_list>, last = 0x148be8013288, elements = 0}, <No data fields>}, win_specs=@0x148be8013270: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x560ec23f65c0 <end_of_list>, last = 0x148be8013270, elements = 0}, <No data fields>}, group=0x0, order=0x0, conds=0x148be8015320, all_fields=@0x148be8015238: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x148be8013408, last = 0x148be8013408, elements = 2}, <No data fields>}, fields=@0x148be8012f78: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x148be8013408, last = 0x148be80158c8, elements = 2}, <No data fields>}, leaves=@0x148be8013068: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x148be8015608, last = 0x148be8015608, elements = 1}, <No data fields>}, tables=0x148be8013450, ref_pointer_array=<optimized out>, thd=0x148be8000d58) at /test/10.5_dbg/sql/sql_select.cc:748
|
#23 JOIN::prepare (this=this@entry=0x148be8014f08, tables_init=tables_init@entry=0x148be8013450, conds_init=conds_init@entry=0x148be80143a0, og_num=og_num@entry=0, order_init=order_init@entry=0x0, skip_order_by=skip_order_by@entry=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x148be8012e10, unit_arg=0x148be8004d08) at /test/10.5_dbg/sql/sql_select.cc:1314
|
#24 0x0000560ec106e522 in mysql_select (thd=thd@entry=0x148be8000d58, tables=0x148be8013450, fields=@0x148be8012f78: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x148be8013408, last = 0x148be80158c8, elements = 2}, <No data fields>}, conds=0x148be80143a0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x148be8014ee0, unit=0x148be8004d08, select_lex=0x148be8012e10) at /test/10.5_dbg/sql/sql_select.cc:4813
|
#25 0x0000560ec106e778 in handle_select (thd=thd@entry=0x148be8000d58, lex=lex@entry=0x148be8004c40, result=result@entry=0x148be8014ee0, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.5_dbg/sql/sql_select.cc:445
|
#26 0x0000560ec0ff0678 in execute_sqlcom_select (thd=thd@entry=0x148be8000d58, all_tables=0x148be8013450) at /test/10.5_dbg/sql/sql_parse.cc:6319
|
#27 0x0000560ec0ffb923 in mysql_execute_command (thd=thd@entry=0x148be8000d58) at /test/10.5_dbg/sql/sql_parse.cc:4008
|
#28 0x0000560ec1002d16 in mysql_parse (thd=thd@entry=0x148be8000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x148c2a7af2d0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:8091
|
#29 0x0000560ec100502d in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x148be8000d58, packet=packet@entry=0x148be800a9b9 "SELECT * FROM t WHERE (a,b) IN (('',''),('',''))", packet_length=packet_length@entry=48, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_class.h:238
|
#30 0x0000560ec100734c in do_command (thd=0x148be8000d58) at /test/10.5_dbg/sql/sql_parse.cc:1375
|
#31 0x0000560ec112d165 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x560ec4a1b398, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1416
|
#32 0x0000560ec112d3c3 in handle_one_connection (arg=0x560ec4a1b398) at /test/10.5_dbg/sql/sql_connect.cc:1318
|
#33 0x0000148c436a8b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
|
#34 0x0000148c4373aa00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
|
10.6.13 6aec87544c675751141100d6efe3a2d943cb528f (Debug)
|
mariadbd: /test/10.6_dbg/sql/sql_type_fixedbin.h:1057: int FixedBinTypeBundle<FbtImpl>::cmp_item_fbt::compare(cmp_item*) [with FbtImpl = Inet6]: Assertion `!m_null_value' failed.
|
|
10.6.13 6aec87544c675751141100d6efe3a2d943cb528f (Debug)
|
Core was generated by `/test/MD110223-mariadb-10.6.13-linux-x86_64-dbg/bin/mariadbd --no-defaults --co'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=23124172789312)
|
at ./nptl/pthread_kill.c:44
|
[Current thread is 1 (Thread 0x1508041ad640 (LWP 3645816))]
|
(gdb) bt
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=23124172789312) at ./nptl/pthread_kill.c:44
|
#1 __pthread_kill_internal (signo=6, threadid=23124172789312) at ./nptl/pthread_kill.c:78
|
#2 __GI___pthread_kill (threadid=23124172789312, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
|
#3 0x000015081d426476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
|
#4 0x000015081d40c7f3 in __GI_abort () at ./stdlib/abort.c:79
|
#5 0x000015081d40c71b in __assert_fail_base (fmt=0x15081d5c1150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55c6507d4265 "!m_null_value", file=0x55c6507d3670 "/test/10.6_dbg/sql/sql_type_fixedbin.h", line=1057, function=<optimized out>) at ./assert/assert.c:92
|
#6 0x000015081d41de96 in __GI___assert_fail (assertion=0x55c6507d4265 "!m_null_value", file=0x55c6507d3670 "/test/10.6_dbg/sql/sql_type_fixedbin.h", line=1057, function=0x55c6507d4288 "int FixedBinTypeBundle<FbtImpl>::cmp_item_fbt::compare(cmp_item*) [with FbtImpl = Inet6]") at ./assert/assert.c:101
|
#7 0x000055c6502392c0 in FixedBinTypeBundle<Inet6>::cmp_item_fbt::compare (this=0x1507a8015cc8, ci=0x1507a8015d40) at /test/10.6_dbg/sql/sql_type_fixedbin.h:1057
|
#8 0x000055c64fa80ff3 in cmp_item_row::compare (this=0x1507a8015b40, c=0x1507a8015b60) at /test/10.6_dbg/sql/item_cmpfunc.cc:4155
|
#9 0x000055c64fa80db4 in cmp_row (cmp_arg=cmp_arg@entry=0x0, a=a@entry=0x1507a8015b40, b=b@entry=0x1507a8015b60) at /test/10.6_dbg/sql/item_cmpfunc.cc:3639
|
#10 0x000055c6500fc2e1 in my_qsort2 (base_ptr=<optimized out>, count=2, size=32, cmp=<optimized out>, cmp_argument=<optimized out>) at /test/10.6_dbg/mysys/mf_qsort.c:131
|
#11 0x000055c64fa93369 in in_vector::sort (this=<optimized out>) at /test/10.6_dbg/sql/item_cmpfunc.h:1473
|
#12 Item_func_in::fix_in_vector (this=this@entry=0x1507a8014518) at /test/10.6_dbg/sql/item_cmpfunc.cc:4524
|
#13 0x000055c64fa9390e in Item_func_in::fix_for_row_comparison_using_bisection (this=this@entry=0x1507a8014518, thd=thd@entry=0x1507a8000d58) at /test/10.6_dbg/sql/item_cmpfunc.cc:4664
|
#14 0x000055c64f97104e in Type_handler_row::Item_func_in_fix_comparator_compatible_types (this=<optimized out>, thd=0x1507a8000d58, func=0x1507a8014518) at /test/10.6_dbg/sql/sql_type.cc:5930
|
#15 0x000055c64fa99633 in Item_func_in::fix_length_and_dec (this=0x1507a8014518) at /test/10.6_dbg/sql/item_cmpfunc.cc:4478
|
#16 0x000055c64fac2752 in Item_func::fix_fields (this=0x1507a8014518, thd=0x1507a8000d58, ref=<optimized out>) at /test/10.6_dbg/sql/item_func.cc:362
|
#17 0x000055c64fa9272f in Item_func_in::fix_fields (this=<optimized out>, thd=<optimized out>, ref=<optimized out>) at /test/10.6_dbg/sql/item_cmpfunc.cc:4343
|
#18 0x000055c64f72f623 in Item::fix_fields_if_needed (ref=0x1507a8015470, thd=0x1507a8000d58, this=0x1507a8014518) at /test/10.6_dbg/sql/item.h:1147
|
#19 Item::fix_fields_if_needed_for_scalar (ref=0x1507a8015470, thd=0x1507a8000d58, this=0x1507a8014518) at /test/10.6_dbg/sql/item.h:1156
|
#20 Item::fix_fields_if_needed_for_bool (ref=0x1507a8015470, thd=0x1507a8000d58, this=0x1507a8014518) at /test/10.6_dbg/sql/item.h:1160
|
#21 setup_conds (thd=thd@entry=0x1507a8000d58, tables=tables@entry=0x1507a80136f0, leaves=@0x1507a80132f8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1507a8015758, last = 0x1507a8015758, elements = 1}, <No data fields>}, conds=conds@entry=0x1507a8015470) at /test/10.6_dbg/sql/sql_base.cc:8542
|
#22 0x000055c64f7fe708 in setup_without_group (reserved=0x1507a80134cc, hidden_group_fields=0x1507a8015347, win_funcs=@0x1507a8013568: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55c650b76f40 <end_of_list>, last = 0x1507a8013568, elements = 0}, <No data fields>}, win_specs=@0x1507a8013550: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55c650b76f40 <end_of_list>, last = 0x1507a8013550, elements = 0}, <No data fields>}, group=0x0, order=0x0, conds=0x1507a8015470, all_fields=@0x1507a8015388: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1507a80136a8, last = 0x1507a80136a8, elements = 2}, <No data fields>}, fields=@0x1507a8013398: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1507a80136a8, last = 0x1507a80159c8, elements = 2}, <No data fields>}, leaves=@0x1507a80132f8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1507a8015758, last = 0x1507a8015758, elements = 1}, <No data fields>}, tables=0x1507a80136f0, ref_pointer_array=<optimized out>, thd=0x1507a8000d58) at /test/10.6_dbg/sql/sql_select.cc:857
|
#23 JOIN::prepare (this=this@entry=0x1507a8015028, tables_init=tables_init@entry=0x1507a80136f0, conds_init=conds_init@entry=0x1507a8014518, og_num=og_num@entry=0, order_init=order_init@entry=0x0, skip_order_by=skip_order_by@entry=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x1507a80130e0, unit_arg=0x1507a8004ec8) at /test/10.6_dbg/sql/sql_select.cc:1437
|
#24 0x000055c64f815460 in mysql_select (thd=thd@entry=0x1507a8000d58, tables=0x1507a80136f0, fields=@0x1507a8013398: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1507a80136a8, last = 0x1507a80159c8, elements = 2}, <No data fields>}, conds=0x1507a8014518, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x1507a8015000, unit=0x1507a8004ec8, select_lex=0x1507a80130e0) at /test/10.6_dbg/sql/sql_select.cc:5038
|
#25 0x000055c64f81564f in handle_select (thd=thd@entry=0x1507a8000d58, lex=lex@entry=0x1507a8004e00, result=result@entry=0x1507a8015000, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.6_dbg/sql/sql_select.cc:554
|
#26 0x000055c64f79331c in execute_sqlcom_select (thd=thd@entry=0x1507a8000d58, all_tables=0x1507a80136f0) at /test/10.6_dbg/sql/sql_parse.cc:6261
|
#27 0x000055c64f79e972 in mysql_execute_command (thd=thd@entry=0x1507a8000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.6_dbg/sql/sql_parse.cc:3949
|
#28 0x000055c64f7a5a67 in mysql_parse (thd=thd@entry=0x1507a8000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1508041ac2d0) at /test/10.6_dbg/sql/sql_parse.cc:8021
|
#29 0x000055c64f7a7bfb in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1507a8000d58, packet=packet@entry=0x1507a800ac89 "SELECT * FROM t WHERE (a,b) IN (('',''),('',''))", packet_length=packet_length@entry=48, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:240
|
#30 0x000055c64f7a9a54 in do_command (thd=0x1507a8000d58, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1409
|
#31 0x000055c64f8dddf6 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55c652fef498, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1416
|
#32 0x000055c64f8de055 in handle_one_connection (arg=0x55c652fef498) at /test/10.6_dbg/sql/sql_connect.cc:1318
|
#33 0x000015081d478b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
|
#34 0x000015081d50aa00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
Bug confirmed present in:
MariaDB: 10.5.20 (dbg), 10.6.13 (dbg), 10.7.8 (dbg), 10.8.8 (dbg), 10.9.6 (dbg), 10.10.4 (dbg), 10.11.2 (dbg), 11.0.1 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.3.38 (dbg), 10.3.38 (opt), 10.4.29 (dbg), 10.4.29 (opt), 10.5.20 (opt), 10.6.13 (opt), 10.7.8 (opt), 10.8.8 (opt), 10.9.6 (opt), 10.10.4 (opt), 10.11.2 (opt), 11.0.1 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.40 (dbg), 5.7.40 (opt), 8.0.31 (dbg), 8.0.31 (opt)
|