Hi. I want to use XA transactions. Background: 2 mysql servers, PHP code which open XA transaction, end it, prepare and commit:
It work fine when all is fine.
But when i stop one server between PREPARE and COMMIT transactions become partically applied. On working server all changes are done, server wich was down has no changes and "xa recover" out empty set.
1> XA BEGIN 123
2> XA BEGIN 123
1> INSERT INTO some_table ....
2> INSERT INTO some_table ....
1> XA END 123
2> XA END 123
1> XA PREPARE 123
2> XA PREPARE 123
// Stop server 2
1> XA COMMIT 123
2> XA COMMIT 123 // ERROR: MySQL server has gone away
Server 1 containt row, server 2 does not.
You can find code here:
http://pastebin.com/rkv9N7SQ