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

Server crashes in get_sort_by_table

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2(EOL)
    • 10.2.2
    • Optimizer
    • None

    Description

      Stack trace from 10.2 9810d5ea132c028ac133ef19683d20b5bf005cab

      #3  <signal handler called>
      #4  0x00007f4768777e5d in get_sort_by_table (a=0x0, b=0x0, tables=..., const_tables=0) at /data/src/10.2-bug/sql/sql_select.cc:22463
      #5  0x00007f476874b4ab in make_join_statistics (join=0x7f4750527088, tables_list=..., keyuse_array=0x7f4750527368) at /data/src/10.2-bug/sql/sql_select.cc:4064
      #6  0x00007f4768742708 in JOIN::optimize_inner (this=0x7f4750527088) at /data/src/10.2-bug/sql/sql_select.cc:1437
      #7  0x00007f47687413d4 in JOIN::optimize (this=0x7f4750527088) at /data/src/10.2-bug/sql/sql_select.cc:1076
      #8  0x00007f4768749828 in mysql_select (thd=0x7f4750416070, tables=0x7f4750465528, wild_num=0, fields=..., conds=0x7f4750465cd8, og_num=1, order=0x0, group=0x7f4750465f40, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f4750469d38, unit=0x7f4750419b18, select_lex=0x7f475041a250) at /data/src/10.2-bug/sql/sql_select.cc:3535
      #9  0x00007f476873ef31 in handle_select (thd=0x7f4750416070, lex=0x7f4750419a50, result=0x7f4750469d38, setup_tables_done_option=0) at /data/src/10.2-bug/sql/sql_select.cc:373
      #10 0x00007f476870e9c8 in execute_sqlcom_select (thd=0x7f4750416070, all_tables=0x7f4750465528) at /data/src/10.2-bug/sql/sql_parse.cc:6345
      #11 0x00007f47687047fe in mysql_execute_command (thd=0x7f4750416070) at /data/src/10.2-bug/sql/sql_parse.cc:3376
      #12 0x00007f4768712167 in mysql_parse (thd=0x7f4750416070, rawbuf=0x7f4750464088 "SELECT j FROM ( SELECT * FROM v ) AS sq WHERE j < 100 GROUP BY j", length=64, parser_state=0x7f4769653dd0, is_com_multi=false, is_next_command=false) at /data/src/10.2-bug/sql/sql_parse.cc:7774
      #13 0x00007f4768700555 in dispatch_command (command=COM_QUERY, thd=0x7f4750416070, packet=0x7f4750458071 "SELECT j FROM ( SELECT * FROM v ) AS sq WHERE j < 100 GROUP BY j", packet_length=64, is_com_multi=false, is_next_command=false) at /data/src/10.2-bug/sql/sql_parse.cc:1805
      #14 0x00007f47686fef86 in do_command (thd=0x7f4750416070) at /data/src/10.2-bug/sql/sql_parse.cc:1365
      #15 0x00007f476883a84a in do_handle_one_connection (connect=0x7f4765471ad0) at /data/src/10.2-bug/sql/sql_connect.cc:1354
      #16 0x00007f476883a5d7 in handle_one_connection (arg=0x7f4765471ad0) at /data/src/10.2-bug/sql/sql_connect.cc:1260
      #17 0x00007f4768b48d98 in pfs_spawn_thread (arg=0x7f475efc6ef0) at /data/src/10.2-bug/storage/perfschema/pfs.cc:1862
      #18 0x00007f4767d830a4 in start_thread (arg=0x7f4769655300) at pthread_create.c:309
      #19 0x00007f4765f3b87d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (i INT) ENGINE=InnoDB;
      INSERT INTO t1 VALUES (1),(2);
       
      CREATE TABLE t2 (j INT) ENGINE=InnoDB;
      INSERT INTO t2 VALUES (3),(4);
       
      CREATE VIEW v AS SELECT DISTINCT j FROM t1 LEFT JOIN t2 ON (i = j);
       
      SELECT j FROM ( SELECT * FROM v ) AS sq WHERE j < 100 GROUP BY j;
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.