As far as I understand the global $wpdb object utilizes just a single MySQL connection under the hood (by default). Because the object is global every other plugin/theme/whatever seems to be using this connection.
My question is: Is it safe to use MySQL transactions with that or could other plugins/WordPress itself interfere with my transaction(s)?
To visualize how that could look like:
global $wpdb;
$wpdb->query('START TRANSACTION');
$wpdb->query(...);
$wpdb->query(...);
// ... and so on
if ( $condition ) {
$wpdb->query('COMMIT'); // commit all queries
} else {
$wpdb->query('ROLLBACK'); // rollback everything
}