QSqlDatabase::transaction and other open transaction, block or fail?
I am dealing with Sql Server and Oracle through Qt, when using QSqlDatabase::transaction()
on a database connection. When another user/connection has a transaction open on the same database does the transaction()
call block until the othe开发者_运维知识库r transaction is finished or fail ?
Transactions should only block each other if they are working on the same data (normally at the record level).
Generally they wait until the transactions locking those records is complete, and then they proceed. In some circumstances they can be programmed to error/fail if they have to wait for a lock.
精彩评论