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

Assertion `args[0] == args[2] || thd->stmt_arena->is_stmt_execute()' failed in Item_func_nullif::fix_length_and_dec()

    XMLWordPrintable

    Details

      Description

      CREATE TABLE t1 (i INT);
      CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1;
      SELECT * FROM v1 WHERE NULLIF(NULL, i);
      

      10.2 c35b8c46b404d035e54a23d667da5dff6502fc2e

      mysqld: /data/src/10.2/sql/item_cmpfunc.cc:2557: virtual void Item_func_nullif::fix_length_and_dec(): Assertion `args[0] == args[2] || thd->stmt_arena->is_stmt_execute()' failed.
      161218  0:56:34 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007ff593547312 in __GI___assert_fail (assertion=0x7ff5960e04a8 "args[0] == args[2] || thd->stmt_arena->is_stmt_execute()", file=0x7ff5960e0350 "/data/src/10.2/sql/item_cmpfunc.cc", line=2557, function=0x7ff5960e1740 <Item_func_nullif::fix_length_and_dec()::__PRETTY_FUNCTION__> "virtual void Item_func_nullif::fix_length_and_dec()") at assert.c:101
      #8  0x00007ff5959036c4 in Item_func_nullif::fix_length_and_dec (this=0x7ff58a468000) at /data/src/10.2/sql/item_cmpfunc.cc:2557
      #9  0x00007ff59592d44e in Item_func::fix_fields (this=0x7ff58a468000, thd=0x7ff58a416070, ref=<optimized out>) at /data/src/10.2/sql/item_func.cc:236
      #10 0x00007ff595748d7d in JOIN::optimize_inner (this=this@entry=0x7ff58a467708) at /data/src/10.2/sql/sql_select.cc:1258
      #11 0x00007ff59574922f in JOIN::optimize (this=this@entry=0x7ff58a467708) at /data/src/10.2/sql/sql_select.cc:1076
      #12 0x00007ff5956bc255 in mysql_derived_optimize (thd=0x7ff58a416070, lex=0x7ff58a419a80, derived=0x7ff58a464288) at /data/src/10.2/sql/sql_derived.cc:866
      #13 0x00007ff5956bbdb1 in mysql_handle_single_derived (lex=0x7ff58a419a80, derived=derived@entry=0x7ff58a464288, phases=phases@entry=4) at /data/src/10.2/sql/sql_derived.cc:197
      #14 0x00007ff595745ce9 in JOIN::optimize_inner (this=this@entry=0x7ff58a4670f0) at /data/src/10.2/sql/sql_select.cc:1298
      #15 0x00007ff59574922f in JOIN::optimize (this=this@entry=0x7ff58a4670f0) at /data/src/10.2/sql/sql_select.cc:1076
      #16 0x00007ff595749bd5 in mysql_select (thd=thd@entry=0x7ff58a416070, tables=0x7ff58a464288, wild_num=1, fields=..., conds=0x7ff58a464a80, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7ff58a4670d0, unit=0x7ff58a419b48, select_lex=0x7ff58a41a278) at /data/src/10.2/sql/sql_select.cc:3570
      #17 0x00007ff595749e8d in handle_select (thd=thd@entry=0x7ff58a416070, lex=lex@entry=0x7ff58a419a80, result=result@entry=0x7ff58a4670d0, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/src/10.2/sql/sql_select.cc:373
      #18 0x00007ff5956da849 in execute_sqlcom_select (thd=thd@entry=0x7ff58a416070, all_tables=0x7ff58a464288) at /data/src/10.2/sql/sql_parse.cc:6347
      #19 0x00007ff5956e36d2 in mysql_execute_command (thd=thd@entry=0x7ff58a416070) at /data/src/10.2/sql/sql_parse.cc:3370
      #20 0x00007ff5956ed2d2 in mysql_parse (thd=thd@entry=0x7ff58a416070, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7ff5966ef8e0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.2/sql/sql_parse.cc:7790
      #21 0x00007ff5956ef55b in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7ff58a416070, packet=packet@entry=0x7ff58a458071 "SELECT * FROM v1 WHERE NULLIF(NULL, i)", packet_length=packet_length@entry=38, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.2/sql/sql_parse.cc:1799
      #22 0x00007ff5956f208d in do_command (thd=0x7ff58a416070) at /data/src/10.2/sql/sql_parse.cc:1359
      #23 0x00007ff5957dff4a in do_handle_one_connection (connect=connect@entry=0x7ff592871410) at /data/src/10.2/sql/sql_connect.cc:1354
      #24 0x00007ff5957e0133 in handle_one_connection (arg=arg@entry=0x7ff592871410) at /data/src/10.2/sql/sql_connect.cc:1260
      #25 0x00007ff595a8e1bf in pfs_spawn_thread (arg=0x7ff592815df0) at /data/src/10.2/storage/perfschema/pfs.cc:1862
      #26 0x00007ff594de10a4 in start_thread (arg=0x7ff5966f1300) at pthread_create.c:309
      #27 0x00007ff59360187d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

        Attachments

          Activity

            People

            Assignee:
            igor Igor Babaev
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: