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

Assert failure when checking null value result for a row equality using a subquery

Details

    Description

      The following test case brings the server to an assert failure:

      create table t1 (a int) engine=myisam;
      insert into t1 values (3), (7), (1);
      create table t2 (b int) engine=myisam;
      insert into t2 values (1), (2), (3), (4);
      insert into t2 select * from t2;
      insert into t2 select * from t2;
      insert into t2 select * from t2;
      insert into t2 select * from t2;
      insert into t2 select * from t2;
      insert into t2 select * from t2;
      select * from t1 where ((select min(b), max(b) from t2 where b < 1) = (1, 2)) IS UNKNOWN;
      

      The assert failure occurs in the function Item::update_null_value ().

      Attachments

        Activity

          alice Alice Sherepa added a comment -

          mariadbd: /11.6/src/sql/sql_type.cc:4352: virtual void Type_handler_row::Item_update_null_value(Item*) const: Assertion `0' failed.
          240913 17:56:36 [ERROR] mysqld got signal 6 ;
           
          Server version: 11.6.2-MariaDB-debug-log source revision: 19cea738342737503f47cfe6ff67d5248b0a0961
           
          sql/sql_type.cc:4353(Type_handler_row::Item_update_null_value(Item*) const)[0x56170687c18b]
          sql/item.h:2149(Item::update_null_value())[0x561705d8d8ae]
          sql/item_subselect.h:194(Item_subselect::is_null())[0x561706ddd94f]
          sql/item_cmpfunc.h:457(Item_bool_func2::is_null())[0x561705e23852]
          sql/item_cmpfunc.cc:5777(Item_func_isnull::val_int())[0x561706bf6aa7]
          sql/sql_select.cc:4926(JOIN::exec_inner())[0x561706274cca]
          sql/sql_select.cc:4812(JOIN::exec())[0x5617062732e8]
          sql/sql_select.cc:5345(mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x561706277b11]
          sql/sql_select.cc:628(handle_select(THD*, LEX*, select_result*, unsigned long long))[0x56170624614c]
          sql/sql_parse.cc:6154(execute_sqlcom_select(THD*, TABLE_LIST*))[0x561706164ada]
          sql/sql_parse.cc:3954(mysql_execute_command(THD*, bool))[0x5617061548e3]
          sql/sql_parse.cc:7876(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x56170616fee0]
          sql/sql_parse.cc:1894(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x561706146839]
          sql/sql_parse.cc:1405(do_command(THD*, bool))[0x56170614355a]
          sql/sql_connect.cc:1448(do_handle_one_connection(CONNECT*, bool))[0x56170663f816]
          sql/sql_connect.cc:1352(handle_one_connection)[0x56170663f173]
          perfschema/pfs.cc:2200(pfs_spawn_thread)[0x5617072f7e4c]
          nptl/pthread_create.c:478(start_thread)[0x7f3c89123609]
           
          Query (0x6290000e62a8): select * from t1 where ((select min(b), max(b) from t2 where b < 1) = (1, 2)) IS UNKNOWN
          

          alice Alice Sherepa added a comment - mariadbd: /11.6/src/sql/sql_type.cc:4352: virtual void Type_handler_row::Item_update_null_value(Item*) const: Assertion `0' failed. 240913 17:56:36 [ERROR] mysqld got signal 6 ;   Server version: 11.6.2-MariaDB-debug-log source revision: 19cea738342737503f47cfe6ff67d5248b0a0961   sql/sql_type.cc:4353(Type_handler_row::Item_update_null_value(Item*) const)[0x56170687c18b] sql/item.h:2149(Item::update_null_value())[0x561705d8d8ae] sql/item_subselect.h:194(Item_subselect::is_null())[0x561706ddd94f] sql/item_cmpfunc.h:457(Item_bool_func2::is_null())[0x561705e23852] sql/item_cmpfunc.cc:5777(Item_func_isnull::val_int())[0x561706bf6aa7] sql/sql_select.cc:4926(JOIN::exec_inner())[0x561706274cca] sql/sql_select.cc:4812(JOIN::exec())[0x5617062732e8] sql/sql_select.cc:5345(mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x561706277b11] sql/sql_select.cc:628(handle_select(THD*, LEX*, select_result*, unsigned long long))[0x56170624614c] sql/sql_parse.cc:6154(execute_sqlcom_select(THD*, TABLE_LIST*))[0x561706164ada] sql/sql_parse.cc:3954(mysql_execute_command(THD*, bool))[0x5617061548e3] sql/sql_parse.cc:7876(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x56170616fee0] sql/sql_parse.cc:1894(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x561706146839] sql/sql_parse.cc:1405(do_command(THD*, bool))[0x56170614355a] sql/sql_connect.cc:1448(do_handle_one_connection(CONNECT*, bool))[0x56170663f816] sql/sql_connect.cc:1352(handle_one_connection)[0x56170663f173] perfschema/pfs.cc:2200(pfs_spawn_thread)[0x5617072f7e4c] nptl/pthread_create.c:478(start_thread)[0x7f3c89123609]   Query (0x6290000e62a8): select * from t1 where ((select min(b), max(b) from t2 where b < 1) = (1, 2)) IS UNKNOWN

          People

            sanja Oleksandr Byelkin
            igor Igor Babaev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.