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

Crash for query using ROWNUM() over view with ORDER BY

    XMLWordPrintable

Details

    Description

      regression after 5bada1246de48ef4a18fa30388f, repeatable after MDEV-31073 fix:

      CREATE TABLE t1 (id int NOT NULL PRIMARY KEY);
      SELECT t1.id AS fld1 FROM sys.schema_index_statistics , t1 WHERE rownum() = 1 GROUP BY fld1;
      

      Version: '10.6.13-MariaDB-debug-log'  
      230428 11:26:28 [ERROR] mysqld got signal 11 ;
       
      Server version: 10.6.13-MariaDB-debug-log source revision: 2eb7bf1ec301d43a7e72b8720f6ee153dc52b6c9
       
      sql/signal_handler.cc:241(handle_fatal_signal)[0x564018b2e716]
      sigaction.c:0(__restore_rt)[0x7fef4eb59420]
      maria/ha_maria.cc:1106(ha_maria::scan_time())[0x564019102df4]
      sql/opt_range.cc:2714(SQL_SELECT::test_quick_select(THD*, Bitmap<64u>, unsigned long long, unsigned long long, bool, bool, bool, bool))[0x564018f39b67]
      sql/sql_select.cc:5113(get_quick_record_count(THD*, SQL_SELECT*, TABLE*, Bitmap<64u> const*, unsigned long long))[0x56401838665b]
      sql/sql_select.cc:5840(make_join_statistics(JOIN*, List<TABLE_LIST>&, st_dynamic_array*))[0x56401838d400]
      sql/sql_select.cc:2509(JOIN::optimize_inner())[0x56401836b171]
      sql/sql_select.cc:1848(JOIN::optimize())[0x5640183641cf]
      sql/sql_select.cc:5055(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*))[0x564018385d68]
      sql/sql_select.cc:559(handle_select(THD*, LEX*, select_result*, unsigned long))[0x564018355b9f]
      sql/sql_parse.cc:6273(execute_sqlcom_select(THD*, TABLE_LIST*))[0x5640182b6e8e]
      sql/sql_parse.cc:3949(mysql_execute_command(THD*, bool))[0x5640182a57fb]
      sql/sql_parse.cc:8036(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x5640182c21b9]
      sql/sql_parse.cc:1898(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x56401829803a]
      sql/sql_parse.cc:1409(do_command(THD*, bool))[0x564018294d85]
      sql/sql_connect.cc:1416(do_handle_one_connection(CONNECT*, bool))[0x564018710df9]
      sql/sql_connect.cc:1320(handle_one_connection)[0x564018710756]
      perfschema/pfs.cc:2203(pfs_spawn_thread)[0x5640193a8d44]
      nptl/pthread_create.c:478(start_thread)[0x7fef4eb4d609]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x43)[0x7fef4e71e133]
       
      Query (0x62b0000c42a8): SELECT t1.id AS fld1 FROM sys.schema_index_statistics , t1 WHERE rownum() = 1 GROUP BY fld1
      

      CREATE TABLE t1 (id int NOT NULL PRIMARY KEY);
      CREATE  VIEW  v1 AS SELECT  sys.format_time(tb.sum_timer_fetch) FROM performance_schema.table_io_waits_summary_by_index_usage tb ORDER BY tb.sum_timer_wait;
       
      SELECT t1.id AS fld1 FROM v1, t1 WHERE rownum() = 1 GROUP BY fld1;
      

      Attachments

        Issue Links

          Activity

            People

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