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

Assertion `marked_for_read()' failed upon INSERT into table with long unique blob under binlog_row_image=NOBLOB

    XMLWordPrintable

Details

    Description

      --source include/have_binlog_format_row.inc
       
      SET binlog_row_image= NOBLOB;
       
      CREATE TABLE t1 (pk INT PRIMARY KEY, a TEXT, UNIQUE(a));
      INSERT INTO t1 VALUES (1,'foo');
       
      # Cleanup
      DROP TABLE t1;
      

      10.4 e6373551

      mysqld: /data/src/10.4/sql/field.cc:8461: virtual String* Field_blob::val_str(String*, String*): Assertion `marked_for_read()' failed.
      200224  1:04:50 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f0bcd37cf12 in __GI___assert_fail (assertion=0x55e9f552bc30 "marked_for_read()", file=0x55e9f552ba6b "/data/src/10.4/sql/field.cc", line=8461, function=0x55e9f5530e60 <Field_blob::val_str(String*, String*)::__PRETTY_FUNCTION__> "virtual String* Field_blob::val_str(String*, String*)") at assert.c:101
      #8  0x000055e9f49d0311 in Field_blob::val_str (this=0x7f0bb0127cf8, val_buffer=0x7f0bb012e838, val_ptr=0x7f0bb012e838) at /data/src/10.4/sql/field.cc:8461
      #9  0x000055e9f4a1859c in Item_field::val_str (this=0x7f0bb012e808, str=0x7f0bb012e838) at /data/src/10.4/sql/item.cc:3178
      #10 0x000055e9f472bea6 in Item::val_str (this=0x7f0bb012e808) at /data/src/10.4/sql/item.h:902
      #11 0x000055e9f4a81153 in Item_func_hash::val_int (this=0x7f0bb012e918) at /data/src/10.4/sql/item_func.cc:1758
      #12 0x000055e9f4a22844 in Item::save_int_in_field (this=0x7f0bb012e918, field=0x7f0bb0127e20, no_conversions=false) at /data/src/10.4/sql/item.cc:6540
      #13 0x000055e9f48b0bba in Type_handler_int_result::Item_save_in_field (this=0x55e9f5e59b88 <type_handler_long>, item=0x7f0bb012e918, field=0x7f0bb0127e20, no_conversions=false) at /data/src/10.4/sql/sql_type.cc:3672
      #14 0x000055e9f4a228ef in Item::save_in_field (this=0x7f0bb012e918, field=0x7f0bb0127e20, no_conversions=false) at /data/src/10.4/sql/item.cc:6550
      #15 0x000055e9f47cda31 in TABLE::update_virtual_fields (this=0x7f0bb012cfe0, h=0x7f0bb012de48, update_mode=VCOL_UPDATE_FOR_WRITE) at /data/src/10.4/sql/table.cc:8284
      #16 0x000055e9f45fe57a in fill_record (thd=0x7f0bb0000af0, table=0x7f0bb012cfe0, ptr=0x7f0bb0127c20, values=..., ignore_errors=false, use_value=false) at /data/src/10.4/sql/sql_base.cc:8770
      #17 0x000055e9f45fe678 in fill_record_n_invoke_before_triggers (thd=0x7f0bb0000af0, table=0x7f0bb012cfe0, ptr=0x7f0bb0127c00, values=..., ignore_errors=false, event=TRG_EVENT_INSERT) at /data/src/10.4/sql/sql_base.cc:8811
      #18 0x000055e9f4646e82 in mysql_insert (thd=0x7f0bb0000af0, table_list=0x7f0bb0013380, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/10.4/sql/sql_insert.cc:1020
      #19 0x000055e9f469567d in mysql_execute_command (thd=0x7f0bb0000af0) at /data/src/10.4/sql/sql_parse.cc:4528
      #20 0x000055e9f46a1e07 in mysql_parse (thd=0x7f0bb0000af0, rawbuf=0x7f0bb0013298 "INSERT INTO t1 VALUES (1,'foo')", length=31, parser_state=0x7f0bc34b4160, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7900
      #21 0x000055e9f468cfea in dispatch_command (command=COM_QUERY, thd=0x7f0bb0000af0, packet=0x7f0bb01362e1 "INSERT INTO t1 VALUES (1,'foo')", packet_length=31, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1842
      #22 0x000055e9f468b677 in do_command (thd=0x7f0bb0000af0) at /data/src/10.4/sql/sql_parse.cc:1360
      #23 0x000055e9f48148e3 in do_handle_one_connection (connect=0x55e9f740dd20) at /data/src/10.4/sql/sql_connect.cc:1412
      #24 0x000055e9f4814632 in handle_one_connection (arg=0x55e9f740dd20) at /data/src/10.4/sql/sql_connect.cc:1316
      #25 0x000055e9f521b281 in pfs_spawn_thread (arg=0x55e9f738bc40) at /data/src/10.4/storage/perfschema/pfs.cc:1869
      #26 0x00007f0bcf3054a4 in start_thread (arg=0x7f0bc34b5700) at pthread_create.c:456
      #27 0x00007f0bcd439d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Reproducible on 10.4, 10.5.
      The test case is not applicable to 10.3 due to the long unique blob.
      No obvious problem on a non-debug build.

      Attachments

        Issue Links

          Activity

            People

              sachin.setiya.007 Sachin Setiya (Inactive)
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.