Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-38 NOT EXISTS to IN (part of exists2in transformation for 10.0)
  3. MDEV-3894

Server crashes in Item_field::Item_field with exists_to_in=on and NOT EXISTS from a merge view

    XMLWordPrintable

Details

    • Technical task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 10.0.1
    • None
    • None

    Description

      #4  0x00000000007eb634 in Item_field::Item_field (this=0x24ba5e8, thd=0x2488890, context_arg=0x24b55d0, f=0x0) at 0.0-exists2in/sql/item.cc:2218
      #5  0x0000000000871c29 in Item_exists_subselect::exists2in_processor (this=0x24d4f28, opt_arg=0x2488890 "\220\026?\001") at 0.0-exists2in/sql/item_subselect.cc:2763
      #6  0x000000000086b86f in Item_subselect::walk (this=0x24d4f28, processor=&virtual table offset 760, walk_subquery=false, argument=0x2488890 "\220\026?\001") at 0.0-exists2in/sql/item_subselect.cc:625
      #7  0x00000000008322b3 in Item_func::walk (this=0x24ba338, processor=&virtual table offset 760, walk_subquery=false, argument=0x2488890 "\220\026?\001") at 0.0-exists2in/sql/item_func.cc:299
      #8  0x00000000008322b3 in Item_func::walk (this=0x24adf48, processor=&virtual table offset 760, walk_subquery=false, argument=0x2488890 "\220\026?\001") at 0.0-exists2in/sql/item_func.cc:299
      #9  0x0000000000645635 in JOIN::optimize_inner (this=0x24b7d18) at 0.0-exists2in/sql/sql_select.cc:1045
      #10 0x0000000000645414 in JOIN::optimize (this=0x24b7d18) at 0.0-exists2in/sql/sql_select.cc:994
      #11 0x000000000064d0f2 in mysql_select (thd=0x2488890, rref_pointer_array=0x248bc58, tables=0x2490a78, wild_num=1, fields=..., conds=0x24adf48, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x24493a8, unit=0x248b2b0, select_lex=0x248b9a8) at 0.0-exists2in/sql/sql_select.cc:3193
      #12 0x000000000064387e in handle_select (thd=0x2488890, lex=0x248b200, result=0x24493a8, setup_tables_done_option=0) at 0.0-exists2in/sql/sql_select.cc:362
      #13 0x000000000061b13b in execute_sqlcom_select (thd=0x2488890, all_tables=0x2490a78) at 0.0-exists2in/sql/sql_parse.cc:4937
      #14 0x00000000006137a8 in mysql_execute_command (thd=0x2488890) at 0.0-exists2in/sql/sql_parse.cc:2421
      #15 0x000000000061d9f6 in mysql_parse (thd=0x2488890, rawbuf=0x258ace8 "SELECT * FROM t1 AS alias WHERE NOT EXISTS ( SELECT * FROM v1 WHERE a = alias.a )", length=81, parser_state=0x7f394325f4e0) at 0.0-exists2in/sql/sql_parse.cc:6056
      #16 0x000000000061099a in dispatch_command (command=COM_QUERY, thd=0x2488890, packet=0x2492aa1 "SELECT * FROM t1 AS alias WHERE NOT EXISTS ( SELECT * FROM v1 WHERE a = alias.a )", packet_length=81) at 0.0-exists2in/sql/sql_parse.cc:1216
      #17 0x000000000060fb93 in do_command (thd=0x2488890) at 0.0-exists2in/sql/sql_parse.cc:945
      #18 0x000000000071a57a in do_handle_one_connection (thd_arg=0x2488890) at 0.0-exists2in/sql/sql_connect.cc:1254

      branch: 10.0-exists2in
      revision-id: sanja@montyprogram.com-20121129101823-k7kt2gjym2mmiqe7
      date: 2012-11-29 12:18:23 +0200
      revno: 3485

      Full optimizer_switch:

      index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=on

      EXPLAIN also crashes.

      Test case:

      SET optimizer_switch = 'exists_to_in=on';
       
      CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM;
      CREATE ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1;
       
      INSERT INTO t1 VALUES (1),(2);
       
      SELECT * FROM t1 AS alias WHERE NOT EXISTS ( SELECT * FROM v1 WHERE a = alias.a );

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.