8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 14:03:07 +01:00

Fixed CORE-3650 - Recreation of collation leads to FB "death".

This commit is contained in:
asfernandes 2011-11-05 20:51:46 +00:00
parent 7c124b4487
commit a460334c67

View File

@ -473,11 +473,13 @@ void CharSetContainer::unloadCollation(thread_db* tdbb, USHORT tt_id)
}
fb_assert(charset_collations[id]->existenceLock);
LCK_convert(tdbb, charset_collations[id]->existenceLock, LCK_EX, LCK_WAIT);
charset_collations[id]->obsolete = true;
LCK_release(tdbb, charset_collations[id]->existenceLock);
if (!charset_collations[id]->obsolete)
{
LCK_convert(tdbb, charset_collations[id]->existenceLock, LCK_EX, LCK_WAIT);
charset_collations[id]->obsolete = true;
LCK_release(tdbb, charset_collations[id]->existenceLock);
}
}
else
{
@ -1394,8 +1396,7 @@ static int blocking_ast_collation(void* ast_object)
AsyncContextHolder tdbb(dbb, att);
tt->obsolete = true;
if (!tt->useCount)
LCK_release(tdbb, tt->existenceLock);
LCK_release(tdbb, tt->existenceLock);
}
catch (const Firebird::Exception&)
{} // no-op