I use MySQL 5.6
I'm trying to make a test framework on PHPunit, I use two different db connections (from two different systems it has to be 2 different db connections not a choice). By default many testing frameworks enable transactions, so whatever you do in your tests would not really be saved in the DB.
Right now both connections can have this option separately, so even though they do not affect each other results at all they both work completely separately, meaning I insert a row in connectionA that won't exist on connectionB.
What I am trying to do is running all the queries from connectionA on connectionB and vice-vercia so I can get the same result in queries on both connections, I already could manage to get the queries from the other connection but when I try to run it on the other connection for some queries I get some lock errors eg:
SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction (SQL: INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('category_children', 'a:0:{}', 'yes'))
Is there any ways, I can totally disable locks in the transactions? or remove all the locks before running the query?
I tried:
UNLOCK TABLES
But it doesn't do anything helpful, I guess since there is no actual locking involved the transaction from connectionA does this (internal locking?) to the connectionB I suppose.
This is a testing framework so I can go crazy and do any hack in it, it's not a production software so anything comes to your mind even if it's totally a hack I'm okay with it and it's highly appreciated.