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

LP:611690 - Crash in select_describe() with nested subqueries

    XMLWordPrintable

Details

    Description

      The following query

      EXPLAIN
      SELECT `col_varchar_key`
      FROM CC
      WHERE (
      SELECT SUBQUERY2_t1 .`col_int_nokey`
      FROM CC SUBQUERY2_t1 JOIN CC ON ( 150 , 5 ) IN (
      SELECT `col_int_key` CHILD_SUBQUERY1_field1 , `col_int_key` child_subquery1_field2
      FROM CC
      GROUP BY child_subquery1_field1 , child_subquery1_field2 ) ) ;

      crashes on maria 5.3 and not on 5.2 or mysql 5.5.5 .

      backtrace:

      #3 0x0827e9e0 in handle_segfault (sig=11) at mysqld.cc:2703
      #4 <signal handler called>
      #5 0x0832ac27 in select_describe (join=0xb5f5e588, need_tmp_table=true, need_order=true, distinct=false, message=0x0) at sql_select.cc:18371
      #6 0x083013e2 in JOIN::exec (this=0xb5f5e588) at sql_select.cc:1894
      #7 0x083038ea in mysql_select (thd=0xa63dfb8, rref_pointer_array=0xb5f32af4, tables=0xb5f33060, wild_num=0, fields=..., conds=0x0, og_num=2, order=0x0,
      group=0xb5f33320, having=0x0, proc_param=0x0, select_options=2147764740, result=0xb5f528d0, unit=0xb5f32b90, select_lex=0xb5f329f0) at sql_select.cc:2556
      #8 0x0832cd00 in mysql_explain_union (thd=0xa63dfb8, unit=0xb5f32b90, result=0xb5f528d0) at sql_select.cc:18833
      #9 0x0832c910 in select_describe (join=0xb5f59718, need_tmp_table=false, need_order=false, distinct=false, message=0x0) at sql_select.cc:18774
      #10 0x083013e2 in JOIN::exec (this=0xb5f59718) at sql_select.cc:1894
      #11 0x083038ea in mysql_select (thd=0xa63dfb8, rref_pointer_array=0xb5f31fbc, tables=0xb5f32410, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0,
      group=0x0, having=0x0, proc_param=0x0, select_options=2147764740, result=0xb5f528d0, unit=0xb5f32058, select_lex=0xb5f31eb8) at sql_select.cc:2556
      #12 0x0832cd00 in mysql_explain_union (thd=0xa63dfb8, unit=0xb5f32058, result=0xb5f528d0) at sql_select.cc:18833
      #13 0x0832c910 in select_describe (join=0xb5f548a8, need_tmp_table=false, need_order=false, distinct=false, message=0x8896c84 "Impossible WHERE")
      at sql_select.cc:18774
      #14 0x0831305f in return_zero_rows (join=0xb5f548a8, result=0xb5f528d0, tables=0xb5f31ca8, fields=..., send_row=false, select_options=2147764740,
      info=0x8896c84 "Impossible WHERE", having=0x0) at sql_select.cc:8357
      #15 0x083010d5 in JOIN::exec (this=0xb5f548a8) at sql_select.cc:1856
      #16 0x083038ea in mysql_select (thd=0xa63dfb8, rref_pointer_array=0xa63fa2c, tables=0xb5f31ca8, wild_num=0, fields=..., conds=0xb5f337b0, og_num=0,
      order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764740, result=0xb5f528d0, unit=0xa63f690, select_lex=0xa63f928)
      at sql_select.cc:2556
      #17 0x0832cd00 in mysql_explain_union (thd=0xa63dfb8, unit=0xa63f690, result=0xb5f528d0) at sql_select.cc:18833
      #18 0x0829a547 in execute_sqlcom_select (thd=0xa63dfb8, all_tables=0xb5f31ca8) at sql_parse.cc:5059
      #19 0x082910b8 in mysql_execute_command (thd=0xa63dfb8) at sql_parse.cc:2265
      #20 0x0829c8b9 in mysql_parse (thd=0xa63dfb8,
      inBuf=0xb5f31900 "EXPLAIN\nSELECT `col_varchar_key`\nFROM CC\nWHERE (\nSELECT SUBQUERY2_t1 .`col_int_nokey`\nFROM CC SUBQUERY2_t1 JOIN CC ON ( 150 , 5 ) IN (\nSELECT `col_int_key` CHILD_SUBQUERY1_field1 , `col_int_ke"..., length=298, found_semicolon=0xb60ff230) at sql_parse.cc:6027
      #21 0x0828eaea in dispatch_command (command=COM_QUERY, thd=0xa63dfb8, packet=0xa656311 "", packet_length=301) at sql_parse.cc:1184
      #22 0x0828df90 in do_command (thd=0xa63dfb8) at sql_parse.cc:890
      #23 0x0828b0f0 in handle_one_connection (arg=0xa63dfb8) at sql_connect.cc:1153
      #24 0x00a08919 in start_thread () from /lib/libpthread.so.0
      #25 0x00951e5e in clone () from /lib/libc.so.6

      Attachments

        Activity

          People

            timour Timour Katchaounov (Inactive)
            philipstoev Philip Stoev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 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.