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

LP:858148 - Fourth crash in select_describe() with nested subqueries

    Details

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

      Description

      backtrace:

      #4 <signal handler called>
      #5 0x08349b39 in select_describe (join=0x9b130c68, need_tmp_table=true, need_order=true, distinct=false, message=0x0) at sql_select.cc:20633
      #6 0x0831f317 in JOIN::exec (this=0x9b130c68) at sql_select.cc:2190
      #7 0x0832168a in mysql_select (thd=0xa1571e8, rref_pointer_array=0xa07150b4, tables=0xa0715508, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x0,
      group=0xa07157c8, having=0x0, proc_param=0x0, select_options=2147764740, result=0xa0715b48, unit=0xa0715150, select_lex=0xa0714f78) at sql_select.cc:2900
      #8 0x0834ba07 in mysql_explain_union (thd=0xa1571e8, unit=0xa0715150, result=0xa0715b48) at sql_select.cc:21106
      #9 0x0834b6e2 in select_describe (join=0xa072efd8, need_tmp_table=false, need_order=false, distinct=false,
      message=0x88ed93c "Impossible WHERE noticed after reading const tables") at sql_select.cc:21063
      #10 0x08332837 in return_zero_rows (join=0xa072efd8, result=0xa0715b48, tables=..., fields=..., send_row=true, select_options=2147764740,
      info=0x88ed93c "Impossible WHERE noticed after reading const tables", having=0x0) at sql_select.cc:10214
      #11 0x0831ef03 in JOIN::exec (this=0xa072efd8) at sql_select.cc:2131
      #12 0x0832168a in mysql_select (thd=0xa1571e8, rref_pointer_array=0xa071478c, tables=0xa0714d28, wild_num=0, fields=..., conds=0xa07157f8, og_num=0,
      order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764740, result=0xa0715b48, unit=0xa0714828, select_lex=0xa0714650)
      at sql_select.cc:2900
      #13 0x0834ba07 in mysql_explain_union (thd=0xa1571e8, unit=0xa0714828, result=0xa0715b48) at sql_select.cc:21106
      #14 0x0834b6e2 in select_describe (join=0xa0727d68, need_tmp_table=false, need_order=false, distinct=false,
      message=0x88ed93c "Impossible WHERE noticed after reading const tables") at sql_select.cc:21063
      #15 0x08332837 in return_zero_rows (join=0xa0727d68, result=0xa0715b48, tables=..., fields=..., send_row=true, select_options=2147764740,
      info=0x88ed93c "Impossible WHERE noticed after reading const tables", having=0x0) at sql_select.cc:10214
      #16 0x0831ef03 in JOIN::exec (this=0xa0727d68) at sql_select.cc:2131
      #17 0x0832168a in mysql_select (thd=0xa1571e8, rref_pointer_array=0xa158d64, tables=0xa0714358, wild_num=0, fields=..., conds=0xa07159d8, og_num=0,
      order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764740, result=0xa0715b48, unit=0xa158948, select_lex=0xa158c28)
      at sql_select.cc:2900
      #18 0x0834ba07 in mysql_explain_union (thd=0xa1571e8, unit=0xa158948, result=0xa0715b48) at sql_select.cc:21106
      #19 0x082b405b in execute_sqlcom_select (thd=0xa1571e8, all_tables=0xa0714358) at sql_parse.cc:5081
      #20 0x082aafea in mysql_execute_command (thd=0xa1571e8) at sql_parse.cc:2247
      #21 0x082b6808 in mysql_parse (thd=0xa1571e8,
      rawbuf=0xa0714060 "EXPLAIN\nSELECT MAX( f1 ) FROM t2\nWHERE f2 >= (\nSELECT SUM( f1 )\nFROM t1\nWHERE EXISTS (\nSELECT f3\nFROM t3\nGROUP BY 1\n)\n)",
      length=119, found_semicolon=0xa0a72228) at sql_parse.cc:6102
      #22 0x082a8c30 in dispatch_command (command=COM_QUERY, thd=0xa1571e8, packet=0xa1afed9 "", packet_length=119) at sql_parse.cc:1221
      #23 0x082a808b in do_command (thd=0xa1571e8) at sql_parse.cc:916
      #24 0x082a5015 in handle_one_connection (arg=0xa1571e8) at sql_connect.cc:1187
      #25 0x00821919 in start_thread () from /lib/libpthread.so.0
      #26 0x0076acce in clone () from /lib/libc.so.6

      test case:

      --source include/have_innodb.inc

      CREATE TABLE t1 ( f1 int(11)) ENGINE=InnoDB;
      CREATE TABLE t2 ( f1 int(11), f2 int(11), PRIMARY KEY (f1)) ;
      CREATE TABLE t3 ( f3 int(11)) ENGINE=InnoDB;

      EXPLAIN
      SELECT MAX( f1 ) FROM t2
      WHERE f2 >= (
      SELECT SUM( f1 )
      FROM t1
      WHERE EXISTS (
      SELECT f3
      FROM t3
      GROUP BY 1
      )
      );

      bzr version-info:

      revision-id: <email address hidden>
      date: 2011-09-23 01:30:44 +0400
      build-date: 2011-09-24 14:03:12 +0300
      revno: 3192
      branch-nick: maria-5.3

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            philipstoev Philip Stoev added a comment -

            Re: Fourth crash in select_describe() with nested subqueries
            Repeatable with both materialization and in_to_exists. Full optimizer_switch:

            index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on

            Show
            philipstoev Philip Stoev added a comment - Re: Fourth crash in select_describe() with nested subqueries Repeatable with both materialization and in_to_exists. Full optimizer_switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
            Hide
            timour Timour Katchaounov added a comment -

            Re: Fourth crash in select_describe() with nested subqueries
            This bug is very similar to bug lp:702301.

            Show
            timour Timour Katchaounov added a comment - Re: Fourth crash in select_describe() with nested subqueries This bug is very similar to bug lp:702301.
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 858148

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

              People

              • Assignee:
                timour Timour Katchaounov
                Reporter:
                philipstoev Philip Stoev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: