Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.6
Description
--source include/have_innodb.inc
|
|
SET FOREIGN_KEY_CHECKS= OFF; |
CREATE TABLE t1 (id INT PRIMARY KEY, f INT, FOREIGN KEY (f) REFERENCES tx (x)) ENGINE=InnoDB; |
SET FOREIGN_KEY_CHECKS= ON; |
START TRANSACTION; |
INSERT IGNORE INTO t1 VALUES (1,11); |
REPLACE INTO t1 VALUES (1,12); |
|
# Cleanup
|
COMMIT; |
DROP TABLE t1; |
10.6 3f871b33 |
mariadbd: /data/src/10.6/storage/innobase/lock/lock0lock.cc:3633: void lock_table_x_unlock(dict_table_t*, trx_t*): Assertion `"lock not found" == 0' failed.
|
210126 21:26:52 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007f6cdf0d0f36 in __GI___assert_fail (assertion=0x55a5a4893d30 "\"lock not found\" == 0", file=0x55a5a4891ed8 "/data/src/10.6/storage/innobase/lock/lock0lock.cc", line=3633, function=0x55a5a4893d00 "void lock_table_x_unlock(dict_table_t*, trx_t*)") at assert.c:101
|
#8 0x000055a5a4063bd0 in lock_table_x_unlock (table=0x7f6cac040db8, trx=0x7f6cd9723148) at /data/src/10.6/storage/innobase/lock/lock0lock.cc:3633
|
#9 0x000055a5a42065bd in trx_t::rollback_low (this=0x7f6cd9723148, savept=0x7f6cd84776c0) at /data/src/10.6/storage/innobase/trx/trx0roll.cc:142
|
#10 0x000055a5a4202c48 in trx_t::rollback (this=0x7f6cd9723148, savept=0x7f6cd84776c0) at /data/src/10.6/storage/innobase/trx/trx0roll.cc:170
|
#11 0x000055a5a4161152 in row_mysql_handle_errors (new_err=0x7f6cd84776b8, trx=0x7f6cd9723148, thr=0x7f6cac1adf40, savept=0x7f6cd84776c0) at /data/src/10.6/storage/innobase/row/row0mysql.cc:731
|
#12 0x000055a5a4162d9e in row_insert_for_mysql (mysql_rec=0x7f6cac2246e8 "\375\001", prebuilt=0x7f6cac1ad7b8, ins_mode=ROW_INS_NORMAL) at /data/src/10.6/storage/innobase/row/row0mysql.cc:1440
|
#13 0x000055a5a3fb476a in ha_innobase::write_row (this=0x7f6cac1acaf0, record=0x7f6cac2246e8 "\375\001") at /data/src/10.6/storage/innobase/handler/ha_innodb.cc:7338
|
#14 0x000055a5a3b4a093 in handler::ha_write_row (this=0x7f6cac1acaf0, buf=0x7f6cac2246e8 "\375\001") at /data/src/10.6/sql/handler.cc:7151
|
#15 0x000055a5a377cb15 in write_record (thd=0x7f6cac000db8, table=0x7f6cac226278, info=0x7f6cd8477c40, sink=0x0) at /data/src/10.6/sql/sql_insert.cc:1784
|
#16 0x000055a5a377ab19 in mysql_insert (thd=0x7f6cac000db8, table_list=0x7f6cac013db0, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_REPLACE, ignore=false, result=0x0) at /data/src/10.6/sql/sql_insert.cc:1099
|
#17 0x000055a5a37cdb22 in mysql_execute_command (thd=0x7f6cac000db8) at /data/src/10.6/sql/sql_parse.cc:4448
|
#18 0x000055a5a37d97cc in mysql_parse (thd=0x7f6cac000db8, rawbuf=0x7f6cac013cd0 "REPLACE INTO t1 VALUES (1,12)", length=29, parser_state=0x7f6cd8478510) at /data/src/10.6/sql/sql_parse.cc:7901
|
#19 0x000055a5a37c5d83 in dispatch_command (command=COM_QUERY, thd=0x7f6cac000db8, packet=0x7f6cac008e49 "REPLACE INTO t1 VALUES (1,12)", packet_length=29) at /data/src/10.6/sql/sql_parse.cc:1833
|
#20 0x000055a5a37c479a in do_command (thd=0x7f6cac000db8) at /data/src/10.6/sql/sql_parse.cc:1365
|
#21 0x000055a5a3971e7b in do_handle_one_connection (connect=0x55a5a6c651c8, put_in_cache=true) at /data/src/10.6/sql/sql_connect.cc:1410
|
#22 0x000055a5a3971bde in handle_one_connection (arg=0x55a5a6d4a418) at /data/src/10.6/sql/sql_connect.cc:1312
|
#23 0x000055a5a3eceb03 in pfs_spawn_thread (arg=0x55a5a6c64e08) at /data/src/10.6/storage/perfschema/pfs.cc:2201
|
#24 0x00007f6cdf5e8609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#25 0x00007f6cdf1bc293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
On 10.5 REPLACE fails with ER_NO_REFERENCED_ROW_2 as it probably should:
10.5 927a8823 |
mysqltest: At line 8: query 'REPLACE INTO t1 VALUES (1,12)' failed: 1452: Cannot add or update a child row: a foreign key constraint fails (`test`.`t1`, CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`f`) REFERENCES `tx` (`x`)) |
Attachments
Issue Links
- is caused by
-
MDEV-515 innodb bulk insert
- Closed
- is duplicated by
-
MDEV-24716 Assertion `thr->graph->trx->id == trx_read_trx_id( static_cast<const byte*>( trx_id->data)) || static_cast<ins_node_t*>( thr->run_node)->bulk_insert' failed in btr_cur_optimistic_insert
- Closed
- relates to
-
MDEV-24859 Assertion `static_cast<ins_node_t*>(thr->run_node)->bulk_insert' failed in trx_undo_report_row_operation
- Closed