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

LP:724275 - Crash in JOIN::optimize in maria-5.3

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      Not repeatable in maria-5.3

      Backtrace:

      #4 <signal handler called>
      #5 0x08306051 in JOIN::optimize (this=0xae6845a0) at sql_select.cc:1094
      #6 0x0830b1bc in mysql_select (thd=0x9a2cbc8, rref_pointer_array=0x9a2e668, tables=0xae6086d0, wild_num=0, fields=..., conds=0xae6096d8, og_num=0,
      order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0xae60a3e0, unit=0x9a2e2c4, select_lex=0x9a2e564)
      at sql_select.cc:2667
      #7 0x083039d9 in handle_select (thd=0x9a2cbc8, lex=0x9a2e268, result=0xae60a3e0, setup_tables_done_option=0) at sql_select.cc:283
      #8 0x082a1477 in execute_sqlcom_select (thd=0x9a2cbc8, all_tables=0xae6086d0) at sql_parse.cc:5070
      #9 0x08298486 in mysql_execute_command (thd=0x9a2cbc8) at sql_parse.cc:2234
      #10 0x082a3a12 in mysql_parse (thd=0x9a2cbc8,
      rawbuf=0xae608490 "SELECT f2 FROM t3\nWHERE ( f1 , f3 ) IN (\nSELECT MIN( f3 ) , f3\nFROM t2\n) AND f3 = '0'\nAND ( f3 , f3 ) IN (\nSELECT f3 , COUNT( f2 )\nFROM t1\n)", length=141, found_semicolon=0xb6d4d228) at sql_parse.cc:6077
      #11 0x0829611b in dispatch_command (command=COM_QUERY, thd=0x9a2cbc8,
      packet=0x9a44d89 "SELECT f2 FROM t3\nWHERE ( f1 , f3 ) IN (\nSELECT MIN( f3 ) , f3\nFROM t2\n) AND f3 = '0'\nAND ( f3 , f3 ) IN (\nSELECT f3 , COUNT( f2 )\nFROM t1\n)", packet_length=141) at sql_parse.cc:1210
      #12 0x082955c8 in do_command (thd=0x9a2cbc8) at sql_parse.cc:903
      #13 0x082926a6 in handle_one_connection (arg=0x9a2cbc8) at sql_connect.cc:1154
      #14 0x00821919 in start_thread () from /lib/libpthread.so.0
      #15 0x0076acce in clone () from /lib/libc.so.6

      bzr version-info:

      revision-id: <email address hidden>
      date: 2011-02-20 11:35:26 +0300
      build-date: 2011-02-24 14:18:39 +0200
      revno: 2922
      branch-nick: maria-5.3-mwl90

      explain:

      id select_type table type possible_keys key key_len ref rows Extra
      1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 1 Using where
      1 PRIMARY t3 ALL NULL NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
      1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 13 const,<subquery2>.f3 1 Using where
      3 SUBQUERY t1 ALL NULL NULL NULL NULL 5
      2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table

      test case:

      CREATE TABLE t1 ( f2 int(11), f3 int(11)) ;
      INSERT INTO t1 VALUES ('1','1'),('0','9'),('9','5'),(NULL,'6'),('4','2');

      CREATE TABLE t2 ( f3 int(11)) ;

      CREATE TABLE t3 ( f1 int(11), f2 int(11), f3 int(11)) ;
      INSERT INTO t3 VALUES ('964','4','0'),('982','6','8'),('983','5','7'),('984','7','7'),('985','6','0');

      SELECT f2 FROM t3
      WHERE ( f1 , f3 ) IN (
      SELECT MIN( f3 ) , f3
      FROM t2
      ) AND f3 = '0'
      AND ( f3 , f3 ) IN (
      SELECT f3 , COUNT( f2 )
      FROM t1
      );

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            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.