tquery now fails on nonts drivers

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401107
This commit is contained in:
David Anderson 2007-07-13 20:27:21 +00:00
parent c7c7fed3d5
commit d4f2d30332

View File

@ -652,6 +652,11 @@ static cell_t SQL_TQuery(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Invalid database Handle %x (error: %d)", params[1], err); return pContext->ThrowNativeError("Invalid database Handle %x (error: %d)", params[1], err);
} }
if (!db->GetDriver()->IsThreadSafe())
{
return pContext->ThrowNativeError("Driver \"%s\" is not thread safe!", db->GetDriver()->GetIdentifier());
}
IPluginFunction *pf = pContext->GetFunctionById(params[2]); IPluginFunction *pf = pContext->GetFunctionById(params[2]);
if (!pf) if (!pf)
{ {