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

Server crashes in st_select_lex::collect_grouping_fields_for_derived

    XMLWordPrintable

    Details

      Description

      create view v1 AS select database() union values (1),(2);
      select 1 from v1 where make_set(1, `database()`);
      

      Both debug and non-debug versions are affected.

      10.4 a50ce9445844c0bdcf8a

      Version: '10.4.15-MariaDB-debug-log'  
      [ERROR] mysqld got signal 11 ;
       
      Server version: 10.4.15-MariaDB-debug-log
       
      sql/sql_lex.cc:7915(st_select_lex::collect_grouping_fields_for_derived(THD*, st_order*))[0x55fd3ce4d6a1]
      sql/sql_derived.cc:1478(pushdown_cond_for_derived(THD*, Item*, TABLE_LIST*))[0x55fd3cfcc23d]
      sql/sql_select.cc:2098(JOIN::optimize_inner())[0x55fd3cfc6d68]
      sql/sql_select.cc:1615(JOIN::optimize())[0x55fd3cfe74cf]
      sql/sql_select.cc:4681(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*))[0x55fd3cfb94be]
      sql/sql_select.cc:410(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55fd3cf2d42b]
      sql/sql_parse.cc:6355(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55fd3cf1ad85]
      sql/sql_parse.cc:3889(mysql_execute_command(THD*))[0x55fd3cf364f5]
      sql/sql_parse.cc:7896(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55fd3cf0daf0]
      sql/sql_parse.cc:1837(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55fd3cf0a56f]
      sql/sql_parse.cc:1352(do_command(THD*))[0x55fd3d2e7141]
      sql/sql_connect.cc:1412(do_handle_one_connection(CONNECT*))[0x55fd3d2e69e3]
      sql/sql_connect.cc:1317(handle_one_connection)[0x55fd3e915cf1]
      nptl/pthread_create.c:487(start_thread)[0x7f03bcdbbfa3]
      x86_64/clone.S:97(clone)[0x7f03bc3c24cf]
       
      Query (0x62b000062290): select 1 from v1 where make_set(1, `database()`)
      
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              varun Varun Gupta
              Reporter:
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: