开发者

Can I perform a transaction across two MySQL databases?

Can I do?

Start transaction;

insert into db1.table开发者_运维百科1 (field1) values (100),(100);

insert into db2.table2 (field2) values (100),(100);

commit;

Or will that not work?


Yes you can:

MySQL 5.0.3 and up provides server-side support for XA transactions. Currently, this support is available for the InnoDB storage engine. The MySQL XA implementation is based on the X/Open CAE document Distributed Transaction Processing: The XA Specification. This document is published by The Open Group and available at
http://www.opengroup.org/public/pubs/catalog/c193.htm. Ref: XA Transactions

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜