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

Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed in Field_long::val_str on EXPLAIN EXTENDED

    XMLWordPrintable

Details

    Description

      CREATE TABLE t1 (f1 INT, f2 INT, KEY(f2)) ENGINE=MyISAM;
      INSERT INTO t1 VALUES (6,9);
       
      CREATE TABLE t2 (f3 INT) ENGINE=MyISAM;
      INSERT INTO t2 VALUES (2),(0);
       
      EXPLAIN EXTENDED 
      SELECT f1 FROM ( SELECT * FROM t1 ) AS sq
      WHERE f1 IN ( 
        SELECT f3 FROM t2 WHERE f2 IN ( 
          SELECT f3 FROM t2 HAVING f3 >= 8 
        ) 
      );

      Stack trace from 5.5 commit 86f46a3da4a6d82cb510dc4c270d46cfd6a8965b

      5.5/sql/field.cc:3669: virtual String* Field_long::val_str(String*, String*): Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed.
      150325  0:00:42 [ERROR] mysqld got signal 6 ;
       
      #6  0x00007f8f648e2311 in *__GI___assert_fail (assertion=0xe01f70 "!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))", file=<optimized out>, line=3669, function=0xe053a0 "virtual String* Field_long::val_str(String*, String*)") at assert.c:81
      #7  0x00000000007c5bd2 in Field_long::val_str (this=0x7f8f5f458b48, val_buffer=0x7f8f5ffb4340, val_ptr=0x7f8f5f587e20) at 5.5/sql/field.cc:3669
      #8  0x00000000007fc650 in Item_field::val_str (this=0x7f8f5f587e08, str=0x7f8f5ffb4340) at 5.5/sql/item.cc:2566
      #9  0x00000000007f72af in Item::print_value (this=0x7f8f5f587e08, str=0x7f8f5ffb48a0) at 5.5/sql/item.cc:634
      #10 0x000000000080754a in Item_field::print (this=0x7f8f5f587e08, str=0x7f8f5ffb48a0, query_type=QT_TO_SYSTEM_CHARSET) at 5.5/sql/item.cc:6697
      #11 0x0000000000808a5f in Item_ref::print (this=0x7f8f5f58aa18, str=0x7f8f5ffb48a0, query_type=QT_TO_SYSTEM_CHARSET) at 5.5/sql/item.cc:7204
      #12 0x000000000084351c in Item_func::print_op (this=0x7f8f5f542ab8, str=0x7f8f5ffb48a0, query_type=QT_TO_SYSTEM_CHARSET) at 5.5/sql/item_func.cc:491
      #13 0x000000000082ae63 in Item_bool_func2::print (this=0x7f8f5f542ab8, str=0x7f8f5ffb48a0, query_type=QT_TO_SYSTEM_CHARSET) at 5.5/sql/item_cmpfunc.h:385
      #14 0x0000000000826070 in Item_cond::print (this=0x7f8f5f5437a8, str=0x7f8f5ffb48a0, query_type=QT_TO_SYSTEM_CHARSET) at 5.5/sql/item_cmpfunc.cc:4633
      #15 0x000000000069e315 in st_select_lex::print (this=0x7f8f60553a60, thd=0x7f8f60550060, str=0x7f8f5ffb48a0, query_type=QT_TO_SYSTEM_CHARSET) at 5.5/sql/sql_select.cc:23366
      #16 0x00000000006298f8 in st_select_lex_unit::print (this=0x7f8f60553380, str=0x7f8f5ffb48a0, query_type=QT_TO_SYSTEM_CHARSET) at 5.5/sql/sql_lex.cc:2361
      #17 0x000000000063c0d8 in execute_sqlcom_select (thd=0x7f8f60550060, all_tables=0x7f8f5f5696b0) at 5.5/sql/sql_parse.cc:4674
      #18 0x00000000006353de in mysql_execute_command (thd=0x7f8f60550060) at 5.5/sql/sql_parse.cc:2234
      #19 0x000000000063ece2 in mysql_parse (thd=0x7f8f60550060, rawbuf=0x7f8f5f687078 "EXPLAIN EXTENDED \nSELECT f1 FROM ( SELECT * FROM t1 ) AS sq\nWHERE f1 IN ( \nSELECT f3 FROM t2 WHERE f2 IN ( \nSELECT f3 FROM t2 HAVING f3 >= 8 \n) \n)", length=146, parser_state=0x7f8f5ffb5620) at 5.5/sql/sql_parse.cc:5909
      #20 0x0000000000632925 in dispatch_command (command=COM_QUERY, thd=0x7f8f60550060, packet=0x7f8f60609061 "", packet_length=146) at 5.5/sql/sql_parse.cc:1079
      #21 0x0000000000631ab1 in do_command (thd=0x7f8f60550060) at 5.5/sql/sql_parse.cc:793
      #22 0x0000000000734122 in do_handle_one_connection (thd_arg=0x7f8f60550060) at 5.5/sql/sql_connect.cc:1266
      #23 0x0000000000733be1 in handle_one_connection (arg=0x7f8f60550060) at 5.5/sql/sql_connect.cc:1181
      #24 0x0000000000b6c629 in pfs_spawn_thread (arg=0x7f8f60571fc0) at 5.5/storage/perfschema/pfs.cc:1015
      #25 0x00007f8f666ddb50 in start_thread (arg=<optimized out>) at pthread_create.c:304
      #26 0x00007f8f6499370d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      Attachments

        Issue Links

          Activity

            People

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