Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
10.4(EOL), 10.5, 10.6, 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL), 11.4
-
None
Description
This looks like a major failure in replication. Please review and adjust prio as needed.
# Requires standard m/s setup. Tested with both ROW and MIXED. |
SET sql_mode='',enforce_storage_engine=MyISAM; |
CREATE TABLE t (c1 INT PRIMARY KEY, c2 INT, FOREIGN KEY(c2) REFERENCES t (c1)) ENGINE=foo; |
SHOW WARNINGS;
|
SHOW CREATE TABLE t; |
INSERT INTO t VALUES (1,2); |
Leads to:
11.4.0 8bf9f21855606ddeb0fe90fb1e70165adbec6746 (Optimized) |
2024-02-03 16:42:57 6 [ERROR] Slave SQL: Could not execute Write_rows_v1 event on table test.t; Cannot add or update a child row: a foreign key constraint fails (`test`.`t`, CONSTRAINT `t_ibfk_1` FOREIGN KEY (`c2`) REFERENCES `t` (`c1`)), Error_code: 1452; handler error HA_ERR_NO_REFERENCED_ROW; the event's master log binlog.000001, end_log_pos 0, Gtid 0-1-5, Internal MariaDB error code: 1452
|
2024-02-03 16:42:57 6 [Warning] Slave: Cannot add or update a child row: a foreign key constraint fails (`test`.`t`, CONSTRAINT `t_ibfk_1` FOREIGN KEY (`c2`) REFERENCES `t` (`c1`)) Error_code: 1452
|
2024-02-03 16:42:57 6 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'binlog.000001' position 1166; GTID position '0-1-4'
|
2024-02-03 16:42:57 6 [Note] Slave SQL thread exiting, replication stopped in log 'binlog.000001' at position 1166; GTID position '0-1-4', master: 127.0.0.1:10177
|
11.4.0 8bf9f21855606ddeb0fe90fb1e70165adbec6746 (Debug) |
2024-02-03 16:37:18 6 [ERROR] Slave SQL: Error 'Cannot add or update a child row: a foreign key constraint fails (`test`.`t`, CONSTRAINT `t_ibfk_1` FOREIGN KEY (`c2`) REFERENCES `t` (`c1`))' on query. Default database: 'test'. Query: 'INSERT INTO t VALUES (1,2)', Gtid 0-1-5, Internal MariaDB error code: 1452
|
2024-02-03 16:37:18 6 [Warning] Slave: Cannot add or update a child row: a foreign key constraint fails (`test`.`t`, CONSTRAINT `t_ibfk_1` FOREIGN KEY (`c2`) REFERENCES `t` (`c1`)) Error_code: 1452
|
2024-02-03 16:37:18 6 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'binlog.000001' position 1075; GTID position '0-1-4'
|