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

Server crashes in subselect_union_engine::no_rows on killing query with UNION

    XMLWordPrintable

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.0.4, 5.3.12, 5.5.33a
    • 5.5
    • None
    • None

    Description

      #3  <signal handler called>
      #4  0x000000000062dc14 in subselect_union_engine::no_rows (this=0x7fb46c009360) at item_subselect.cc:2857
      #5  0x00000000005e3945 in Item_in_optimizer::val_int (this=0x7fb46c06d270) at item_cmpfunc.cc:1718
      #6  0x00000000005adcdb in Item::val_int_result (this=0x7fb46c06d270) at item.h:866
      #7  0x00000000005a8097 in Item_cache_int::cache_value (this=0x7fb46c067968) at item.cc:8298
      #8  0x00000000005b3588 in Item_cache_wrapper::cache (this=0x7fb46c0678b0) at item.cc:7138
      #9  0x00000000005a5366 in Item_cache_wrapper::val_bool (this=0x7fb46c0678b0) at item.cc:7302
      #10 0x00000000005df9c1 in Item_func_not::val_int (this=0x7fb46c009398) at item_cmpfunc.cc:332
      #11 0x0000000000634aa3 in Item_func_trig_cond::val_int (this=0x7fb46c0642d0) at item_cmpfunc.h:481
      #12 0x0000000000591b98 in Item::val_bool (this=0x7fb46c0642d0) at item.cc:199
      #13 0x00000000005ed5d7 in Item_cond_and::val_int (this=0x7fb46c064868) at item_cmpfunc.cc:4572
      #14 0x0000000000746d35 in evaluate_null_complemented_join_record (join=0x7fb46c07de28, join_tab=0x7fb46c0638e0) at sql_select.cc:16464
      #15 0x00000000007465bb in sub_select (join=0x7fb46c07de28, join_tab=0x7fb46c0638e0, end_of_records=false) at sql_select.cc:16251
      #16 0x0000000000746b21 in evaluate_join_record (join=0x7fb46c07de28, join_tab=0x7fb46c0635c0, error=0) at sql_select.cc:16404
      #17 0x00000000007463c5 in sub_select (join=0x7fb46c07de28, join_tab=0x7fb46c0635c0, end_of_records=false) at sql_select.cc:16206
      #18 0x0000000000745b4c in do_select (join=0x7fb46c07de28, fields=0x34773f0, table=0x0, procedure=0x0) at sql_select.cc:15859
      #19 0x00000000007255d8 in JOIN::exec (this=0x7fb46c07de28) at sql_select.cc:2779
      #20 0x0000000000725e63 in mysql_select (thd=0x3474848, rref_pointer_array=0x3477538, tables=0x7fb46c007818, wild_num=1, fields=..., conds=0x7fb46c009398, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0x7fb46c07de08, unit=0x3476dd8, select_lex=0x34772e0) at sql_select.cc:3000
      #21 0x000000000071c871 in handle_select (thd=0x3474848, lex=0x3476d38, result=0x7fb46c07de08, setup_tables_done_option=0) at sql_select.cc:288
      #22 0x00000000006a8a36 in execute_sqlcom_select (thd=0x3474848, all_tables=0x7fb46c007818) at sql_parse.cc:5172
      #23 0x000000000069f7fe in mysql_execute_command (thd=0x3474848) at sql_parse.cc:2305
      #24 0x00000000006ab4c0 in mysql_parse (thd=0x3474848, rawbuf=0x7fb46c007470 "SELECT * FROM C AS alias1 LEFT OUTER JOIN CC AS alias2 ON (alias2 . `col_varchar_key` = alias1 . `col_varchar_nokey` ) WHERE ( alias1 . `col_varchar_nokey` , alias2 . `col_varchar_key` ) NOT IN ( SELE"..., length=237, found_semicolon=0x7fb4f4bd27e0) at sql_parse.cc:6173
      #25 0x000000000069cf1b in dispatch_command (command=COM_QUERY, thd=0x3474848, packet=0x34788c9 "", packet_length=237) at sql_parse.cc:1243
      #26 0x000000000069c18c in do_command (thd=0x3474848) at sql_parse.cc:923
      #27 0x0000000000699026 in handle_one_connection (arg=0x3474848) at sql_connect.cc:1231
      #28 0x00007fb4f41eee9a in start_thread (arg=0x7fb4f4bd3700) at pthread_create.c:308
      #29 0x00007fb4f3717cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      bzr version-info
      revision-id: bar@mnogosearch.org-20131016141313-63jt6geakz1e6dg2
      revno: 3708
      branch-nick: 5.3

      RQG grammar (1.yy):

      thread2_init:
        SET @id1 = CONNECTION_ID()-1; SET @id2 = CONNECTION_ID()+1;
       
      thread2:
        KILL QUERY victim;
       
      victim:
        @id1 | @id2 ;
       
      query:
        SELECT * FROM C AS alias1 LEFT OUTER JOIN CC AS alias2 ON (alias2 . `col_varchar_key` = alias1 . `col_varchar_nokey` ) WHERE  ( alias1 . `col_varchar_nokey` , alias2 . `col_varchar_key` ) NOT IN ( SELECT 'y' , 'a' UNION  SELECT 'h' , 'l' ) ;

      RQG command line (full test with server startup):

      perl ./runall-new.pl --threads=2 --duration=500 --queries=100M --grammar=1.yy --engine=MyISAM   --basedir1=<5.3 basedir> --vardir1=<vardir>

      RQG command line (assuming the server is already running on port 3306):

      perl ./gentest.pl --threads=2 --duration=500 --queries=100M   --grammar=1.yy --engine=MyISAM --gendata --dsn=dbi:mysql:host=127.0.0.1:port=3306:user=root:database=test

      Attachments

        Activity

          People

            Unassigned Unassigned
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.