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

Assertion `marked_for_read()' failed in Field_blob::val_str with virtual columns and views

    Details

      Description

      Note: Assertion failure is the same as in recently fixed MDEV-19224, but everything else is different, so I'm filing it separately.

      CREATE TABLE t1 (a BLOB, b TEXT AS (a) VIRTUAL);
      CREATE VIEW v1 AS SELECT * FROM t1;
      INSERT INTO t1 (a) VALUES ('foo'),('bar');
      DELETE FROM v1 ORDER BY b LIMIT 2;
       
      # Cleanup
      DROP VIEW v1;
      DROP TABLE t1;
      

      10.4 a65d3b2c

      mysqld: /data/src/10.4/sql/field.cc:8380: virtual String* Field_blob::val_str(String*, String*): Assertion `marked_for_read()' failed.
      190423  2:34:49 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fcfef332ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000056071a663934 in Field_blob::val_str (this=0x7fcfd8136458, val_buffer=0x7fcfd8136678, val_ptr=0x7fcfd8136678) at /data/src/10.4/sql/field.cc:8380
      #9  0x000056071a233cef in Field::val_str (this=0x7fcfd8136458, str=0x7fcfd8136678) at /data/src/10.4/sql/field.h:838
      #10 0x000056071a672b57 in Field_blob::store_field (this=0x7fcfd8136588, from=0x7fcfd8136458) at /data/src/10.4/sql/field.h:3886
      #11 0x000056071a677dee in field_conv_incompatible (to=0x7fcfd8136588, from=0x7fcfd8136458) at /data/src/10.4/sql/field_conv.cc:851
      #12 0x000056071a677e4a in field_conv (to=0x7fcfd8136588, from=0x7fcfd8136458) at /data/src/10.4/sql/field_conv.cc:864
      #13 0x000056071a6afdc0 in save_field_in_field (from=0x7fcfd8136458, null_value=0x7fcfd813ce0e, to=0x7fcfd8136588, no_conversions=false) at /data/src/10.4/sql/item.cc:6338
      #14 0x000056071a6b0002 in Item_field::save_in_field (this=0x7fcfd813cd98, to=0x7fcfd8136588, no_conversions=false) at /data/src/10.4/sql/item.cc:6389
      #15 0x000056071a47ac7c in TABLE::update_virtual_fields (this=0x7fcfd813b790, h=0x7fcfd813c5f8, update_mode=VCOL_UPDATE_FOR_READ) at /data/src/10.4/sql/table.cc:8198
      #16 0x000056071a68a8db in handler::ha_rnd_pos (this=0x7fcfd813c5f8, buf=0x7fcfd8136410 "\374\003", pos=0x7fcfd8084150 "") at /data/src/10.4/sql/handler.cc:3024
      #17 0x000056071a81dff8 in rr_from_pointers (info=0x7fcfe94aae10) at /data/src/10.4/sql/records.cc:547
      #18 0x000056071a2a380b in READ_RECORD::read_record (this=0x7fcfe94aae10) at /data/src/10.4/sql/records.h:73
      #19 0x000056071a83c359 in mysql_delete (thd=0x7fcfd8000b00, table_list=0x7fcfd80156d8, conds=0x0, order_list=0x7fcfd80054a0, limit=2, options=0, result=0x0) at /data/src/10.4/sql/sql_delete.cc:804
      #20 0x000056071a351cc6 in mysql_execute_command (thd=0x7fcfd8000b00) at /data/src/10.4/sql/sql_parse.cc:4985
      #21 0x000056071a35ca13 in mysql_parse (thd=0x7fcfd8000b00, rawbuf=0x7fcfd80155e8 "DELETE FROM v1 ORDER BY b LIMIT 2", length=33, parser_state=0x7fcfe94ac180, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8154
      #22 0x000056071a34846a in dispatch_command (command=COM_QUERY, thd=0x7fcfd8000b00, packet=0x7fcfd800a8a1 "DELETE FROM v1 ORDER BY b LIMIT 2", packet_length=33, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1832
      #23 0x000056071a346c50 in do_command (thd=0x7fcfd8000b00) at /data/src/10.4/sql/sql_parse.cc:1365
      #24 0x000056071a4bf033 in do_handle_one_connection (connect=0x56071cec85b0) at /data/src/10.4/sql/sql_connect.cc:1398
      #25 0x000056071a4beda4 in handle_one_connection (arg=0x56071cec85b0) at /data/src/10.4/sql/sql_connect.cc:1301
      #26 0x000056071a8e32f5 in pfs_spawn_thread (arg=0x56071cfba980) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #27 0x00007fcff1427494 in start_thread (arg=0x7fcfe94ad700) at pthread_create.c:333
      #28 0x00007fcfef3ef93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated: