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

Server crash after the query with table value constructor uses a subselect

    XMLWordPrintable

Details

    Description

      select 1 order by (values((select 1)));
      

      select (values((select 1))) ;
      

      10.3 da88e1ec12b0ba39552bf

      Version: '10.3.28-MariaDB-debug-log' 
      210218 14:56:35 [ERROR] mysqld got signal 11 ;
       
      Server version: 10.3.28-MariaDB-debug-log
       
      sql/signal_handler.cc:209(handle_fatal_signal)[0x55c6212131e3]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x7fdca60dc730]
      sql/sql_lex.h:1196(st_select_lex::next_select())[0x55c6209b200f]
      sql/sql_lex.h:1427(st_select_lex_unit::is_unit_op())[0x55c6209b21a2]
      sql/sql_select.cc:1044(JOIN::prepare(TABLE_LIST*, unsigned int, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*))[0x55c620b1f8b7]
      sql/item_subselect.cc:3707(subselect_single_select_engine::prepare(THD*))[0x55c62145a627]
      sql/item_subselect.cc:280(Item_subselect::fix_fields(THD*, Item**))[0x55c62143588d]
      sql/item.h:830(Item::fix_fields_if_needed(THD*, Item**))[0x55c6207ecbdb]
      sql/item.h:833(Item::fix_fields_if_needed_for_scalar(THD*, Item**))[0x55c6207ecc09]
      sql/sql_tvc.cc:62(fix_fields_for_tvc(THD*, List_iterator_fast<List<Item> >&))[0x55c620fee0b6]
      sql/sql_tvc.cc:238(table_value_constr::prepare(THD*, st_select_lex*, select_result*, st_select_lex_unit*))[0x55c620fef1cb]
      sql/sql_union.cc:1029(st_select_lex_unit::prepare(TABLE_LIST*, select_result*, unsigned long))[0x55c620d210db]
      sql/sql_derived.cc:771(mysql_derived_prepare(THD*, LEX*, TABLE_LIST*))[0x55c6209ac5b3]
      sql/sql_derived.cc:199(mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int))[0x55c6209a8dbd]
      sql/table.cc:8362(TABLE_LIST::handle_derived(LEX*, unsigned int))[0x55c620da76e3]
      sql/sql_lex.h:4004(LEX::handle_list_of_derived(TABLE_LIST*, unsigned int))[0x55c6209f08b2]
      sql/sql_lex.cc:4164(st_select_lex::handle_derived(LEX*, unsigned int))[0x55c620a127c9]
      sql/sql_select.cc:1049(JOIN::prepare(TABLE_LIST*, unsigned int, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*))[0x55c620b1f9e5]
      sql/item_subselect.cc:3707(subselect_single_select_engine::prepare(THD*))[0x55c62145a627]
      sql/item_subselect.cc:280(Item_subselect::fix_fields(THD*, Item**))[0x55c62143588d]
      sql/item.h:830(Item::fix_fields_if_needed(THD*, Item**))[0x55c6207ecbdb]
      sql/item.h:833(Item::fix_fields_if_needed_for_scalar(THD*, Item**))[0x55c6207ecc09]
      sql/item.h:842(Item::fix_fields_if_needed_for_order_by(THD*, Item**))[0x55c620bf7d2d]
      sql/sql_select.cc:23510(find_order_in_list(THD*, Bounds_checked_array<Item*>, TABLE_LIST*, st_order*, List<Item>&, List<Item>&, bool, bool, bool))[0x55c620bd0cff]
      sql/sql_select.cc:23557(setup_order(THD*, Bounds_checked_array<Item*>, TABLE_LIST*, List<Item>&, List<Item>&, st_order*, bool))[0x55c620bd12d8]
      sql/sql_select.cc:665(setup_without_group(THD*, Bounds_checked_array<Item*>, TABLE_LIST*, List<TABLE_LIST>&, List<Item>&, List<Item>&, Item**, st_order*, st_order*, List<Window_spec>&, List<Item_window_func>&, bool*, unsigned int*))[0x55c620b1b5ef]
      sql/sql_select.cc:1156(JOIN::prepare(TABLE_LIST*, unsigned int, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*))[0x55c620b20f7b]
      sql/sql_select.cc:4301(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55c620b42564]
      sql/sql_select.cc:370(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55c620b19270]
      sql/sql_parse.cc:6316(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55c620a856b0]
      sql/sql_parse.cc:3847(mysql_execute_command(THD*))[0x55c620a731f0]
      sql/sql_parse.cc:7840(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55c620a8f7a7]
      sql/sql_parse.cc:1855(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55c620a65e7c]
      sql/sql_parse.cc:1398(do_command(THD*))[0x55c620a625b7]
      sql/sql_connect.cc:1403(do_handle_one_connection(CONNECT*))[0x55c620e533d0]
      sql/sql_connect.cc:1309(handle_one_connection)[0x55c620e52c88]
      perfschema/pfs.cc:1871(pfs_spawn_thread)[0x55c6225b8c8f]
      nptl/pthread_create.c:487(start_thread)[0x7fdca60d1fa3]
      x86_64/clone.S:97(clone)[0x7fdca5a554cf]
       
      Query (0x62b000000410): select 1 order by (values((select 1)))
      
      

      Attachments

        Issue Links

          Activity

            People

              igor Igor Babaev
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.