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

Server crashes in Item_field::register_field_in_read_map

    XMLWordPrintable

Details

    Description

      CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL) ENGINE=MyISAM;
      CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1;
      INSERT INTO t1 VALUES (1,2),(3,4);
       
      CREATE TABLE t2 (c INT NOT NULL) ENGINE=MyISAM;
      INSERT INTO t2 VALUES (5),(6);
       
      SELECT a, GROUP_CONCAT(b) FROM v1 WHERE b IN ( SELECT COUNT(c) FROM t2 ) GROUP BY a;
      

      Stack trace from 10.2 de2175e96a

      #3  <signal handler called>
      #4  0x00007effd7bd34c7 in Item_field::register_field_in_read_map (this=0x7effcc465b00, arg=0x7effcc5ba088) at /data/src/10.2/sql/item.cc:903
      #5  0x00007effd789c9d9 in Item::walk (this=0x7effcc465b00, processor=&virtual table offset 808, walk_subquery=true, arg=0x7effcc5ba088) at /data/src/10.2/sql/item.h:1413
      #6  0x00007effd789a987 in Item_args::walk_args (this=0x7effcc465c80, processor=&virtual table offset 808, walk_subquery=true, arg=0x7effcc5ba088) at /data/src/10.2/sql/item.h:3679
      #7  0x00007effd789abd5 in Item_func_or_sum::walk (this=0x7effcc465bf8, processor=&virtual table offset 808, walk_subquery=true, arg=0x7effcc5ba088) at /data/src/10.2/sql/item.h:3942
      #8  0x00007effd7bf352e in Item_cache::walk (this=0x7effcc519168, processor=&virtual Item::register_field_in_read_map(void*), walk_subquery=true, arg=0x7effcc5ba088) at /data/src/10.2/sql/item.h:5261
      #9  0x00007effd789a987 in Item_args::walk_args (this=0x7effcc51f6f0, processor=&virtual table offset 808, walk_subquery=true, arg=0x7effcc5ba088) at /data/src/10.2/sql/item.h:3679
      #10 0x00007effd789abd5 in Item_func_or_sum::walk (this=0x7effcc51f668, processor=&virtual table offset 808, walk_subquery=true, arg=0x7effcc5ba088) at /data/src/10.2/sql/item.h:3942
      #11 0x00007effd7bb88fe in find_all_keys (thd=0x7effcc416070, param=0x7effd8a65560, select=0x7effcc51f7d8, fs_info=0x7effcc694200, buffpek_pointers=0x7effd8a65770, tempfile=0x7effd8a655f0, pq=0x0, found_rows=0x7effcc6943f0) at /data/src/10.2/sql/filesort.cc:770
      #12 0x00007effd7bb70aa in filesort (thd=0x7effcc416070, table=0x7effcc5ba088, filesort=0x7effcc51fe10, tracker=0x7effcc5207a0, join=0x7effcc468dd8, first_table_bit=1) at /data/src/10.2/sql/filesort.cc:284
      #13 0x00007effd79cd309 in create_sort_index (thd=0x7effcc416070, join=0x7effcc468dd8, tab=0x7effcc51ed28, fsort=0x7effcc51fe10) at /data/src/10.2/sql/sql_select.cc:21467
      #14 0x00007effd79c7d84 in st_join_table::sort_table (this=0x7effcc51ed28) at /data/src/10.2/sql/sql_select.cc:19304
      #15 0x00007effd79c7a7d in join_init_read_record (tab=0x7effcc51ed28) at /data/src/10.2/sql/sql_select.cc:19251
      #16 0x00007effd79c59e7 in sub_select (join=0x7effcc468dd8, join_tab=0x7effcc51ed28, end_of_records=false) at /data/src/10.2/sql/sql_select.cc:18336
      #17 0x00007effd79c5007 in do_select (join=0x7effcc468dd8, procedure=0x0) at /data/src/10.2/sql/sql_select.cc:17883
      #18 0x00007effd799fff0 in JOIN::exec_inner (this=0x7effcc468dd8) at /data/src/10.2/sql/sql_select.cc:3373
      #19 0x00007effd799f53a in JOIN::exec (this=0x7effcc468dd8) at /data/src/10.2/sql/sql_select.cc:3184
      #20 0x00007effd79a0691 in mysql_select (thd=0x7effcc416070, tables=0x7effcc4648d0, wild_num=0, fields=..., conds=0x7effcc4663b0, og_num=1, order=0x0, group=0x7effcc4666e8, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7effcc468db8, unit=0x7effcc419b30, select_lex=0x7effcc41a268) at /data/src/10.2/sql/sql_select.cc:3569
      #21 0x00007effd79957ad in handle_select (thd=0x7effcc416070, lex=0x7effcc419a68, result=0x7effcc468db8, setup_tables_done_option=0) at /data/src/10.2/sql/sql_select.cc:373
      #22 0x00007effd796338b in execute_sqlcom_select (thd=0x7effcc416070, all_tables=0x7effcc4648d0) at /data/src/10.2/sql/sql_parse.cc:6347
      #23 0x00007effd7958e79 in mysql_execute_command (thd=0x7effcc416070) at /data/src/10.2/sql/sql_parse.cc:3376
      #24 0x00007effd7966d4a in mysql_parse (thd=0x7effcc416070, rawbuf=0x7effcc464088 "SELECT a, GROUP_CONCAT(b) FROM v1 WHERE b IN ( SELECT COUNT(c) FROM t2 ) GROUP BY a", length=83, parser_state=0x7effd8a66dd0, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7790
      #25 0x00007effd7954acd in dispatch_command (command=COM_QUERY, thd=0x7effcc416070, packet=0x7effcc458071 "", packet_length=83, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1805
      #26 0x00007effd79534a7 in do_command (thd=0x7effcc416070) at /data/src/10.2/sql/sql_parse.cc:1365
      #27 0x00007effd7a98d2c in do_handle_one_connection (connect=0x7effd486d410) at /data/src/10.2/sql/sql_connect.cc:1354
      #28 0x00007effd7a98ab9 in handle_one_connection (arg=0x7effd486d410) at /data/src/10.2/sql/sql_connect.cc:1260
      #29 0x00007effd7dc46e4 in pfs_spawn_thread (arg=0x7effd48519f0) at /data/src/10.2/storage/perfschema/pfs.cc:1862
      #30 0x00007effd6fc20a4 in start_thread (arg=0x7effd8a68300) at pthread_create.c:309
      #31 0x00007effd517a87d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      Not reproducible with condition_pushdown_for_derived=off.

      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.