[MDEV-28916] Assertion `"unexpected error" == 0' failed in dberr_t row_update_for_mysql(row_prebuilt_t*) Created: 2022-06-21  Updated: 2023-05-24  Resolved: 2023-05-24

Status: Closed
Project: MariaDB Server
Component/s: Full-text Search, Storage Engine - InnoDB, Versioned Tables
Affects Version/s: 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10
Fix Version/s: 10.4.28, 10.5.19, 10.6.12, 10.8.7, 10.9.5, 10.10.3

Type: Bug Priority: Major
Reporter: Ramesh Sivaraman Assignee: Ramesh Sivaraman
Resolution: Duplicate Votes: 0
Labels: debug, not-10.2

Issue Links:
Relates
relates to MDEV-25004 Missing row in FTS_DOC_ID_INDEX durin... Closed

 Description   

CREATE TABLE t0 (f0 TEXT,FULLTEXT KEY(f0)) ENGINE=InnoDB;
INSERT INTO t0 VALUES (0);
ALTER TABLE t0 ADD COLUMN s BIGINT UNSIGNED AS ROW START,ADD COLUMN e BIGINT UNSIGNED AS ROW END,ADD period FOR SYSTEM_TIME(s,e),ADD SYSTEM VERSIONING,ALGORITHM=copy;
DELETE FROM t0;

Leads to:

10.9.2 6ec17142dcfb1e9d9f41211ed1b6d82e062d1541 (Debug)

mysqld: /test/10.9_dbg/storage/innobase/row/row0mysql.cc:1730: dberr_t row_update_for_mysql(row_prebuilt_t*): Assertion `"unexpected error" == 0' failed.

10.9.2 6ec17142dcfb1e9d9f41211ed1b6d82e062d1541 (Debug)

Core was generated by `/test/MD280522-mariadb-10.9.2-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
[Current thread is 1 (Thread 0x14a9d8355700 (LWP 2575335))]
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x000014a9f0cd6859 in __GI_abort () at abort.c:79
#2  0x000014a9f0cd6729 in __assert_fail_base (fmt=0x14a9f0e6c588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x558f0b48336d "\"unexpected error\" == 0", file=0x558f0b4834c0 "/test/10.9_dbg/storage/innobase/row/row0mysql.cc", line=1730, function=<optimized out>) at assert.c:92
#3  0x000014a9f0ce7f36 in __GI___assert_fail (assertion=assertion@entry=0x558f0b48336d "\"unexpected error\" == 0", file=file@entry=0x558f0b4834c0 "/test/10.9_dbg/storage/innobase/row/row0mysql.cc", line=line@entry=1730, function=function@entry=0x558f0b484300 "dberr_t row_update_for_mysql(row_prebuilt_t*)") at assert.c:101
#4  0x0000558f0adb7ed5 in row_update_for_mysql (prebuilt=0x14a9a40297b0) at /test/10.9_dbg/storage/innobase/row/row0mysql.cc:1730
#5  0x0000558f0ac2a34e in ha_innobase::delete_row (this=0x14a9a40201c0, record=0x14a9a4037038 "\376\001") at /test/10.9_dbg/storage/innobase/handler/ha_innodb.cc:8693
#6  0x0000558f0a9264e5 in handler::ha_delete_row (this=0x14a9a40201c0, buf=0x14a9a4037038 "\376\001") at /test/10.9_dbg/sql/handler.cc:7683
#7  0x0000558f0a5df0f3 in TABLE::delete_row (this=0x14a9a4024048) at /test/10.9_dbg/sql/sql_delete.cc:281
#8  0x0000558f0a5dd419 in mysql_delete (thd=thd@entry=0x14a9a4000db8, table_list=0x14a9a4013ce0, conds=<optimized out>, order_list=order_list@entry=0x14a9a4005ac0, limit=18446744073709551615, options=<optimized out>, result=<optimized out>) at /test/10.9_dbg/sql/sql_delete.cc:842
#9  0x0000558f0a6390fb in mysql_execute_command (thd=thd@entry=0x14a9a4000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.9_dbg/sql/sql_limit.h:85
#10 0x0000558f0a624bca in mysql_parse (thd=thd@entry=0x14a9a4000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14a9d8354470) at /test/10.9_dbg/sql/sql_parse.cc:8036
#11 0x0000558f0a632198 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14a9a4000db8, packet=packet@entry=0x14a9a400b6c9 "DELETE FROM t0", packet_length=packet_length@entry=14, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_class.h:1364
#12 0x0000558f0a6348a0 in do_command (thd=0x14a9a4000db8, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_parse.cc:1407
#13 0x0000558f0a793d88 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x558f0e09fc58, put_in_cache=put_in_cache@entry=true) at /test/10.9_dbg/sql/sql_connect.cc:1418
#14 0x0000558f0a794291 in handle_one_connection (arg=0x558f0e09fc58) at /test/10.9_dbg/sql/sql_connect.cc:1312
#15 0x000014a9f11e5609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#16 0x000014a9f0dd3293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Bug confirmed present in:
MariaDB: 10.3.36 (dbg), 10.4.26 (dbg), 10.5.17 (dbg), 10.6.9 (dbg), 10.7.5 (dbg), 10.8.4 (dbg), 10.9.2 (dbg), 10.10.0 (dbg)

Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.2.44 (dbg), 10.2.44 (opt), 10.3.35 (opt), 10.4.25 (opt), 10.5.16 (opt), 10.6.8 (opt), 10.7.4 (opt), 10.8.3 (opt)



 Comments   
Comment by Marko Mäkelä [ 2022-06-21 ]

This could be a duplicate of MDEV-25004.

Comment by Marko Mäkelä [ 2023-05-24 ]

I can’t reproduce this with 10.6 b220bb756bdab3ef21b18213bb90b025c3bc65b3. Is this bug a duplicate of MDEV-25004?

Comment by Ramesh Sivaraman [ 2023-05-24 ]

marko Could not reproduced the issue on latest 1[01].x builds. Some stack messages seem to be similar to MDEV-25004. Closing this issue as a duplicate of MDEV-25004.

Generated at Thu Feb 08 10:04:27 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.