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

IN subquery crash

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.4
    • 11.4
    • Optimizer
    • None
    • Can result in hang or crash

    Description

      This query crashes on 11.4 (git SHA 4da5458ff7b1227f31a9aa24091ed5a5371d8b05 but not attributed to that commit specifically)

      SELECT (SELECT 1,2) IN ((1,2),(3,4));
      

      Contrast with MySQL 9.6.0 which gives

      mysql> SELECT (SELECT 1,2) IN ((1,2),(3,4));
      +-------------------------------+
      | (SELECT 1,2) IN ((1,2),(3,4)) |
      +-------------------------------+
      |                             1 |
      +-------------------------------+
      1 row in set (0.001 sec)
      

      Stack trace (macOS, lldb):

      Assertion failed: (0), function <unknown>, file sql_type.cc, line 4339.
      Process 97624 stopped
      * thread #14, stop reason = hit program assert
          frame #4: 0x0000000100876b2c mariadbd`Type_handler_row::Item_update_null_value(this=0x00000001022992b0, item=0x0000000bafb6d460) const at sql_type.cc:4339:3
         4336
         4337	void Type_handler_row::Item_update_null_value(Item *item) const
         4338	{
      -> 4339	  DBUG_ASSERT(0);
         4340	  item->null_value= true;
         4341	}
         4342
      Target 0: (mariadbd) stopped.
       
          frame #3: 0x00000001894e8bd4 libsystem_c.dylib`__assert_rtn + 284
        * frame #4: 0x0000000100876b2c mariadbd`Type_handler_row::Item_update_null_value const at sql_type.cc:4339:3
          frame #5: 0x00000001010c9d00 mariadbd`Item::update_null_value at item.h:2188:28
          frame #6: 0x000000010028a538 mariadbd`Item_subselect::is_null at item_subselect.h:193:5
          frame #7: 0x000000010017fda8 mariadbd`in_row::get_value at item_cmpfunc.cc:3878:13
          frame #8: 0x000000010017f270 mariadbd`in_vector::find at item_cmpfunc.cc:3783:17
          frame #9: 0x00000001001853d0 mariadbd`Item_func_in::val_bool at item_cmpfunc.cc:4919:21
          frame #10: 0x00000001010d3880 mariadbd`Item_bool_func::val_int at item_cmpfunc.h:249:12
          frame #11: 0x0000000100882790 mariadbd`Type_handler::Item_send_long const at sql_type.cc:7758:22
          frame #12: 0x000000010088e328 mariadbd`Type_handler_long::Item_send const at sql_type.h:5856:12
          frame #13: 0x00000001010c91c4 mariadbd`Item::send at item.h:1273:28
          frame #14: 0x00000001003ab630 mariadbd`Protocol::send_result_set_row at protocol.cc:1339:15
          frame #15: 0x0000000100497d78 mariadbd`select_send::send_data at sql_class.cc:3289:17
          frame #16: 0x00000001005c54cc mariadbd`select_result_sink::send_data_with_check at sql_class.h:6227:12
          frame #17: 0x00000001005c490c mariadbd`JOIN::exec_inner at sql_select.cc:4976:22
          frame #18: 0x00000001005c4308 mariadbd`JOIN::exec sql_select.cc:4893:8
          frame #19: 0x000000010059ea94 mariadbd`mysql_select at sql_select.cc:5416:21
          frame #20: 0x000000010059e2fc mariadbd`handle_select at sql_select.cc:643:10
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            Gosselin Dave Gosselin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 0.5h
                0.5h

                Git Integration

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