Bug #101225 binlog_row_image=minimal and delete from a table with generated column failed
Submitted: 19 Oct 2020 3:49 Modified: 19 Oct 2020 6:04
Reporter: Qilu Wei Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S6 (Debug Builds)
Version:8.0, 5.7.31, 8.0.21 OS:Linux
Assigned to: CPU Architecture:Any

[19 Oct 2020 3:49] Qilu Wei
Description:
mysqld: /home/wqldb_21/mysql-8.0.21/sql/field.cc:3662: virtual type_conversion_status Field_long::store(longlong, bool): Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field_index()))' failed.
03:51:51 UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x7fac50af4840
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7fadaee8bc40 thread_stack 0x46000
/home/wqldb_21/bin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x43) [0x4d9efb8]
/home/wqldb_21/bin/mysqld(handle_fatal_signal+0x2bf) [0x3a163c6]
/usr/lib64/libpthread.so.0(+0xf5e0) [0x7fadc2d985e0]
/usr/lib64/libc.so.6(gsignal+0x37) [0x7fadc0fc71f7]
/usr/lib64/libc.so.6(abort+0x148) [0x7fadc0fc88e8]
/usr/lib64/libc.so.6(+0x2e266) [0x7fadc0fc0266]
/usr/lib64/libc.so.6(+0x2e312) [0x7fadc0fc0312]
/home/wqldb_21/bin/mysqld(Field_long::store(long long, bool)+0x84) [0x3b72886]
/home/wqldb_21/bin/mysqld(Item::save_in_field_inner(Field*, bool)+0xb36) [0x3c1f058]
/home/wqldb_21/bin/mysqld(Item::save_in_field(Field*, bool)+0xab) [0x3c1e483]
/home/wqldb_21/bin/mysqld(update_generated_read_fields(unsigned char*, TABLE*, unsigned int)+0x1ed) [0x39ae18f]
/home/wqldb_21/bin/mysqld(handler::ha_rnd_next(unsigned char*)+0x380) [0x3bb514e]
/home/wqldb_21/bin/mysqld(TableScanIterator::Read()+0x30) [0x370d532]
/home/wqldb_21/bin/mysqld(Sql_cmd_delete::delete_from_single_table(THD*)+0x150a) [0x37a0c2c]
/home/wqldb_21/bin/mysqld(Sql_cmd_delete::execute_inner(THD*)+0xf2) [0x37a2064]
/home/wqldb_21/bin/mysqld(Sql_cmd_dml::execute(THD*)+0x3f7) [0x38b4875]
/home/wqldb_21/bin/mysqld(mysql_execute_command(THD*, bool)+0x267e) [0x3837799]
/home/wqldb_21/bin/mysqld(mysql_parse(THD*, Parser_state*)+0x6be) [0x383d843]
/home/wqldb_21/bin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x14a7) [0x383283b]
/home/wqldb_21/bin/mysqld(do_command(THD*)+0x47f) [0x3830d50]
/home/wqldb_21/bin/mysqld() [0x3a00e3b]
/home/wqldb_21/bin/mysqld() [0x55de5d9]
/usr/lib64/libpthread.so.0(+0x7e25) [0x7fadc2d90e25]
/usr/lib64/libc.so.6(clone+0x6d) [0x7fadc108a34d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7fac50bdf1a8): delete from gc
Connection ID (thread ID): 9
Status: NOT_KILLED

How to repeat:
set binlog_format = "FULL";
set binlog_row_image = "MINIMAL";
create table gc (a int, b int, c int GENERATED ALWAYS AS (a+b) VIRTUAL);
insert into gc (a,b) values (1,1),(1,2);
delete from gc;
[19 Oct 2020 6:04] MySQL Verification Team
Hello Qilu Wei,

Thank you for the report and test case.
Observed that 5.7.31 and 8.0.21 debug builds are affected.

regards,
Umesh