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

[5.3 only] Server crashes in test_if_skip_sort_order with materialization+semijoin, InnoDB

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.3.12
    • Fix Version/s: 5.3.13
    • Component/s: None
    • Labels:
      None

      Description

      Note: I could only reproduce it on 5.3. If it's a 5.3-only issue, it's probably not so important, but my concern is that it might still exist in 5.5 but be currently masked.

      #3  <signal handler called>
      #4  0x000000000073636a in test_if_skip_sort_order (tab=0x7f6ac4071888, order=0x7f6ac4006a60, select_limit_arg=18446744073709551615, no_changes=false, map=0x7f6ac402dfa8) at sql_select.cc:18873
      #5  0x000000000070a1c3 in JOIN::optimize (this=0x7f6ac4043300) at sql_select.cc:1626
      #6  0x000000000070ef27 in mysql_select (thd=0x300b1e8, rref_pointer_array=0x300ded8, tables=0x7f6ac4004d80, wild_num=0, fields=..., conds=0x7f6ac4043058, og_num=1, order=0x0, group=0x7f6ac4006a60, having=0x0, proc_param=0x0, select_options=2147764736, result=0x7f6ac4006ab8, unit=0x300d778, select_lex=0x300dc80) at sql_select.cc:2985
      #7  0x00000000007059d9 in handle_select (thd=0x300b1e8, lex=0x300d6d8, result=0x7f6ac4006ab8, setup_tables_done_option=0) at sql_select.cc:288
      #8  0x0000000000691cb2 in execute_sqlcom_select (thd=0x300b1e8, all_tables=0x7f6ac4004d80) at sql_parse.cc:5172
      #9  0x0000000000688a7a in mysql_execute_command (thd=0x300b1e8) at sql_parse.cc:2305
      #10 0x000000000069473c in mysql_parse (thd=0x300b1e8, rawbuf=0x7f6ac4004b00 "SELECT c1 FROM t1, t2 WHERE i2 = i1 AND c1 IN ( SELECT c3 FROM t3 WHERE c3 != 'g' ) GROUP BY c1", length=95, found_semicolon=0x7f6b1c5497e0) at sql_parse.cc:6173
      #11 0x0000000000686197 in dispatch_command (command=COM_QUERY, thd=0x300b1e8, packet=0x3086ef9 "SELECT c1 FROM t1, t2 WHERE i2 = i1 AND c1 IN ( SELECT c3 FROM t3 WHERE c3 != 'g' ) GROUP BY c1", packet_length=95) at sql_parse.cc:1243
      #12 0x0000000000685408 in do_command (thd=0x300b1e8) at sql_parse.cc:923
      #13 0x00000000006822a2 in handle_one_connection (arg=0x300b1e8) at sql_connect.cc:1231
      #14 0x00007f6b20688e9a in start_thread (arg=0x7f6b1c54a700) at pthread_create.c:308
      #15 0x00007f6b1fbb1cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
      
      bzr version-info
      revision-id: igor@askmonty.org-20130829175612-acvqr7uadpa7kylp
      revno: 3686
      branch-nick: 5.3
      

      Test case:

      SET optimizer_switch = 'materialization=on,semijoin=on';
      
      CREATE TABLE t1 (i1 INT NOT NULL, c1 VARCHAR(1), KEY (c1,i1)) ENGINE=InnoDB;
      INSERT INTO t1 VALUES (7,'m'),(8,'n');
      
      CREATE TABLE t2 (i2 INT, KEY(i2)) ENGINE=InnoDB;
      INSERT INTO t2 VALUES (7),(0);
      
      CREATE TABLE t3 (c3 VARCHAR(1)) ENGINE=InnoDB;
      INSERT INTO t3 VALUES ('j'),('v');
      
      SELECT c1 FROM t1, t2 WHERE i2 = i1 AND c1 IN ( SELECT c3 FROM t3 WHERE c3 != 'g' ) GROUP BY c1;
      

        Gliffy Diagrams

          Attachments

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                psergey Sergei Petrunia
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: