Started transaction may not be rollback or commit
I have found these related issues/pull requests
NO.
Description
https://github.com/launchbadge/sqlx/blob/bab1b022bd56a64f9a08b46b36b97c5cff19d77e/sqlx-core/src/transaction.rs#L105-L113
Although we have a Rollback defuse inside TransactionManager::begin e.g. for PG implementation, if the (future) drop happens between TransactionManager::begin and constructing the transaction struct, it will cause "there is already a transaction in progress" later.
Reproduction steps
As described above
SQLx version
0.8.6
Enabled SQLx features
pg
Database server and version
pg
Operating system
unrelated
Rust version
nightly
I'm trying to manage this transaction state outside, but was blocked because transaction_depth and queue_simple_query is internal state. Even if I can manage transaction_depth by myself, without queue_simple_query I cannot queue a rollback query without waiting on it.