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

Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field _index))' fails on EXPLAIN EXTENDED with CTE

    XMLWordPrintable

Details

    Description

      CREATE TABLE t1 (i INT, c VARCHAR(3));
      INSERT INTO t1 VALUES (1,'foo');
      EXPLAIN EXTENDED WITH cte AS ( SELECT * FROM t1 ) SELECT i FROM cte;
      

      10.2 fd0479ce592

      mysqld: /data/src/10.2/sql/field.cc:7511: virtual String* Field_varstring::val_str(String*, String*): Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field
      _index))' failed.
      170116 21:29:27 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fa1ed619312 in __GI___assert_fail (assertion=0x7fa1f0c38ef8 "!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))", file=0x7fa1f0c38c9c "/data/src/10.2/sql/field.cc", line=7511, function=0x7fa1f0c3d2e0 <Field_varstring::val_str(String*, String*)::__PRETTY_FUNCTION__> "virtual String* Field_varstring::val_str(String*, String*)") at assert.c:101
      #8  0x00007fa1f034669e in Field_varstring::val_str (this=0x7fa1e4827b90, val_buffer=0x7fa1f1224820, val_ptr=0x7fa1e4867138) at /data/src/10.2/sql/field.cc:7511
      #9  0x00007fa1f037c913 in Item_field::val_str (this=0x7fa1e4867108, str=0x7fa1f1224820) at /data/src/10.2/sql/item.cc:2731
      #10 0x00007fa1f0376ab9 in Item::print_value (this=0x7fa1e4867108, str=0x7fa1f1224d80) at /data/src/10.2/sql/item.cc:607
      #11 0x00007fa1f038965e in Item_field::print (this=0x7fa1e4867108, str=0x7fa1f1224d80, query_type=QT_TO_SYSTEM_CHARSET) at /data/src/10.2/sql/item.cc:7183
      #12 0x00007fa1f03769dd in Item::print_item_w_name (this=0x7fa1e4867108, str=0x7fa1f1224d80, query_type=QT_TO_SYSTEM_CHARSET) at /data/src/10.2/sql/item.cc:592
      #13 0x00007fa1f0178913 in st_select_lex::print (this=0x7fa1e4864218, thd=0x7fa1e4816070, str=0x7fa1f1224d80, query_type=QT_TO_SYSTEM_CHARSET) at /data/src/10.2/sql/sql_select.cc:25114
      #14 0x00007fa1f00e7b81 in st_select_lex_unit::print (this=0x7fa1e48645d0, str=0x7fa1f1224d80, query_type=QT_TO_SYSTEM_CHARSET) at /data/src/10.2/sql/sql_lex.cc:2702
      #15 0x00007fa1f02bec4f in With_element::print (this=0x7fa1e4865460, str=0x7fa1f1224d80, query_type=QT_TO_SYSTEM_CHARSET) at /data/src/10.2/sql/sql_cte.cc:1280
      #16 0x00007fa1f02beba5 in With_clause::print (this=0x7fa1e4864190, str=0x7fa1f1224d80, query_type=QT_TO_SYSTEM_CHARSET) at /data/src/10.2/sql/sql_cte.cc:1256
      #17 0x00007fa1f00e7ac4 in st_select_lex_unit::print (this=0x7fa1e4819b48, str=0x7fa1f1224d80, query_type=QT_TO_SYSTEM_CHARSET) at /data/src/10.2/sql/sql_lex.cc:2689
      #18 0x00007fa1f0102c49 in execute_sqlcom_select (thd=0x7fa1e4816070, all_tables=0x7fa1e4865670) at /data/src/10.2/sql/sql_parse.cc:6365
      #19 0x00007fa1f00f8ee9 in mysql_execute_command (thd=0x7fa1e4816070) at /data/src/10.2/sql/sql_parse.cc:3429
      #20 0x00007fa1f01068a0 in mysql_parse (thd=0x7fa1e4816070, rawbuf=0x7fa1e4864088 "EXPLAIN EXTENDED WITH cte AS ( SELECT * FROM t1 ) SELECT i FROM cte", length=67, parser_state=0x7fa1f1225dd0, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7842
      #21 0x00007fa1f00f49ab in dispatch_command (command=COM_QUERY, thd=0x7fa1e4816070, packet=0x7fa1e4858071 "", packet_length=67, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1800
      #22 0x00007fa1f00f33a3 in do_command (thd=0x7fa1e4816070) at /data/src/10.2/sql/sql_parse.cc:1360
      #23 0x00007fa1f023bc48 in do_handle_one_connection (connect=0x7fa1ecc71410) at /data/src/10.2/sql/sql_connect.cc:1354
      #24 0x00007fa1f023b9d5 in handle_one_connection (arg=0x7fa1ecc71410) at /data/src/10.2/sql/sql_connect.cc:1260
      #25 0x00007fa1f057bf62 in pfs_spawn_thread (arg=0x7fa1ecc0f9f0) at /data/src/10.2/storage/perfschema/pfs.cc:1862
      #26 0x00007fa1ef7260a4 in start_thread (arg=0x7fa1f1227300) at pthread_create.c:309
      #27 0x00007fa1ed6d387d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      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.