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

LP:772335 - Second crash in copy_fields() in maria-5.3

Details

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

    Description

      Repeatable in maria-5.3, maria-5.3-mwl89, maria-5.3-mwl148

      Backtrace:

      #5 0x08333ec0 in copy_fields (param=0xae55d070) at sql_select.cc:18235
      #6 0x0832cb06 in end_send_group (join=0xae5583c8, join_tab=0x0, end_of_records=false) at sql_select.cc:15135
      #7 0x08329295 in do_select (join=0xae5583c8, fields=0xae55d17c, table=0x0, procedure=0x0) at sql_select.cc:13505
      #8 0x0830fcdb in JOIN::exec (this=0xae5583c8) at sql_select.cc:2530
      #9 0x0824058c in subselect_single_select_engine::exec (this=0xae514e18) at item_subselect.cc:2754
      #10 0x0823ac0f in Item_subselect::exec (this=0xae514d18) at item_subselect.cc:537
      #11 0x0823ae0e in Item_in_subselect::exec (this=0xae514d18) at item_subselect.cc:634
      #12 0x0823c7f6 in Item_in_subselect::val_bool (this=0xae514d18) at item_subselect.cc:1314
      #13 0x081d9138 in Item::val_bool_result (this=0xae514d18) at item.h:813
      #14 0x082054d2 in Item_in_optimizer::val_int (this=0xae52b760) at item_cmpfunc.cc:1980
      #15 0x081c24e4 in Item::val_bool (this=0xae52b760) at item.cc:187
      #16 0x0820d42c in Item_cond_or::val_int (this=0xae5362f8) at item_cmpfunc.cc:4698
      #17 0x081c24e4 in Item::val_bool (this=0xae5362f8) at item.cc:187
      #18 0x0820d330 in Item_cond_and::val_int (this=0xae536248) at item_cmpfunc.cc:4680
      #19 0x08329471 in do_select (join=0xae553520, fields=0xae5582bc, table=0x0, procedure=0x0) at sql_select.cc:13538
      #20 0x0830fcdb in JOIN::exec (this=0xae553520) at sql_select.cc:2530
      #21 0x083104f8 in mysql_select (thd=0xa92dc08, rref_pointer_array=0xa92f6a4, tables=0xae513d38, wild_num=0, fields=...,
      conds=0xae52a980, og_num=1, order=0x0, group=0xae514e78, having=0x0, proc_param=0x0, select_options=2147764736,
      result=0xae52b450, unit=0xa92f304, select_lex=0xa92f5a0) at sql_select.cc:2749
      #22 0x08308ad7 in handle_select (thd=0xa92dc08, lex=0xa92f2a8, result=0xae52b450, setup_tables_done_option=0) at sql_select.cc:280
      #23 0x082a5e25 in execute_sqlcom_select (thd=0xa92dc08, all_tables=0xae513d38) at sql_parse.cc:5090
      #24 0x0829cc97 in mysql_execute_command (thd=0xa92dc08) at sql_parse.cc:2235
      #25 0x082a83c8 in mysql_parse (thd=0xa92dc08,
      rawbuf=0xae512eb0 "SELECT alias1.f4 AS field1\nFROM\n(\nSELECT *\nFROM t1 )\nAS alias1 JOIN t2 AS alias2 ON alias2.f1\nWHERE\n( 'i' , 'a' )\nIN\n(\nSELECT f10 , MIN( f10 )\nFROM t2 )\nOR alias2.f10 <= 'f'\nGROUP BY field1", length=189,
      found_semicolon=0xae8e1228) at sql_parse.cc:6090
      #26 0x0829a920 in dispatch_command (command=COM_QUERY, thd=0xa92dc08, packet=0xa9887d1 "", packet_length=189) at sql_parse.cc:1211
      #27 0x08299dcd in do_command (thd=0xa92dc08) at sql_parse.cc:904
      #28 0x08296e80 in handle_one_connection (arg=0xa92dc08) at sql_connect.cc:1154
      #29 0x00821919 in start_thread () from /lib/libpthread.so.0
      #30 0x00453cce in clone () from /lib/libc.so.6

      Explain:

      id select_type table type possible_keys key key_len ref rows Extra
      1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
      2 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 1

      test case:

      SET SESSION 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,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_sort_keys=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on';

      CREATE TABLE t1 ( f4 int) ;
      INSERT IGNORE INTO t1 VALUES (2),(1);

      CREATE TABLE t2 ( f10 int) ;
      INSERT IGNORE INTO t2 VALUES (0);

      SELECT t1.f4
      FROM t1
      WHERE ( 0 ) IN (SELECT MIN( f10 ) FROM t2 )
      GROUP BY 1;

      Attachments

        Activity

          Re: Second crash in copy_fields() in maria-5.3
          Also repeatable without any 0 or 1 literals:

          CREATE TABLE t1 ( f4 int) ;
          INSERT IGNORE INTO t1 VALUES (3),(4);

          CREATE TABLE t2 ( f10 int) ;
          INSERT IGNORE INTO t2 VALUES (2);

          SELECT t1.f4
          FROM t1
          WHERE ( 2 ) IN (SELECT MIN( f10 ) FROM t2 )
          GROUP BY 1;

          philipstoev Philip Stoev (Inactive) added a comment - Re: Second crash in copy_fields() in maria-5.3 Also repeatable without any 0 or 1 literals: CREATE TABLE t1 ( f4 int) ; INSERT IGNORE INTO t1 VALUES (3),(4); CREATE TABLE t2 ( f10 int) ; INSERT IGNORE INTO t2 VALUES (2); SELECT t1.f4 FROM t1 WHERE ( 2 ) IN (SELECT MIN( f10 ) FROM t2 ) GROUP BY 1;

          Re: Second crash in copy_fields() in maria-5.3
          See also https://bugs.launchpad.net/maria/+bug/751350

          philipstoev Philip Stoev (Inactive) added a comment - Re: Second crash in copy_fields() in maria-5.3 See also https://bugs.launchpad.net/maria/+bug/751350

          Re: Second crash in copy_fields() in maria-5.3
          This is a duplicate of LP bug #751350.

          igor Igor Babaev (Inactive) added a comment - Re: Second crash in copy_fields() in maria-5.3 This is a duplicate of LP bug #751350.

          Launchpad bug id: 772335

          ratzpo Rasmus Johansson (Inactive) added a comment - Launchpad bug id: 772335

          People

            igor Igor Babaev (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.