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

LP:723822 - Crash in get_constant_key_infix with EXISTS ( SELECT .. DISTINCT )

    Details

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

      Description

      In maria-5.3-mwl90:

      backtrace:

      #4 <signal handler called>
      #5 0x083b5e8f in get_constant_key_infix (index_info=0xae63e458, index_range_tree=0xae66f800, first_non_group_part=0xae63e4b0, min_max_arg_part=0x0,
      last_part=0xae63e4c8, thd=0x9c37bc8, key_infix=0xae7f9be0 "^", key_infix_len=0xae7fb41c, first_non_infix_part=0xae7fb438) at opt_range.cc:11865
      #6 0x083b5189 in get_best_group_min_max (param=0xae7fb5b8, tree=0xae66f6c8) at opt_range.cc:11517
      #7 0x083a3b2d in SQL_SELECT::test_quick_select (this=0xae66db10, thd=0x9c37bc8, keys_to_use=..., prev_tables=4611686018427387904, limit=1,
      force_quick_range=false, ordered_output=false) at opt_range.cc:3048
      #8 0x08317639 in make_join_select (join=0xae65e6e0, select=0xae66d9e8, cond=0xae6325b8) at sql_select.cc:7616
      #9 0x083061b8 in JOIN::optimize (this=0xae65e6e0) at sql_select.cc:1113
      #10 0x0823c1ea in subselect_single_select_engine::exec (this=0xae632780) at item_subselect.cc:2642
      #11 0x08236d11 in Item_subselect::exec (this=0xae6326b8) at item_subselect.cc:481
      #12 0x082385d7 in Item_exists_subselect::val_int (this=0xae6326b8) at item_subselect.cc:1120
      #13 0x081d69ee in Item::val_int_result (this=0xae6326b8) at item.h:781
      #14 0x081d2712 in Item_cache_int::cache_value (this=0xae633290) at item.cc:7820
      #15 0x081da692 in Item_cache_wrapper::cache (this=0xae633228) at item.cc:6825
      #16 0x081cfea6 in Item_cache_wrapper::val_int (this=0xae633228) at item.cc:6879
      #17 0x08325242 in evaluate_join_record (join=0xae659858, join_tab=0xae632dd0, error=0) at sql_select.cc:14191
      #18 0x08324ead in sub_select (join=0xae659858, join_tab=0xae632dd0, end_of_records=false) at sql_select.cc:14096
      #19 0x08324759 in do_select (join=0xae659858, fields=0x9c395f8, table=0x0, procedure=0x0) at sql_select.cc:13751
      #20 0x0830aa73 in JOIN::exec (this=0xae659858) at sql_select.cc:2464
      #21 0x0830b241 in mysql_select (thd=0x9c37bc8, rref_pointer_array=0x9c39668, tables=0xae631b18, wild_num=1, fields=..., conds=0xae6326b8, og_num=0,
      order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0xae632818, unit=0x9c392c4, select_lex=0x9c39564)
      at sql_select.cc:2681
      #22 0x083039d9 in handle_select (thd=0x9c37bc8, lex=0x9c39268, result=0xae632818, setup_tables_done_option=0) at sql_select.cc:283
      #23 0x082a1477 in execute_sqlcom_select (thd=0x9c37bc8, all_tables=0xae631b18) at sql_parse.cc:5070
      #24 0x08298486 in mysql_execute_command (thd=0x9c37bc8) at sql_parse.cc:2234
      #25 0x082a3a12 in mysql_parse (thd=0x9c37bc8, rawbuf=0xae631960 "SELECT * FROM t2\nWHERE EXISTS (\nSELECT DISTINCT f3\nFROM t1\nWHERE f3 <= t2.f4\n)",
      length=78, found_semicolon=0xae7ff228) at sql_parse.cc:6077
      #26 0x0829611b in dispatch_command (command=COM_QUERY, thd=0x9c37bc8, packet=0x9c4fd89 "", packet_length=78) at sql_parse.cc:1210
      #27 0x082955c8 in do_command (thd=0x9c37bc8) at sql_parse.cc:903
      #28 0x082926a6 in handle_one_connection (arg=0x9c37bc8) at sql_connect.cc:1154
      #29 0x00821919 in start_thread () from /lib/libpthread.so.0
      #30 0x00453cce 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-23 19:00:56 +0200
      revno: 2922
      branch-nick: maria-5.3-mwl90

      CREATE TABLE t1 ( f1 int(11), f3 varchar(1)) ;
      INSERT INTO t1 VALUES ('8','c'),('5','f');

      ALTER TABLE t1 ADD KEY (f3,f1);

      CREATE TABLE t2 ( f4 varchar(1)) ;
      INSERT INTO t2 VALUES ('f'),('d');

      SELECT * FROM t2
      WHERE EXISTS (
      SELECT DISTINCT f3
      FROM t1
      WHERE f3 <= t2.f4
      );

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            philipstoev Philip Stoev added a comment -

            Re: Crash in get_constant_key_infix with EXISTS ( SELECT .. DISTINCT )
            Also repeatable with 5.3-main:

            revision-id: monty@askmonty.org-20110223124616-9zff4q1vcs4z9ext
            date: 2011-02-23 14:46:16 +0200
            build-date: 2011-02-23 19:09:03 +0200
            revno: 2919
            branch-nick: maria-5.3

            Show
            philipstoev Philip Stoev added a comment - Re: Crash in get_constant_key_infix with EXISTS ( SELECT .. DISTINCT ) Also repeatable with 5.3-main: revision-id: monty@askmonty.org-20110223124616-9zff4q1vcs4z9ext date: 2011-02-23 14:46:16 +0200 build-date: 2011-02-23 19:09:03 +0200 revno: 2919 branch-nick: maria-5.3
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 723822

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

              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: