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

LP:860300 - Second crash with get_fanout_with_deps() with semijoin + materialization

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      backtrace:

      #4 <signal handler called>
      #5 0x0824ef48 in get_fanout_with_deps (join=0xae52e5f0, tset=0) at item_subselect.cc:4397
      #6 0x0824f0ba in get_post_group_estimate (join=0xae52e5f0, join_op_rows=2) at item_subselect.cc:4531
      #7 0x082464a4 in Item_in_subselect::optimize (this=0xae513ce8, out_rows=0xae8dff18, cost=0xae8dff10) at item_subselect.cc:630
      #8 0x083de322 in convert_subq_to_jtbm (parent_join=0xae529368, subq_pred=0xae513ce8, remove_item=0xae8dff7b) at opt_subselect.cc:1398
      #9 0x083dd077 in convert_join_subqueries_to_semijoins (join=0xae529368) at opt_subselect.cc:843
      #10 0x0831b540 in JOIN::optimize (this=0xae529368) at sql_select.cc:897
      #11 0x08321e11 in mysql_select (thd=0xb36d6e0, rref_pointer_array=0xb36f25c, tables=0xae5127e0, wild_num=1, fields=..., conds=0xae513ce8, og_num=0,
      order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0xae513e90, unit=0xb36ee40, select_lex=0xb36f120)
      at sql_select.cc:2886
      #12 0x08319c67 in handle_select (thd=0xb36d6e0, lex=0xb36ede4, result=0xae513e90, setup_tables_done_option=0) at sql_select.cc:283
      #13 0x082b4434 in execute_sqlcom_select (thd=0xb36d6e0, all_tables=0xae5127e0) at sql_parse.cc:5110
      #14 0x082ab1f1 in mysql_execute_command (thd=0xb36d6e0) at sql_parse.cc:2250
      #15 0x082b6a63 in mysql_parse (thd=0xb36d6e0,
      rawbuf=0xae5125f0 "SELECT *\nFROM t3\nWHERE ( 'h' ) IN (\nSELECT f6\nFROM t4\nWHERE ( 5 ) IN ( SELECT f2 FROM t1 )\nGROUP BY t4.f6\n)", length=107,
      found_semicolon=0xae8e1228) at sql_parse.cc:6110
      #16 0x082a8e40 in dispatch_command (command=COM_QUERY, thd=0xb36d6e0,
      packet=0xb3c6321 "SELECT *\nFROM t3\nWHERE ( 'h' ) IN (\nSELECT f6\nFROM t4\nWHERE ( 5 ) IN ( SELECT f2 FROM t1 )\nGROUP BY t4.f6\n)", packet_length=107)
      at sql_parse.cc:1221
      #17 0x082a829b in do_command (thd=0xb36d6e0) at sql_parse.cc:916
      #18 0x082a527f in handle_one_connection (arg=0xb36d6e0) at sql_connect.cc:1191
      #19 0x00821919 in start_thread () from /lib/libpthread.so.0
      #20 0x0076acce in clone () from /lib/libc.so.6

      optimizer switch:

      semijoin=ON,materialization=ON

      Explain also crashes.

      Test case:

      CREATE TABLE t1 ( f2 int) ;
      INSERT INTO t1 VALUES (9),(6);

      CREATE TABLE t3 ( f4 int) ;

      CREATE TABLE t4 ( f6 varchar(1) ) ;

      SET SESSION optimizer_switch='semijoin=ON,materialization=ON';

      SELECT *
      FROM t3
      WHERE ( 'h' ) IN (
      SELECT f6
      FROM t4
      WHERE ( 5 ) IN ( SELECT f2 FROM t1 )
      GROUP BY t4.f6
      );

      bzr version-info:

      revision-id: <email address hidden>
      date: 2011-09-26 23:54:00 +0300
      build-date: 2011-09-27 09:49:21 +0300
      revno: 3196
      branch-nick: maria-5.3

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 860300

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 860300

              People

              • Assignee:
                psergey Sergei Petrunia
                Reporter:
                philipstoev Philip Stoev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: