Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-27207

Assertion `!m_null_value' failed in int FixedBinTypeBundle<FbtImpl>::cmp_item_fbt::compare or in cmp_item_inet6::compare

    XMLWordPrintable

Details

    Description

      CREATE TABLE t0 (a UUID,b INT) ENGINE=INNODB;
      SELECT * FROM t0 WHERE (t0.a,t0.b) IN ( ('',0),('',0));
      

      Leads to:

      10.8.0 1e8bcbd0a0bfa07052e9458830672ea215c8664a (Debug)

      mysqld: /test/10.8_dbg/sql/sql_type_fixedbin.h:1057: int FixedBinTypeBundle<FbtImpl>::cmp_item_fbt::compare(cmp_item*) [with FbtImpl = UUID]: Assertion `!m_null_value' failed.
      

      10.8.0 1e8bcbd0a0bfa07052e9458830672ea215c8664a (Debug)

      Core was generated by `/test/MD091221-mariadb-10.8.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x152af815c700 (LWP 333531))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x0000152b0c9d4859 in __GI_abort () at abort.c:79
      #2  0x0000152b0c9d4729 in __assert_fail_base (fmt=0x152b0cb6a588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5585286db90d "!m_null_value", file=0x5585286da8a0 "/test/10.8_dbg/sql/sql_type_fixedbin.h", line=1057, function=<optimized out>) at assert.c:92
      #3  0x0000152b0c9e5f36 in __GI___assert_fail (assertion=assertion@entry=0x5585286db90d "!m_null_value", file=file@entry=0x5585286da8a0 "/test/10.8_dbg/sql/sql_type_fixedbin.h", line=line@entry=1057, function=function@entry=0x5585286dda88 "int FixedBinTypeBundle<FbtImpl>::cmp_item_fbt::compare(cmp_item*) [with FbtImpl = UUID]") at assert.c:101
      #4  0x00005585280dc52b in FixedBinTypeBundle<UUID>::cmp_item_fbt::compare (this=0x152ab40167d8, ci=0x152ab4016830) at /test/10.8_dbg/plugin/type_uuid/sql_type_uuid.h:83
      #5  0x00005585277ba691 in cmp_item_row::compare (this=0x152ab4016700, c=0x152ab4016720) at /test/10.8_dbg/sql/item_cmpfunc.cc:4140
      #6  0x00005585277ba420 in cmp_row (cmp_arg=cmp_arg@entry=0x0, a=a@entry=0x152ab4016700, b=b@entry=0x152ab4016720) at /test/10.8_dbg/sql/item_cmpfunc.cc:3624
      #7  0x0000558527f87eeb in my_qsort2 (base_ptr=<optimized out>, count=2, size=32, cmp=<optimized out>, cmp_argument=0x0) at /test/10.8_dbg/mysys/mf_qsort.c:131
      #8  0x00005585277cdf8e in in_vector::sort (this=<optimized out>) at /test/10.8_dbg/sql/item_cmpfunc.h:1462
      #9  Item_func_in::fix_in_vector (this=this@entry=0x152ab4015278) at /test/10.8_dbg/sql/item_cmpfunc.cc:4459
      #10 0x00005585277ce72a in Item_func_in::fix_for_row_comparison_using_bisection (this=this@entry=0x152ab4015278, thd=thd@entry=0x152ab4000db8) at /test/10.8_dbg/sql/item_cmpfunc.cc:4599
      #11 0x00005585276801fd in Type_handler_row::Item_func_in_fix_comparator_compatible_types (this=<optimized out>, thd=0x152ab4000db8, func=0x152ab4015278) at /test/10.8_dbg/sql/item.h:1065
      #12 0x00005585277d3c33 in Item_func_in::fix_length_and_dec (this=0x152ab4015278) at /test/10.8_dbg/sql/sql_type.h:7438
      #13 0x00005585277fce02 in Item_func::fix_fields (this=0x152ab4015278, thd=0x152ab4000db8, ref=<optimized out>) at /test/10.8_dbg/sql/item_func.cc:359
      #14 0x00005585277cdafb in Item_func_in::fix_fields (this=<optimized out>, thd=<optimized out>, ref=<optimized out>) at /test/10.8_dbg/sql/item_cmpfunc.cc:4328
      #15 0x00005585273dffa2 in Item::fix_fields_if_needed (ref=0x152ab40161b0, thd=0x152ab4000db8, this=0x152ab4015278) at /test/10.8_dbg/sql/item.h:1152
      #16 Item::fix_fields_if_needed_for_scalar (ref=0x152ab40161b0, thd=0x152ab4000db8, this=0x152ab4015278) at /test/10.8_dbg/sql/item.h:1148
      #17 Item::fix_fields_if_needed_for_bool (ref=0x152ab40161b0, thd=0x152ab4000db8, this=0x152ab4015278) at /test/10.8_dbg/sql/item.h:1152
      #18 setup_conds (thd=thd@entry=0x152ab4000db8, tables=tables@entry=0x152ab4014468, leaves=@0x152ab40140a8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x152ab4016318, last = 0x152ab4016318, elements = 1}, <No data fields>}, conds=conds@entry=0x152ab40161b0) at /test/10.8_dbg/sql/sql_base.cc:8468
      #19 0x00005585274ebbf4 in setup_without_group (reserved=0x152ab401424c, hidden_group_fields=0x152ab4016077, win_funcs=@0x152ab40142e0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x558528abab00 <end_of_list>, last = 0x152ab40142e0, elements = 0}, <No data fields>}, win_specs=@0x152ab40142c8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x558528abab00 <end_of_list>, last = 0x152ab40142c8, elements = 0}, <No data fields>}, group=0x0, order=0x0, conds=0x152ab40161b0, all_fields=@0x152ab40160c8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x152ab4014420, last = 0x152ab4014420, elements = 2}, <No data fields>}, fields=@0x152ab4014130: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x152ab4014420, last = 0x152ab4016588, elements = 2}, <No data fields>}, leaves=@0x152ab40140a8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x152ab4016318, last = 0x152ab4016318, elements = 1}, <No data fields>}, tables=0x152ab4014468, ref_pointer_array=<optimized out>, thd=0x152ab4000db8) at /test/10.8_dbg/sql/sql_select.cc:833
      #20 JOIN::prepare (this=this@entry=0x152ab4015d60, tables_init=tables_init@entry=0x152ab4014468, conds_init=conds_init@entry=0x152ab4015278, 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=0x152ab4013e90, unit_arg=0x152ab40051c0) at /test/10.8_dbg/sql/sql_select.cc:1403
      #21 0x0000558527504bc9 in mysql_select (thd=thd@entry=0x152ab4000db8, tables=0x152ab4014468, fields=@0x152ab4014130: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x152ab4014420, last = 0x152ab4016588, elements = 2}, <No data fields>}, conds=0x152ab4015278, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x152ab4015d38, unit=0x152ab40051c0, select_lex=0x152ab4013e90) at /test/10.8_dbg/sql/sql_select.cc:4968
      #22 0x0000558527504ef0 in handle_select (thd=thd@entry=0x152ab4000db8, lex=lex@entry=0x152ab40050e8, result=result@entry=0x152ab4015d38, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.8_dbg/sql/sql_select.cc:545
      #23 0x0000558527464a72 in execute_sqlcom_select (thd=thd@entry=0x152ab4000db8, all_tables=0x152ab4014468) at /test/10.8_dbg/sql/sql_parse.cc:6253
      #24 0x0000558527471932 in mysql_execute_command (thd=thd@entry=0x152ab4000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.8_dbg/sql/sql_parse.cc:3944
      #25 0x000055852745dc64 in mysql_parse (thd=thd@entry=0x152ab4000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x152af815b400) at /test/10.8_dbg/sql/sql_parse.cc:8028
      #26 0x000055852746c8e9 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x152ab4000db8, packet=packet@entry=0x152ab400b879 "SELECT * FROM t0 WHERE (a,b) IN ( ('',0),('',0))", packet_length=packet_length@entry=48, blocking=blocking@entry=true) at /test/10.8_dbg/sql/sql_class.h:1360
      #27 0x000055852746fd2b in do_command (thd=0x152ab4000db8, blocking=blocking@entry=true) at /test/10.8_dbg/sql/sql_parse.cc:1402
      #28 0x00005585275e91c0 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55852afaad68, put_in_cache=put_in_cache@entry=true) at /test/10.8_dbg/sql/sql_connect.cc:1418
      #29 0x00005585275e97c5 in handle_one_connection (arg=arg@entry=0x55852afaad68) at /test/10.8_dbg/sql/sql_connect.cc:1312
      #30 0x0000558527a6bde6 in pfs_spawn_thread (arg=0x55852aebe688) at /test/10.8_dbg/storage/perfschema/pfs.cc:2201
      #31 0x0000152b0cee2609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #32 0x0000152b0cad1293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.7.1 (dbg), 10.8.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.41 (dbg), 10.2.41 (opt), 10.3.32 (dbg), 10.3.32 (opt), 10.4.22 (dbg), 10.4.22 (opt), 10.5.13 (dbg), 10.5.13 (opt), 10.6.5 (dbg), 10.6.5 (opt), 10.7.1 (opt), 10.8.0 (opt)

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.