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

LP:800085 - Crash in copy_funcs in maria-5.3 with derived_merge=on

    Details

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

      Description

      Reproducible with maria-5.3 and wl106 and derived_merge=on . Not reproducible with maria-5.3 before wl106 or maria-5.2

      backtrace:

      #3 <signal handler called>
      #4 0x000000000071d0ba in copy_funcs (func_ptr=0x42e18e0, thd=0x4259ea8) at sql_select.cc:19622
      #5 0x000000000072bfd3 in end_write (join=0x42d72e0, join_tab=0x42df578, end_of_records=false) at sql_select.cc:16074
      #6 0x000000000072a048 in evaluate_join_record (join=0x42d72e0, join_tab=0x42df260, error=0) at sql_select.cc:15069
      #7 0x00000000007333c4 in sub_select (join=0x42d72e0, join_tab=0x42df260, end_of_records=false) at sql_select.cc:14914
      #8 0x000000000072a048 in evaluate_join_record (join=0x42d72e0, join_tab=0x42def48, error=0) at sql_select.cc:15069
      #9 0x0000000000733252 in sub_select (join=0x42d72e0, join_tab=0x42def48, end_of_records=false) at sql_select.cc:14874
      #10 0x0000000000734586 in do_select (join=0x42d72e0, fields=0x0, table=0x42e0b90, procedure=0x0) at sql_select.cc:14539
      #11 0x00000000007520ce in JOIN::exec (this=0x42d72e0) at sql_select.cc:2224
      #12 0x000000000074dc3c in mysql_select (thd=0x4259ea8, rref_pointer_array=0x425c9f8, tables=0x42a21f8, wild_num=0, fields=..., conds=0x42d5cf8, og_num=1,
      order=0x42d5f10, group=0x0, having=0x0, proc_param=0x0, select_options=2147764737, result=0x42d5ff0, unit=0x425c2f0, select_lex=0x425c7d8)
      at sql_select.cc:2885
      #13 0x0000000000754016 in handle_select (thd=0x4259ea8, lex=0x425c250, result=0x42d5ff0, setup_tables_done_option=0) at sql_select.cc:283
      #14 0x00000000006a14e8 in execute_sqlcom_select (thd=0x4259ea8, all_tables=0x42a21f8) at sql_parse.cc:5082
      #15 0x00000000006a319b in mysql_execute_command (thd=0x4259ea8) at sql_parse.cc:2227
      #16 0x00000000006abf33 in mysql_parse (thd=0x4259ea8,
      rawbuf=0x42a0960 "SELECT DISTINCT a1.f2\nFROM ( SELECT * FROM t1 ) AS a1 , t2\nWHERE a1.f3 = 's' AND a1.f3 LIKE '%a%' OR a1.f2\nORDER BY a1.f3",
      length=122, found_semicolon=0x41dbbf08) at sql_parse.cc:6083
      #17 0x00000000006acdcb in dispatch_command (command=COM_QUERY, thd=0x4259ea8,
      packet=0x42975e9 "SELECT DISTINCT a1.f2\nFROM ( SELECT * FROM t1 ) AS a1 , t2\nWHERE a1.f3 = 's' AND a1.f3 LIKE '%a%' OR a1.f2\nORDER BY a1.f3",
      packet_length=122) at sql_parse.cc:1206
      #18 0x00000000006ae3dd in do_command (thd=0x4259ea8) at sql_parse.cc:904
      #19 0x0000000000698e8f in handle_one_connection (arg=0x4259ea8) at sql_connect.cc:1177
      #20 0x00000033b600673d in start_thread () from /lib64/libpthread.so.0
      #21 0x00000033b58d40cd in clone () from /lib64/libc.so.6

      EXPLAIN:

      id select_type table type possible_keys key key_len ref rows Extra
      1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using temporary
      1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where

      test case:

      CREATE TABLE t1 (f2 int, f3 varchar(32)) ;
      INSERT INTO t1 VALUES (NULL,'j'),(8,'c');

      CREATE TABLE t2 (f2 int) ;
      INSERT INTO t2 VALUES (1),(5);

      SELECT DISTINCT a1.f2
      FROM ( SELECT * FROM t1 ) AS a1 , t2
      WHERE a1.f3 = 's' AND a1.f3 LIKE '%a%' OR a1.f2
      ORDER BY a1.f3;

      bzr version-info:

      revision-id: <email address hidden>
      date: 2011-06-17 23:00:26 +0200
      build-date: 2011-06-21 12:02:49 +0300
      revno: 3051
      branch-nick: maria-5.3

      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=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=off,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            igor Igor Babaev added a comment -

            Re: Crash in copy_funcs in maria-5.3 with derived_merge=on
            This bug has been fixed by the patch for bug #798621.
            Although the cause of both bugs is the same the consequences are quite different.
            That's why I will add the test case for this bug into the regression suite.

            Show
            igor Igor Babaev added a comment - Re: Crash in copy_funcs in maria-5.3 with derived_merge=on This bug has been fixed by the patch for bug #798621. Although the cause of both bugs is the same the consequences are quite different. That's why I will add the test case for this bug into the regression suite.
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 800085

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

              People

              • Assignee:
                igor Igor Babaev
                Reporter:
                philipstoev Philip Stoev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: