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

Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed on EXPLAIN EXTENDED with constant table and view

    Details

      Description

      CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=MyISAM;
      CREATE VIEW v1 AS SELECT * FROM t1;
      INSERT INTO t1 VALUES (1);
      EXPLAIN EXTENDED SELECT ISNULL(pk) FROM v1;
       
      # Cleanup
      DROP VIEW v1;
      DROP TABLE t1;
      

      5.5 ac3fd5acac6b3717c

      mysqld: /data/src/5.5/sql/field.cc:3673: virtual String* Field_long::val_str(String*, String*): Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed.
      180306  3:47:00 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f3b9fec8ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000000000078d036 in Field_long::val_str (this=0x7f3b9a858f98, val_buffer=0x7f3ba193b460, val_ptr=0x7f3b9a949f10) at /data/src/5.5/sql/field.cc:3673
      #9  0x00000000007c30de in Item_field::val_str (this=0x7f3b9a949ef8, str=0x7f3ba193b460) at /data/src/5.5/sql/item.cc:2613
      #10 0x00000000007bdaae in Item::print_value (this=0x7f3b9a949ef8, str=0x7f3ba193b9a0) at /data/src/5.5/sql/item.cc:635
      #11 0x00000000007ce39e in Item_field::print (this=0x7f3b9a949ef8, str=0x7f3ba193b9a0, query_type=QT_TO_SYSTEM_CHARSET) at /data/src/5.5/sql/item.cc:6845
      #12 0x00000000007cf911 in Item_ref::print (this=0x7f3b9a93c078, str=0x7f3ba193b9a0, query_type=QT_TO_SYSTEM_CHARSET) at /data/src/5.5/sql/item.cc:7360
      #13 0x000000000080a0db in Item_func::print_args (this=0x7f3b9a948288, str=0x7f3ba193b9a0, from=0, query_type=QT_TO_SYSTEM_CHARSET) at /data/src/5.5/sql/item_func.cc:481
      #14 0x000000000080a049 in Item_func::print (this=0x7f3b9a948288, str=0x7f3ba193b9a0, query_type=QT_TO_SYSTEM_CHARSET) at /data/src/5.5/sql/item_func.cc:470
      #15 0x00000000007bd9e1 in Item::print_item_w_name (this=0x7f3b9a948288, str=0x7f3ba193b9a0, query_type=QT_TO_SYSTEM_CHARSET) at /data/src/5.5/sql/item.cc:620
      #16 0x000000000066a039 in st_select_lex::print (this=0x7f3b9ba67a68, thd=0x7f3b9ba64060, str=0x7f3ba193b9a0, query_type=QT_TO_SYSTEM_CHARSET) at /data/src/5.5/sql/sql_select.cc:23585
      #17 0x00000000005f4e0e in st_select_lex_unit::print (this=0x7f3b9ba67388, str=0x7f3ba193b9a0, query_type=QT_TO_SYSTEM_CHARSET) at /data/src/5.5/sql/sql_lex.cc:2391
      #18 0x0000000000607512 in execute_sqlcom_select (thd=0x7f3b9ba64060, all_tables=0x7f3b9a9483b8) at /data/src/5.5/sql/sql_parse.cc:4663
      #19 0x00000000006009b3 in mysql_execute_command (thd=0x7f3b9ba64060) at /data/src/5.5/sql/sql_parse.cc:2224
      #20 0x000000000060a1fe in mysql_parse (thd=0x7f3b9ba64060, rawbuf=0x7f3b9a948078 "EXPLAIN EXTENDED SELECT ISNULL(pk) FROM v1", length=42, parser_state=0x7f3ba193c640) at /data/src/5.5/sql/sql_parse.cc:5923
      #21 0x00000000005fdf13 in dispatch_command (command=COM_QUERY, thd=0x7f3b9ba64060, packet=0x7f3b9f75b061 "", packet_length=42) at /data/src/5.5/sql/sql_parse.cc:1066
      #22 0x00000000005fd105 in do_command (thd=0x7f3b9ba64060) at /data/src/5.5/sql/sql_parse.cc:793
      #23 0x000000000070024f in do_handle_one_connection (thd_arg=0x7f3b9ba64060) at /data/src/5.5/sql/sql_connect.cc:1268
      #24 0x00000000006fffdc in handle_one_connection (arg=0x7f3b9ba64060) at /data/src/5.5/sql/sql_connect.cc:1184
      #25 0x0000000000a0e06b in pfs_spawn_thread (arg=0x7f3b9c776fc0) at /data/src/5.5/storage/perfschema/pfs.cc:1015
      #26 0x00007f3ba156f494 in start_thread (arg=0x7f3ba193d700) at pthread_create.c:333
      #27 0x00007f3b9ff8593f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      No visible problem on non-debug build.

        Attachments

          Activity

            People

            • Assignee:
              sanja Oleksandr Byelkin
              Reporter:
              elenst Elena Stepanova
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: