slave crash due to cascading foreign key constraint

Bug #1013978 reported by Seppo Jaakola
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Fix Released
High
Seppo Jaakola
5.5
Fix Released
High
Seppo Jaakola

Bug Description

120614 15:25:55 [ERROR] Slave SQL: Could not execute Delete_rows event on table pa.AreaType; Cannot delete or update a parent row: a foreign key constraint fails (`pa`.`Area`, CONSTRAINT `fk_Area_AreaType` FOREIGN KEY (`areaTypeId`) REFERENCES `AreaType` (`id`) ON UPDATE CASCADE), Error_code: 1451; handler error HA_ERR_ROW_IS_REFERENCED; the event's master log FIRST, end_log_pos 129, Error_code: 1451
120614 15:25:55 [Warning] WSREP: RBR event 2 Delete_rows apply warning: 152, 1925
120614 15:25:55 [ERROR] WSREP: Failed to apply trx: source: 938778e1-b61c-11e1-0800-00d9733f9bb3 version: 2 local: 0 state: CERTIFYING flags: 1 conn_id: 1673 trx_id: 17946 seqnos (l: 364, g: 1925, s: 1924, d: 1906, ts: 1339680355633397546)
120614 15:25:55 [ERROR] WSREP: Failed to apply app buffer: cæÙO, seqno: 1925, status: WSREP_FATAL

120614 15:28:23 [Warning] WSREP: Certification failed for TO isolated action: source: 938778e1-b61c-11e1-0800-00d9733f9bb3 version: 2 local: 0 state: MUST_ABORT flags: 65 conn_id: 1673 trx_id: -1 seqnos (l: 4, g: 1930, s: 1929, d: 1929, ts: 1339680357271361415)
120614 15:28:23 [Warning] WSREP: Certification failed for TO isolated action: source: 938778e1-b61c-11e1-0800-00d9733f9bb3 version: 2 local: 0 state: MUST_ABORT flags: 65 conn_id: 1673 trx_id: -1 seqnos (l: 6, g: 1932, s: 1931, d: 1931, ts: 1339680357309181941)
120614 15:28:23 [Warning] WSREP: Certification failed for TO isolated action: source: 938778e1-b61c-11e1-0800-00d9733f9bb3 version: 2 local: 0 state: MUST_ABORT flags: 65 conn_id: 1673 trx_id: -1 seqnos (l: 8, g: 1934, s: 1933, d: 1933, ts: 1339680357347609350)

Revision history for this message
Seppo Jaakola (seppo-jaakola) wrote :

An effective regression test has been implemented for this.
Bug will surface if parent table has non-unique key in the column which is referenced from the child table and slave node has configuration with parallel applying.

Revision history for this message
Seppo Jaakola (seppo-jaakola) wrote :

A fix has been implemented for this and is under testing now

Revision history for this message
Seppo Jaakola (seppo-jaakola) wrote :

The regression test has escalated to 3 separate scenarios. Fixes have been pushed to LP with:

http://bazaar.launchpad.net/~codership/codership-mysql/wsrep-5.5/revision/3760
http://bazaar.launchpad.net/~codership/codership-mysql/wsrep-5.5/revision/3762

One more push to be expected in near term

Revision history for this message
Seppo Jaakola (seppo-jaakola) wrote :

Probably last MySQL side fixes were pushed with: http://bazaar.launchpad.net/~codership/codership-mysql/wsrep-5.5/revision/3763
Regeession test phase E show still errors, and they will need Galera side fixes. This process will be tracked in Galera project.

Revision history for this message
Jay Janssen (jay-janssen) wrote :

Is there a bug open on the Galera project for the phase E fix?

Revision history for this message
Seppo Jaakola (seppo-jaakola) wrote :

The bug is fixed in our internal Galera repository. Here is corresponding bug tracker in LP: https://bugs.launchpad.net/galera/+bug/1036774

The fix will be present in next Galera 2.2 release build

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.