prisma / tiberius

TDS 7.2+ (Microsoft SQL Server) driver for Rust
Apache License 2.0
325 stars 121 forks source link

Read token stream completely, even on error #245

Closed SevInf closed 2 years ago

SevInf commented 2 years ago

In some cases, ENVCHANGE token can come after error token: for example, on deadlocked transactions, deadlock victim receives error token, followed by ENVCHANGE(TransactionRollback) message. If we stop on the first error, we never get to rollback and won't reset transaction desctiptor, causing next request on the same connection to fail.

pimeys commented 2 years ago

Closing in favor of: https://github.com/prisma/tiberius/pull/247