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

Assertion `args[0] == args[2] || _current_thd()->lex->context_analysis_only' failed in Item_func_nullif::print(String*, enum_query_type)

    XMLWordPrintable

Details

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

    Description

      SET NAMES utf8;
      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (f1 VARCHAR(10));
      INSERT INTO t1 VALUES ('2015-12-31');
      SELECT POWER( TIMESTAMP( NULLIF( '2002-09-08', f1 ) ), 24 ) FROM t1;
      

      Stack trace from 10.1 commit 0251232f8c3bca33b4dd15d6668105f3de9d024d

      mysqld: /src/10.1/sql/item_cmpfunc.cc:2760: virtual void Item_func_nullif::print(String*, enum_query_type): Assertion `args[0] == args[2] || _current_thd()->lex->context_analysis_only' failed.
      160226 15:50:31 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fc07cb931d2 in __assert_fail () from /lib64/libc.so.6
      #8  0x000055d2fa507238 in Item_func_nullif::print (this=0x7fc073252b78, str=0x7fc07ee5faa0, query_type=QT_ORDINARY) at /src/10.1/sql/item_cmpfunc.cc:2760
      #9  0x000055d2fa593fdd in Item_temporal_typecast::print (this=0x7fc073252d10, str=0x7fc07ee5faa0, query_type=QT_ORDINARY) at /src/10.1/sql/item_timefunc.cc:2327
      #10 0x000055d2fa52f7d3 in Item_func::print_args (this=0x7fc073252ec8, str=0x7fc07ee5faa0, from=0, query_type=QT_ORDINARY) at /src/10.1/sql/item_func.cc:465
      #11 0x000055d2fa52f741 in Item_func::print (this=0x7fc073252ec8, str=0x7fc07ee5faa0, query_type=QT_ORDINARY) at /src/10.1/sql/item_func.cc:454
      #12 0x000055d2fa545bbd in Item_func::raise_numeric_overflow (this=0x7fc073252ec8, type_name=0x55d2faca40ed "DOUBLE") at /src/10.1/sql/item_func.h:211
      #13 0x000055d2fa545c35 in Item_func::raise_float_overflow (this=0x7fc073252ec8) at /src/10.1/sql/item_func.h:216
      #14 0x000055d2fa545ce8 in Item_func::check_float_overflow (this=0x7fc073252ec8, value=inf) at /src/10.1/sql/item_func.h:235
      #15 0x000055d2fa5361d4 in Item_func_pow::val_real (this=0x7fc073252ec8) at /src/10.1/sql/item_func.cc:2224
      #16 0x000055d2fa4eedb5 in Item::send (this=0x7fc073252ec8, protocol=0x7fc0789ca380, buffer=0x7fc07ee5fd40) at /src/10.1/sql/item.cc:6448
      #17 0x000055d2fa1d9660 in Protocol::send_result_set_row (this=0x7fc0789ca380, row_items=0x7fc0789ce020) at /src/10.1/sql/protocol.cc:905
      #18 0x000055d2fa250e04 in select_send::send_data (this=0x7fc0732536c8, items=...) at /src/10.1/sql/sql_class.cc:2798
      #19 0x000055d2fa2fbb39 in end_send (join=0x7fc0732536e8, join_tab=0x0, end_of_records=false) at /src/10.1/sql/sql_select.cc:19429
      #20 0x000055d2fa2f8802 in do_select (join=0x7fc0732536e8, fields=0x7fc0789ce020, table=0x0, procedure=0x0) at /src/10.1/sql/sql_select.cc:17905
      #21 0x000055d2fa2d3a6f in JOIN::exec_inner (this=0x7fc0732536e8) at /src/10.1/sql/sql_select.cc:3228
      #22 0x000055d2fa2d0d13 in JOIN::exec (this=0x7fc0732536e8) at /src/10.1/sql/sql_select.cc:2518
      #23 0x000055d2fa2d42c6 in mysql_select (thd=0x7fc0789c9df0, rref_pointer_array=0x7fc0789ce180, tables=0x7fc073253000, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fc0732536c8, unit=0x7fc0789cd808, select_lex=0x7fc0789cdf08) at /src/10.1/sql/sql_select.cc:3451
      #24 0x000055d2fa2c9d6b in handle_select (thd=0x7fc0789c9df0, lex=0x7fc0789cd740, result=0x7fc0732536c8, setup_tables_done_option=0) at /src/10.1/sql/sql_select.cc:384
      #25 0x000055d2fa29a096 in execute_sqlcom_select (thd=0x7fc0789c9df0, all_tables=0x7fc073253000) at /src/10.1/sql/sql_parse.cc:5936
      #26 0x000055d2fa28fe72 in mysql_execute_command (thd=0x7fc0789c9df0) at /src/10.1/sql/sql_parse.cc:2962
      #27 0x000055d2fa29d6de in mysql_parse (thd=0x7fc0789c9df0, rawbuf=0x7fc073252888 "SELECT POWER( TIMESTAMP( NULLIF( '2002-09-08', f1 ) ), 24 ) FROM t1", length=67, parser_state=0x7fc07ee615e0) at /src/10.1/sql/sql_parse.cc:7336
      #28 0x000055d2fa28c0d9 in dispatch_command (command=COM_QUERY, thd=0x7fc0789c9df0, packet=0x7fc077bc9d31 "", packet_length=67) at /src/10.1/sql/sql_parse.cc:1488
      #29 0x000055d2fa28ae0b in do_command (thd=0x7fc0789c9df0) at /src/10.1/sql/sql_parse.cc:1109
      #30 0x000055d2fa3c0bc0 in do_handle_one_connection (thd_arg=0x7fc0789c9df0) at /src/10.1/sql/sql_connect.cc:1349
      #31 0x000055d2fa3c0924 in handle_one_connection (arg=0x7fc0789c9df0) at /src/10.1/sql/sql_connect.cc:1261
      #32 0x000055d2faac8a5a in pfs_spawn_thread (arg=0x7fc0775b0bf0) at /src/10.1/storage/perfschema/pfs.cc:1860
      #33 0x00007fc07eadc0a4 in start_thread () from /lib64/libpthread.so.0
      #34 0x00007fc07cc4a04d in clone () from /lib64/libc.so.6
      

      bb-10.1-serg as of commit 5069ba1854418a2172da143875a0f1827b976ddb is also affected.
      Not reproducible on 5.5, 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.