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

Server crashes in get_sort_by_table/make_join_statistics after INSERT into a view with ORDER BY

    XMLWordPrintable

Details

    • Bug
    • Status: In Review (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL), 11.2, 11.4, 11.5(EOL), 11.6
    • 10.5, 10.6, 10.11, 11.2, 11.4
    • Optimizer
    • None

    Description

      CREATE TABLE t1 ( pk int) ;
      create view v as SELECT * FROM t1 ORDER BY pk;
       
      insert into v select * from v;
      

      10.3 7d96cb4703693cbf7a23308cf

      Version: '10.3.37-MariaDB-debug-log'  socket: '/home/alice/am/_depot/m-branch/m3-10.3-bld/mysql-test/var/tmp/mysqld.1.sock'  port: 16000  Source distribution
      221102 14:56:33 [ERROR] mysqld got signal 11 ;
       
      Server version: 10.3.37-MariaDB-debug-log
       
      sql/signal_handler.cc:231(handle_fatal_signal)[0x5592e14cdd1e]
      sigaction.c:0(__restore_rt)[0x7f629cfe4420]
      sql/sql_select.cc:24221(get_sort_by_table(st_order*, st_order*, List<TABLE_LIST>&, unsigned long long))[0x5592e0eaacfc]
      sql/sql_select.cc:4964(make_join_statistics(JOIN*, List<TABLE_LIST>&, st_dynamic_array*))[0x5592e0e21385]
      sql/sql_select.cc:1992(JOIN::optimize_inner())[0x5592e0e03240]
      sql/sql_select.cc:1534(JOIN::optimize())[0x5592e0dfe71b]
      sql/sql_select.cc:4360(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*))[0x5592e0e1bdf5]
      sql/sql_select.cc:372(handle_select(THD*, LEX*, select_result*, unsigned long))[0x5592e0df2139]
      sql/sql_parse.cc:4621(mysql_execute_command(THD*))[0x5592e0d55aa9]
      sql/sql_parse.cc:7855(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x5592e0d6ca88]
      sql/sql_parse.cc:1855(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x5592e0d43a05]
      sql/sql_parse.cc:1398(do_command(THD*))[0x5592e0d40524]
      sql/sql_connect.cc:1403(do_handle_one_connection(CONNECT*))[0x5592e11164f3]
      sql/sql_connect.cc:1309(handle_one_connection)[0x5592e1115dad]
      perfschema/pfs.cc:1871(pfs_spawn_thread)[0x5592e2748ae7]
      nptl/pthread_create.c:478(start_thread)[0x7f629cfd8609]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x43)[0x7f629cefd133]
       
      Query (0x62b000000290): insert into v select * from v
      

      non-debug:

      10.6.9

      221102 14:51:37 [ERROR] mysqld got signal 11 ;
      Server version: 10.6.9-MariaDB
       
      sql/signal_handler.cc:236(handle_fatal_signal)[0x555ba69f0917]
      sigaction.c:0(__restore_rt)[0x7fd2e265b420]
      sql/sql_select.cc:25679(JOIN::optimize_inner())[0x555ba682b239]
      sql/sql_select.cc:1838(JOIN::optimize())[0x555ba682c375]
      sql/sql_select.cc:5027(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*))[0x555ba682c448]
      sql/sql_select.cc:566(handle_select(THD*, LEX*, select_result*, unsigned long))[0x555ba682cd54]
      sql/sql_parse.cc:4711(mysql_execute_command(THD*, bool))[0x555ba67d0229]
      sql/sql_parse.cc:8031(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x555ba67d112b]
      sql/sql_parse.cc:1955(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x555ba67d32e7]
      sql/sql_parse.cc:1411(do_command(THD*, bool))[0x555ba67d4983]
      sql/sql_connect.cc:1418(do_handle_one_connection(CONNECT*, bool))[0x555ba68cac47]
      sql/sql_connect.cc:1318(handle_one_connection)[0x555ba68caee4]
      perfschema/pfs.cc:2204(pfs_spawn_thread)[0x555ba6c5fcdc]
      nptl/pthread_create.c:478(start_thread)[0x7fd2e264f609]
      ??:0(clone)[0x7fd2e223b133]
       
      Query (0x7fd28c012210): insert into v select * from v
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.