mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 00:03:03 +01:00
Improve performance a bit.
This commit is contained in:
parent
d7e85fa217
commit
6db9d419b3
@ -253,8 +253,11 @@ public:
|
||||
CheckoutLockGuard(Database* dbb, Firebird::Mutex& m)
|
||||
: mutex(m)
|
||||
{
|
||||
Checkout dcoHolder(dbb);
|
||||
mutex.enter();
|
||||
if (!mutex.tryEnter())
|
||||
{
|
||||
Checkout dcoHolder(dbb);
|
||||
mutex.enter();
|
||||
}
|
||||
}
|
||||
|
||||
~CheckoutLockGuard()
|
||||
|
@ -174,6 +174,9 @@ namespace
|
||||
|
||||
inline void validateHandle(thread_db* tdbb, Jrd::Attachment* const attachment)
|
||||
{
|
||||
if (attachment == tdbb->getAttachment())
|
||||
return;
|
||||
|
||||
if (!attachment->checkHandle() || !attachment->att_database->checkHandle())
|
||||
{
|
||||
status_exception::raise(Arg::Gds(isc_bad_db_handle));
|
||||
|
Loading…
Reference in New Issue
Block a user