Add tests for broken transaction logic when changing PDO
Fix broken transaction logic when PDO changes
Merge pull request #5944 from pinepain/4.2

[4.2] Fix for #5937 Connection::run breaks transaction logic when connection lost inside transaction.
Working on code formatting.
Merge branch '4.2'