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

Assertion `elem->cmp_type() != TIME_RESULT' failed in virtual void cmp_item_row::store_value(Item*)

    XMLWordPrintable

    Details

      Description

      CREATE TABLE t (a DATE);
      INSERT INTO t VALUES();
      SELECT ROW(a, (a,a)) IN ((1, (1,1)),(2, (2,2))) FROM t;
      

      PS : 10.2 crashes with different assertion.
      Leads to:

      10.3.35 0635088deb7a8440d918d5f988c7042f9deb59e3 (Debug)

      mysqld: /test/10.3_dbg/sql/item_cmpfunc.cc:3921: virtual void cmp_item_row::store_value(Item*): Assertion `elem->cmp_type() != TIME_RESULT' failed.
      

      10.3.35 0635088deb7a8440d918d5f988c7042f9deb59e3 (Debug)

      Core was generated by `/test/MD020322-mariadb-10.3.35-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 0x14ab1c0d7700 (LWP 139152))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014ab3379f859 in __GI_abort () at abort.c:79
      #2  0x000014ab3379f729 in __assert_fail_base (fmt=0x14ab33935588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55c8c92bafb0 "elem->cmp_type() != TIME_RESULT", file=0x55c8c92b9890 "/test/10.3_dbg/sql/item_cmpfunc.cc", line=3921, function=<optimized out>) at assert.c:92
      #3  0x000014ab337b0f36 in __GI___assert_fail (assertion=assertion@entry=0x55c8c92bafb0 "elem->cmp_type() != TIME_RESULT", file=file@entry=0x55c8c92b9890 "/test/10.3_dbg/sql/item_cmpfunc.cc", line=line@entry=3921, function=function@entry=0x55c8c92bafd0 "virtual void cmp_item_row::store_value(Item*)") at assert.c:101
      #4  0x000055c8c889e2a5 in cmp_item_row::store_value (this=0x14aac8015498, item=0x14aac80119d0) at /test/10.3_dbg/sql/item.h:916
      #5  0x000055c8c889e2d9 in cmp_item_row::store_value (this=0x14aac8013570, item=0x14aac8011ac8) at /test/10.3_dbg/sql/item_cmpfunc.cc:3930
      #6  0x000055c8c889f2f6 in Predicant_to_list_comparator::cmp_arg (i=0, args=0x14aac80123c8, this=0x14aac8012420) at /test/10.3_dbg/sql/item.h:2367
      #7  Predicant_to_list_comparator::cmp (found_unknown_values=0x14aac80123b6, idx=<synthetic pointer>, args=0x14aac80123c8, this=0x14aac8012420) at /test/10.3_dbg/sql/item_cmpfunc.h:2071
      #8  Item_func_in::val_int (this=0x14aac8012340) at /test/10.3_dbg/sql/item_cmpfunc.cc:4459
      #9  0x000055c8c887ac85 in Item::save_int_in_field (this=0x14aac8012340, field=0x14aac802c1a8, no_conversions=<optimized out>) at /test/10.3_dbg/sql/item.cc:6990
      #10 0x000055c8c8762cf6 in Type_handler_int_result::Item_save_in_field (this=<optimized out>, item=<optimized out>, field=<optimized out>, no_conversions=<optimized out>) at /test/10.3_dbg/sql/sql_type.cc:2592
      #11 0x000055c8c8861da7 in Item::save_in_field (this=0x14aac8012340, field=0x14aac802c1a8, no_conversions=<optimized out>) at /test/10.3_dbg/sql/item.cc:7000
      #12 0x000055c8c856b53b in Item_result_field::save_in_result_field (this=<optimized out>, no_conversions=<optimized out>) at /test/10.3_dbg/sql/item.h:2902
      #13 0x000055c8c861fec8 in copy_funcs (func_ptr=0x14aac802be80, thd=0x14aac8000d90) at /test/10.3_dbg/sql/sql_select.cc:24976
      #14 0x000055c8c861ff82 in end_write (join=0x14aac8012cd8, join_tab=0x14aac80144b8, end_of_records=<optimized out>) at /test/10.3_dbg/sql/sql_select.cc:21299
      #15 0x000055c8c862e701 in AGGR_OP::put_record (this=this@entry=0x14aac8014d20, end_of_records=end_of_records@entry=false) at /test/10.3_dbg/sql/sql_select.cc:27977
      #16 0x000055c8c862efe9 in AGGR_OP::put_record (this=0x14aac8014d20) at /test/10.3_dbg/sql/sql_select.h:1030
      #17 sub_select_postjoin_aggr (join=0x14aac8012cd8, join_tab=0x14aac80144b8, end_of_records=<optimized out>) at /test/10.3_dbg/sql/sql_select.cc:19603
      #18 0x000055c8c85f69f7 in evaluate_join_record (join=join@entry=0x14aac8012cd8, join_tab=join_tab@entry=0x14aac8014128, error=error@entry=0) at /test/10.3_dbg/sql/sql_select.cc:20108
      #19 0x000055c8c8605b6a in sub_select (join=0x14aac8012cd8, join_tab=0x14aac8014128, end_of_records=<optimized out>) at /test/10.3_dbg/sql/sql_select.cc:19881
      #20 0x000055c8c8636e34 in do_select (procedure=<optimized out>, join=0x14aac8012cd8) at /test/10.3_dbg/sql/sql_select.cc:19419
      #21 JOIN::exec_inner (this=this@entry=0x14aac8012cd8) at /test/10.3_dbg/sql/sql_select.cc:4150
      #22 0x000055c8c8637230 in JOIN::exec (this=this@entry=0x14aac8012cd8) at /test/10.3_dbg/sql/sql_select.cc:3944
      #23 0x000055c8c8637c78 in mysql_select (thd=thd@entry=0x14aac8000d90, tables=0x14aac8012578, wild_num=0, fields=@0x14aac8005500: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14aac80124b0, last = 0x14aac80124b0, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147879680, result=0x14aac8012cb0, unit=0x14aac8004c40, select_lex=0x14aac80053d8) at /test/10.3_dbg/sql/sql_select.cc:4353
      #24 0x000055c8c8637f27 in handle_select (thd=thd@entry=0x14aac8000d90, lex=lex@entry=0x14aac8004b80, result=result@entry=0x14aac8012cb0, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.3_dbg/sql/sql_select.cc:372
      #25 0x000055c8c85afb19 in execute_sqlcom_select (thd=thd@entry=0x14aac8000d90, all_tables=0x14aac8012578) at /test/10.3_dbg/sql/sql_parse.cc:6339
      #26 0x000055c8c85baaa4 in mysql_execute_command (thd=thd@entry=0x14aac8000d90) at /test/10.3_dbg/sql/sql_parse.cc:3870
      #27 0x000055c8c85c4dee in mysql_parse (thd=thd@entry=0x14aac8000d90, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14ab1c0d6530, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.3_dbg/sql/sql_parse.cc:7870
      #28 0x000055c8c85c755c in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14aac8000d90, packet=packet@entry=0x14aac80198f1 "", packet_length=packet_length@entry=54, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.3_dbg/sql/sql_class.h:1152
      #29 0x000055c8c85ca6f7 in do_command (thd=0x14aac8000d90) at /test/10.3_dbg/sql/sql_parse.cc:1398
      #30 0x000055c8c86f1cc1 in do_handle_one_connection (connect=connect@entry=0x55c8cb55d780) at /test/10.3_dbg/sql/sql_connect.cc:1403
      #31 0x000055c8c86f1ef8 in handle_one_connection (arg=0x55c8cb55d780) at /test/10.3_dbg/sql/sql_connect.cc:1308
      #32 0x000014ab33975609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #33 0x000014ab3389c293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.2.44 (Debug)

      mysqld: /test/10.2_dbg/sql/item_cmpfunc.cc:3937: virtual void cmp_item_row::store_value(Item*): Assertion `item->element_index(i)->cmp_type() != TIME_RESULT' failed.
      

      10.2.44 (Debug)

      Core was generated by `/test/MD020322-mariadb-10.2.44-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x150851a47700 (LWP 123020))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000555ab9b50bb8 in my_write_core (sig=sig@entry=6) at /test/10.2_dbg/mysys/stacktrace.c:382
      #2  0x0000555ab9435123 in handle_fatal_signal (sig=6) at /test/10.2_dbg/sql/signal_handler.cc:355
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x000015086cb72859 in __GI_abort () at abort.c:79
      #6  0x000015086cb72729 in __assert_fail_base (fmt=0x15086cd08588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x555ab9cc19c0 "item->element_index(i)->cmp_type() != TIME_RESULT", file=0x555ab9cc06a8 "/test/10.2_dbg/sql/item_cmpfunc.cc", line=3937, function=<optimized out>) at assert.c:92
      #7  0x000015086cb83f36 in __GI___assert_fail (assertion=assertion@entry=0x555ab9cc19c0 "item->element_index(i)->cmp_type() != TIME_RESULT", file=file@entry=0x555ab9cc06a8 "/test/10.2_dbg/sql/item_cmpfunc.cc", line=line@entry=3937, function=function@entry=0x555ab9cc1990 "virtual void cmp_item_row::store_value(Item*)") at assert.c:101
      #8  0x0000555ab947e7da in cmp_item_row::store_value (this=0x15080c015178, item=0x15080c0115d0) at /test/10.2_dbg/sql/item_cmpfunc.cc:3938
      #9  0x0000555ab947e83e in cmp_item_row::store_value (this=0x15080c0130b0, item=0x15080c0116c8) at /test/10.2_dbg/sql/item_cmpfunc.cc:3947
      #10 0x0000555ab947f624 in Item_func_in::val_int (this=0x15080c011f40) at /test/10.2_dbg/sql/item_cmpfunc.cc:4472
      #11 0x0000555ab9451002 in Item::save_in_field (this=0x15080c011f40, field=0x15080c029ca8, no_conversions=<optimized out>) at /test/10.2_dbg/sql/item.cc:6473
      #12 0x0000555ab91f77f8 in Item_result_field::save_in_result_field (this=<optimized out>, no_conversions=<optimized out>) at /test/10.2_dbg/sql/item.h:2565
      #13 0x0000555ab9286f60 in copy_funcs (func_ptr=0x15080c029988, thd=0x15080c000d90) at /test/10.2_dbg/sql/sql_select.cc:23985
      #14 0x0000555ab928704b in end_write (join=0x15080c012818, join_tab=0x15080c014190, end_of_records=<optimized out>) at /test/10.2_dbg/sql/sql_select.cc:20318
      #15 0x0000555ab9294181 in AGGR_OP::put_record (this=this@entry=0x15080c014a18, end_of_records=end_of_records@entry=false) at /test/10.2_dbg/sql/sql_select.cc:26902
      #16 0x0000555ab92949b0 in AGGR_OP::put_record (this=0x15080c014a18) at /test/10.2_dbg/sql/sql_select.h:973
      #17 sub_select_postjoin_aggr (join=0x15080c012818, join_tab=0x15080c014190, end_of_records=<optimized out>) at /test/10.2_dbg/sql/sql_select.cc:18629
      #18 0x0000555ab9265223 in evaluate_join_record (join=join@entry=0x15080c012818, join_tab=join_tab@entry=0x15080c013de0, error=error@entry=0) at /test/10.2_dbg/sql/sql_select.cc:19135
      #19 0x0000555ab926ee80 in sub_select (join=0x15080c012818, join_tab=0x15080c013de0, end_of_records=<optimized out>) at /test/10.2_dbg/sql/sql_select.cc:18908
      #20 0x0000555ab929b628 in do_select (procedure=0x0, join=0x15080c012818) at /test/10.2_dbg/sql/sql_select.cc:18451
      #21 JOIN::exec_inner (this=this@entry=0x15080c012818) at /test/10.2_dbg/sql/sql_select.cc:3651
      #22 0x0000555ab929b9f2 in JOIN::exec (this=this@entry=0x15080c012818) at /test/10.2_dbg/sql/sql_select.cc:3446
      #23 0x0000555ab929c3e8 in mysql_select (thd=thd@entry=0x15080c000d90, tables=0x15080c012108, wild_num=0, fields=@0x15080c005200: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x15080c012090, last = 0x15080c012090, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147879680, result=0x15080c0127f8, unit=0x15080c004988, select_lex=0x15080c0050d8) at /test/10.2_dbg/sql/sql_select.cc:3849
      #24 0x0000555ab929c67d in handle_select (thd=thd@entry=0x15080c000d90, lex=lex@entry=0x15080c0048c8, result=result@entry=0x15080c0127f8, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.2_dbg/sql/sql_select.cc:361
      #25 0x0000555ab9221b29 in execute_sqlcom_select (thd=thd@entry=0x15080c000d90, all_tables=0x15080c012108) at /test/10.2_dbg/sql/sql_parse.cc:6271
      #26 0x0000555ab922bdd6 in mysql_execute_command (thd=thd@entry=0x15080c000d90) at /test/10.2_dbg/sql/sql_parse.cc:3582
      #27 0x0000555ab9235607 in mysql_parse (thd=thd@entry=0x15080c000d90, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x150851a46540, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.2_dbg/sql/sql_parse.cc:7793
      #28 0x0000555ab9238107 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x15080c000d90, packet=packet@entry=0x15080c0195e1 "", packet_length=packet_length@entry=54, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.2_dbg/sql/sql_class.h:1109
      #29 0x0000555ab923aef5 in do_command (thd=0x15080c000d90) at /test/10.2_dbg/sql/sql_parse.cc:1381
      #30 0x0000555ab933f476 in do_handle_one_connection (connect=connect@entry=0x555abd07d9b0) at /test/10.2_dbg/sql/sql_connect.cc:1336
      #31 0x0000555ab933f6a1 in handle_one_connection (arg=0x555abd07d9b0) at /test/10.2_dbg/sql/sql_connect.cc:1241
      #32 0x000015086d07b609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #33 0x000015086cc6f293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.44 (dbg), 10.3.35 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.44 (opt), 10.3.35 (opt), 10.4.25 (dbg), 10.4.25 (opt), 10.5.16 (dbg), 10.5.16 (opt), 10.6.8 (dbg), 10.6.8 (opt), 10.7.4 (opt), 10.7.4 (dbg), 10.8.3 (dbg), 10.8.3 (opt), 10.9.0 (dbg)

        Attachments

          Activity

            People

            Assignee:
            sanja Oleksandr Byelkin
            Reporter:
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration

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