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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.1(EOL)
    • 10.1.13
    • Optimizer
    • None

    Description

      CREATE TABLE t1 (f INT);
      INSERT INTO t1 VALUES (1),(2);
      SELECT NULLIF( NOT f, 1 ) FROM t1;
      

      Stack trace from 10.1 commit 0251232f8c3bca33b4dd15d6668105f3de9d024d

      mysqld: /src/10.1/sql/item_cmpfunc.cc:2586: virtual void Item_func_nullif::fix_length_and_dec(): Assertion `args[0] == args[2] || thd->stmt_arena->is_stmt_execute()' failed.
      160226 18:26:20 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fb402e921d2 in __assert_fail () from /lib64/libc.so.6
      #8  0x0000562ed8b85e90 in Item_func_nullif::fix_length_and_dec (this=0x7fb3f9653020) at /src/10.1/sql/item_cmpfunc.cc:2586
      #9  0x0000562ed8bade6e in Item_func::fix_fields (this=0x7fb3f9653020, thd=0x7fb3fedc9270, ref=0x7fb3f96531c0) at /src/10.1/sql/item_func.cc:234
      #10 0x0000562ed88b20b9 in setup_fields (thd=0x7fb3fedc9270, ref_pointer_array=0x7fb3f9653ea0, fields=..., mark_used_columns=MARK_COLUMNS_READ, sum_func_list=0x7fb3f9653c80, allow_sum_func=true) at /src/10.1/sql/sql_base.cc:7896
      #11 0x0000562ed8949aba in JOIN::prepare (this=0x7fb3f9653920, rref_pointer_array=0x7fb3fedcd600, tables_init=0x7fb3f9653238, wild_num=0, conds_init=0x0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7fb3fedcd388, unit_arg=0x7fb3fedccc88) at /src/10.1/sql/sql_select.cc:795
      #12 0x0000562ed8953214 in mysql_select (thd=0x7fb3fedc9270, rref_pointer_array=0x7fb3fedcd600, tables=0x7fb3f9653238, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fb3f9653900, unit=0x7fb3fedccc88, select_lex=0x7fb3fedcd388) at /src/10.1/sql/sql_select.cc:3429
      #13 0x0000562ed8948d6b in handle_select (thd=0x7fb3fedc9270, lex=0x7fb3fedccbc0, result=0x7fb3f9653900, setup_tables_done_option=0) at /src/10.1/sql/sql_select.cc:384
      #14 0x0000562ed8919096 in execute_sqlcom_select (thd=0x7fb3fedc9270, all_tables=0x7fb3f9653238) at /src/10.1/sql/sql_parse.cc:5936
      #15 0x0000562ed890ee72 in mysql_execute_command (thd=0x7fb3fedc9270) at /src/10.1/sql/sql_parse.cc:2962
      #16 0x0000562ed891c6de in mysql_parse (thd=0x7fb3fedc9270, rawbuf=0x7fb3f9652cc8 "SELECT NULLIF( NOT f, 1 ) FROM t1", length=33, parser_state=0x7fb4051605e0) at /src/10.1/sql/sql_parse.cc:7336
      #17 0x0000562ed890b0d9 in dispatch_command (command=COM_QUERY, thd=0x7fb3fedc9270, packet=0x7fb3fdfc9731 "SELECT NULLIF( NOT f, 1 ) FROM t1", packet_length=33) at /src/10.1/sql/sql_parse.cc:1488
      #18 0x0000562ed8909e0b in do_command (thd=0x7fb3fedc9270) at /src/10.1/sql/sql_parse.cc:1109
      #19 0x0000562ed8a3fbc0 in do_handle_one_connection (thd_arg=0x7fb3fedc9270) at /src/10.1/sql/sql_connect.cc:1349
      #20 0x0000562ed8a3f924 in handle_one_connection (arg=0x7fb3fedc9270) at /src/10.1/sql/sql_connect.cc:1261
      #21 0x0000562ed9147a5a in pfs_spawn_thread (arg=0x7fb3fd9b0bf0) at /src/10.1/storage/perfschema/pfs.cc:1860
      #22 0x00007fb404ddb0a4 in start_thread () from /lib64/libpthread.so.0
      #23 0x00007fb402f4904d in clone () from /lib64/libc.so.6
      

      Also reproducible on bb-10.1-serg commit 5069ba1854418a2172da143875a0f1827b976ddb.
      Not reproducible on 10.0.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.