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

Server crashes in Item_func_trig_cond::val_int

    XMLWordPrintable

Details

    Description

      CREATE TABLE t (pk INT PRIMARY KEY, i INT NOT NULL, c VARCHAR(8), KEY(c)) ENGINE=MyISAM;
      INSERT INTO t VALUES (1,10,'foo'),(2,20,'bar');
       
      SELECT * FROM t t1 RIGHT JOIN t t2 ON (t2.pk = t1.pk)
      WHERE (t2.i, t2.pk) NOT IN ( SELECT t3.i, t3.i FROM t t3, t t4 ) AND t1.c = 'foo';
      

      10.2 54a995cd2206995f6dd675cabdce12a4b7ff7540

      #3  <signal handler called>
      #4  0x00007f0296837a4d in Item_func_trig_cond::val_int (this=0x7f027c03d758) at /data/src/10.2/sql/item_cmpfunc.h:609
      #5  0x00007f0296a30c9b in Item::val_bool (this=0x7f027c03d758) at /data/src/10.2/sql/item.cc:112
      #6  0x00007f0296a68562 in Item_cond_and::val_int (this=0x7f027c040120) at /data/src/10.2/sql/item_cmpfunc.cc:4972
      #7  0x00007f0296820f65 in evaluate_join_record (join=0x7f027c017180, join_tab=0x7f027c03f210, error=0) at /data/src/10.2/sql/sql_select.cc:18553
      #8  0x00007f0296820b9f in sub_select (join=0x7f027c017180, join_tab=0x7f027c03f210, end_of_records=false) at /data/src/10.2/sql/sql_select.cc:18458
      #9  0x00007f0296820137 in do_select (join=0x7f027c017180, procedure=0x0) at /data/src/10.2/sql/sql_select.cc:18002
      #10 0x00007f02967fad61 in JOIN::exec_inner (this=0x7f027c017180) at /data/src/10.2/sql/sql_select.cc:3464
      #11 0x00007f02967fa266 in JOIN::exec (this=0x7f027c017180) at /data/src/10.2/sql/sql_select.cc:3267
      #12 0x00007f0296aeb9a9 in subselect_single_select_engine::exec (this=0x7f027c015c28) at /data/src/10.2/sql/item_subselect.cc:3832
      #13 0x00007f0296ae0b89 in Item_subselect::exec (this=0x7f027c015a28) at /data/src/10.2/sql/item_subselect.cc:716
      #14 0x00007f0296ae119e in Item_in_subselect::exec (this=0x7f027c015a28) at /data/src/10.2/sql/item_subselect.cc:896
      #15 0x00007f0296ae3cc9 in Item_in_subselect::val_bool (this=0x7f027c015a28) at /data/src/10.2/sql/item_subselect.cc:1743
      #16 0x00007f02966ef723 in Item::val_bool_result (this=0x7f027c015a28) at /data/src/10.2/sql/item.h:1187
      #17 0x00007f0296a5da50 in Item_in_optimizer::val_int (this=0x7f027c0177e0) at /data/src/10.2/sql/item_cmpfunc.cc:1621
      #18 0x00007f02966ef697 in Item::val_int_result (this=0x7f027c0177e0) at /data/src/10.2/sql/item.h:1183
      #19 0x00007f0296a4b7cf in Item_cache_int::cache_value (this=0x7f027c041428) at /data/src/10.2/sql/item.cc:9463
      #20 0x00007f0296a557e4 in Item_cache_wrapper::cache (this=0x7f027c041370) at /data/src/10.2/sql/item.cc:8209
      #21 0x00007f0296a48226 in Item_cache_wrapper::val_bool (this=0x7f027c041370) at /data/src/10.2/sql/item.cc:8373
      #22 0x00007f0296a59aa0 in Item_func_not::val_int (this=0x7f027c015c68) at /data/src/10.2/sql/item_cmpfunc.cc:284
      #23 0x00007f0296820f65 in evaluate_join_record (join=0x7f027c0162b8, join_tab=0x7f027c03b990, error=0) at /data/src/10.2/sql/sql_select.cc:18553
      #24 0x00007f0296820b9f in sub_select (join=0x7f027c0162b8, join_tab=0x7f027c03b990, end_of_records=false) at /data/src/10.2/sql/sql_select.cc:18458
      #25 0x00007f029682128f in evaluate_join_record (join=0x7f027c0162b8, join_tab=0x7f027c03b5e0, error=0) at /data/src/10.2/sql/sql_select.cc:18678
      #26 0x00007f0296820b9f in sub_select (join=0x7f027c0162b8, join_tab=0x7f027c03b5e0, end_of_records=false) at /data/src/10.2/sql/sql_select.cc:18458
      #27 0x00007f0296820137 in do_select (join=0x7f027c0162b8, procedure=0x0) at /data/src/10.2/sql/sql_select.cc:18002
      #28 0x00007f02967fad61 in JOIN::exec_inner (this=0x7f027c0162b8) at /data/src/10.2/sql/sql_select.cc:3464
      #29 0x00007f02967fa266 in JOIN::exec (this=0x7f027c0162b8) at /data/src/10.2/sql/sql_select.cc:3267
      #30 0x00007f02967fb3d9 in mysql_select (thd=0x7f027c000b00, tables=0x7f027c012618, wild_num=1, fields=..., conds=0x7f027c016040, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f027c016298, unit=0x7f027c0045e0, select_lex=0x7f027c004d10) at /data/src/10.2/sql/sql_select.cc:3659
      #31 0x00007f02967efea2 in handle_select (thd=0x7f027c000b00, lex=0x7f027c004518, result=0x7f027c016298, setup_tables_done_option=0) at /data/src/10.2/sql/sql_select.cc:373
      #32 0x00007f02967bc223 in execute_sqlcom_select (thd=0x7f027c000b00, all_tables=0x7f027c012618) at /data/src/10.2/sql/sql_parse.cc:6431
      #33 0x00007f02967b2262 in mysql_execute_command (thd=0x7f027c000b00) at /data/src/10.2/sql/sql_parse.cc:3448
      #34 0x00007f02967bfbf6 in mysql_parse (thd=0x7f027c000b00, rawbuf=0x7f027c012348 "SELECT * FROM t t1 RIGHT JOIN t t2 ON (t2.pk = t1.pk)\nWHERE (t2.i, t2.pk) NOT IN ( SELECT t3.i, t3.i FROM t t3, t t4 ) AND t1.c = 'foo'", length=135, parser_state=0x7f028e5cc210, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7874
      #35 0x00007f02967adcce in dispatch_command (command=COM_QUERY, thd=0x7f027c000b00, packet=0x7f027c0087a1 "", packet_length=135, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1812
      #36 0x00007f02967ac63e in do_command (thd=0x7f027c000b00) at /data/src/10.2/sql/sql_parse.cc:1362
      #37 0x00007f02968f6e05 in do_handle_one_connection (connect=0x7f0299d43260) at /data/src/10.2/sql/sql_connect.cc:1354
      #38 0x00007f02968f6b92 in handle_one_connection (arg=0x7f0299d43260) at /data/src/10.2/sql/sql_connect.cc:1260
      #39 0x00007f0296d0feb8 in pfs_spawn_thread (arg=0x7f0299d1db10) at /data/src/10.2/storage/perfschema/pfs.cc:1862
      #40 0x00007f0295dd2064 in start_thread (arg=0x7f028e5cd700) at pthread_create.c:309
      #41 0x00007f02941c262d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      The crash seems to have appeared in 10.2 tree with this commit:

      commit 00ab154d49853e20f48a516897e14bf67c58671e
      Author: Igor Babaev <igor@askmonty.org>
      Date:   Mon Apr 3 15:59:38 2017 -0700
       
          Fixed bug mdev-10454.
      

      Attachments

        Activity

          People

            igor Igor Babaev
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.