8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 09:20:39 +01:00

Better constant names: avoid FB, enclosing class (double prefix) or wrong prefixes.

Left some TODOs in FirebirdInterface.idl and utilities/ntrace/TracePluginImpl.cpp related to trace.
This commit is contained in:
asfernandes 2015-02-17 14:56:59 +00:00
parent ecb5a4c057
commit 3c967bbe71
79 changed files with 764 additions and 761 deletions

View File

@ -67,7 +67,7 @@ public:
if (tra)
{
tra->rollback(status);
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
{
print("rollback");
tra->release();
@ -76,7 +76,7 @@ public:
if (att)
{
att->detach(status);
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
{
print("detach");
att->release();
@ -98,19 +98,19 @@ public:
p = master->getDispatcher();
p->setDbCryptCallback(status, &key);
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
throw "setDbCryptCallback";
char s[256];
sprintf(s, "localhost:%s", dbName);
att = p->attachDatabase(status, s, 0, NULL);
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
throw "attachDatabase";
if (a != NONE)
{
tra = att->startTransaction(status, 0, NULL);
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
throw "startTransaction";
}
@ -118,20 +118,20 @@ public:
{
att->execute(status, tra, 0,
"ALTER DATABASE ENCRYPT WITH \"DbCrypt_example\"", 3, NULL, NULL, NULL, NULL);
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
throw "execute";
}
if (a == DEC)
{
att->execute(status, tra, 0, "ALTER DATABASE DECRYPT", 3, NULL, NULL, NULL, NULL);
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
throw "execute";
}
if (tra)
{
tra->commit(status);
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
throw "commit";
tra = NULL;
}
@ -140,7 +140,7 @@ public:
getchar();
att->detach(status);
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
throw "detach";
att = NULL;

View File

@ -196,12 +196,12 @@ int CryptKeyHolder::keyCallback(CheckStatusWrapper* status, ICryptKeyCallback* c
return 1;
IConfig* def = config->getDefaultConfig(status);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return 1;
IConfigEntry* confEntry = def->find(status, "Auto");
def->release();
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return 1;
if (confEntry)
@ -269,6 +269,6 @@ extern "C" void FB_PLUGIN_ENTRY_POINT(IMaster* m)
pluginManager = master->getPluginManager();
module.registerMe();
pluginManager->registerPluginFactory(IPluginManager::KeyHolder, "CryptKeyHolder_example",
pluginManager->registerPluginFactory(IPluginManager::TYPE_KEY_HOLDER, "CryptKeyHolder_example",
&factory);
}

View File

@ -194,11 +194,11 @@ void DbCrypt::setKey(CheckStatusWrapper* status, unsigned int length, IKeyHolder
return;
IConfig* def = config->getDefaultConfig(status);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return;
IConfigEntry* confEntry = def->find(status, "Auto");
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
def->release();
return;
@ -231,7 +231,7 @@ void DbCrypt::setKey(CheckStatusWrapper* status, unsigned int length, IKeyHolder
for (unsigned n = 0; n < length; ++n)
{
ICryptKeyCallback* callback = sources[n]->keyHandle(status, "sample");
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return;
if (callback && callback->callback(0, NULL, 1, &key) == 1)
@ -277,5 +277,5 @@ extern "C" void FB_PLUGIN_ENTRY_POINT(IMaster* m)
pluginManager = master->getPluginManager();
module.registerMe();
pluginManager->registerPluginFactory(IPluginManager::DbCrypt, "DbCrypt_example", &factory);
pluginManager->registerPluginFactory(IPluginManager::TYPE_DB_CRYPT, "DbCrypt_example", &factory);
}

View File

@ -46,8 +46,8 @@ extern "C" void FB_PLUGIN_ENTRY_POINT(Firebird::IMaster* master)
Firebird::PluginManagerInterfacePtr iPlugin;
iPlugin->registerPluginFactory(Firebird::IPluginManager::AuthClient, name, &clientFactory);
iPlugin->registerPluginFactory(Firebird::IPluginManager::AuthServer, name, &serverFactory);
iPlugin->registerPluginFactory(Firebird::IPluginManager::TYPE_AUTH_CLIENT, name, &clientFactory);
iPlugin->registerPluginFactory(Firebird::IPluginManager::TYPE_AUTH_SERVER, name, &serverFactory);
}
@ -84,7 +84,7 @@ int DebugServer::authenticate(Firebird::CheckStatusWrapper* status, Firebird::IS
fprintf(stderr, "DebugServer::authenticate1: %s\n", str.c_str());
#endif
sb->putData(status, str.length(), str.c_str());
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
return AUTH_FAILED;
}
@ -165,7 +165,7 @@ int DebugClient::authenticate(Firebird::CheckStatusWrapper* status, Firebird::IC
fprintf(stderr, "DebugClient::authenticate: sending %s\n", str.c_str());
#endif
cb->putData(status, str.length(), str.c_str());
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
return AUTH_FAILED;
}

View File

@ -28,7 +28,7 @@ public:
{
Firebird::LocalStatus st;
Firebird::IMessageMetadata* m = out ? stmt->getOutputMetadata(&st) : stmt->getInputMetadata(&st);
if (st.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (st.getState() & Firebird::IStatus::STATE_ERRORS)
{
Firebird::status_exception::raise(&st);
}
@ -175,7 +175,7 @@ public:
static void check(Firebird::IStatus* status)
{
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
#ifdef INTERNAL_FIREBIRD
Firebird::status_exception::raise(status);

View File

@ -80,7 +80,7 @@ int SrpClient::authenticate(CheckStatusWrapper* status, IClientBlock* cb)
client->genClientKey(data);
dumpIt("Clnt: clientPubKey", data);
cb->putData(status, data.length(), data.begin());
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
return AUTH_FAILED;
return AUTH_MORE_DATA;
}
@ -132,19 +132,19 @@ int SrpClient::authenticate(CheckStatusWrapper* status, IClientBlock* cb)
cProof.getText(data);
cb->putData(status, data.length(), data.c_str());
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
{
return AUTH_FAILED;
}
// output the key
ICryptKey* cKey = cb->newKey(status);
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
{
return AUTH_FAILED;
}
cKey->setSymmetric(status, "Symmetric", sessionKey.getCount(), sessionKey.begin());
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
{
return AUTH_FAILED;
}
@ -175,7 +175,7 @@ namespace
void registerSrpClient(IPluginManager* iPlugin)
{
iPlugin->registerPluginFactory(IPluginManager::AuthClient, RemotePassword::plugName, &factory);
iPlugin->registerPluginFactory(IPluginManager::TYPE_AUTH_CLIENT, RemotePassword::plugName, &factory);
}
} // namespace Auth

View File

@ -164,7 +164,7 @@ private:
selGrantor.c_str(), SQL_DIALECT_V6, NULL, NULL, out.getMetadata(), NULL, 0);
check(&statusWrapper);
bool hasGrant = curs->fetchNext(&statusWrapper, out.getBuffer()) == Firebird::IStatus::FB_OK;
bool hasGrant = curs->fetchNext(&statusWrapper, out.getBuffer()) == Firebird::IStatus::OK;
curs->close(&statusWrapper);
check(&statusWrapper);
@ -301,7 +301,7 @@ public:
for (unsigned repeat = 0; ; ++repeat)
{
stmt = att->prepare(status, tra, 0, insert, SQL_DIALECT_V6, Firebird::IStatement::PREPARE_PREFETCH_METADATA);
if (!(status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status->getState() & Firebird::IStatus::STATE_ERRORS))
{
break;
}
@ -566,7 +566,7 @@ public:
(par ? par->getBuffer() : NULL), om, 0);
check(status);
while (rs->fetchNext(status, di.getBuffer()) == Firebird::IStatus::FB_OK)
while (rs->fetchNext(status, di.getBuffer()) == Firebird::IStatus::OK)
{
listField(user->userName(), login);
listField(user->firstName(), first);
@ -617,7 +617,7 @@ public:
if (tra)
{
tra->commit(status);
if (!(status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status->getState() & Firebird::IStatus::STATE_ERRORS))
{
tra = NULL;
}
@ -629,7 +629,7 @@ public:
if (tra)
{
tra->rollback(status);
if (!(status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status->getState() & Firebird::IStatus::STATE_ERRORS))
{
tra = NULL;
}
@ -646,7 +646,7 @@ public:
if (att)
{
att->detach(&statusWrapper);
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
{
att = NULL;
}
@ -695,7 +695,7 @@ private:
static void check(Firebird::CheckStatusWrapper* status)
{
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
checkStatusVectorForMissingTable(status->getErrors());
Firebird::status_exception::raise(status);
@ -853,7 +853,7 @@ private:
{
int cc = blob->getSegment(&statusWrapper, sizeof(segbuf), segbuf, &len);
check(&statusWrapper);
if (cc == Firebird::IStatus::FB_NO_DATA)
if (cc == Firebird::IStatus::NO_DATA)
break;
s.append(segbuf, len);
}
@ -908,6 +908,6 @@ static Firebird::SimpleFactory<Auth::SrpManagement> factory;
extern "C" void FB_EXPORTED FB_PLUGIN_ENTRY_POINT(Firebird::IMaster* master)
{
Firebird::CachedMasterInterface::set(master);
Firebird::PluginManagerInterfacePtr()->registerPluginFactory(Firebird::IPluginManager::AuthUserManagement, Auth::RemotePassword::plugName, &Auth::factory);
Firebird::PluginManagerInterfacePtr()->registerPluginFactory(Firebird::IPluginManager::TYPE_AUTH_USER_MANAGEMENT, Auth::RemotePassword::plugName, &Auth::factory);
Firebird::getUnloadDetector()->registerMe();
}

View File

@ -154,7 +154,7 @@ int SrpServer::authenticate(CheckStatusWrapper* status, IServerBlock* sb, IWrite
const char* sql =
"SELECT PLG$VERIFIER, PLG$SALT FROM PLG$SRP WHERE PLG$USER_NAME = ? AND PLG$ACTIVE";
stmt = att->prepare(status, tra, 0, sql, 3, IStatement::PREPARE_PREFETCH_METADATA);
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
{
checkStatusVectorForMissingTable(status->getErrors());
status_exception::raise(status);
@ -223,7 +223,7 @@ int SrpServer::authenticate(CheckStatusWrapper* status, IServerBlock* sb, IWrite
dumpIt("Srv: serverPubKey", serverPubKey);
dumpBin("Srv: data", data);
sb->putData(status, data.length(), data.c_str());
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
{
return AUTH_FAILED;
}
@ -233,12 +233,12 @@ int SrpServer::authenticate(CheckStatusWrapper* status, IServerBlock* sb, IWrite
// output the key
ICryptKey* cKey = sb->newKey(status);
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
{
return AUTH_FAILED;
}
cKey->setSymmetric(status, "Symmetric", sessionKey.getCount(), sessionKey.begin());
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
{
return AUTH_FAILED;
}
@ -256,12 +256,12 @@ int SrpServer::authenticate(CheckStatusWrapper* status, IServerBlock* sb, IWrite
if (clientProof == serverProof)
{
writerInterface->add(status, account.c_str());
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
{
return AUTH_FAILED;
}
writerInterface->setDb(status, secDbName);
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
{
return AUTH_FAILED;
}
@ -294,7 +294,7 @@ namespace
void registerSrpServer(IPluginManager* iPlugin)
{
iPlugin->registerPluginFactory(IPluginManager::AuthServer, RemotePassword::plugName, &factory);
iPlugin->registerPluginFactory(IPluginManager::TYPE_AUTH_SERVER, RemotePassword::plugName, &factory);
}
} // namespace Auth

View File

@ -46,7 +46,7 @@ int SecurityDatabaseClient::authenticate(Firebird::CheckStatusWrapper* status, F
TEXT pwt[MAX_LEGACY_PASSWORD_LENGTH + 2];
ENC_crypt(pwt, sizeof pwt, cb->getPassword(), LEGACY_PASSWORD_SALT);
cb->putData(status, static_cast<unsigned>(strlen(&pwt[2])), &pwt[2]);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
return AUTH_FAILED;
}
@ -70,7 +70,7 @@ namespace {
void registerLegacyClient(Firebird::IPluginManager* iPlugin)
{
iPlugin->registerPluginFactory(Firebird::IPluginManager::AuthClient, "Legacy_Auth", &factory);
iPlugin->registerPluginFactory(Firebird::IPluginManager::TYPE_AUTH_CLIENT, "Legacy_Auth", &factory);
}
} // namespace Auth

View File

@ -765,6 +765,6 @@ static Firebird::SimpleFactory<Auth::SecurityDatabaseManagement> factory;
extern "C" void FB_PLUGIN_ENTRY_POINT(Firebird::IMaster* master)
{
Firebird::CachedMasterInterface::set(master);
Firebird::PluginManagerInterfacePtr()->registerPluginFactory(Firebird::IPluginManager::AuthUserManagement, "Legacy_UserManager", &factory);
Firebird::PluginManagerInterfacePtr()->registerPluginFactory(Firebird::IPluginManager::TYPE_AUTH_USER_MANAGEMENT, "Legacy_UserManager", &factory);
Firebird::getUnloadDetector()->registerMe();
}

View File

@ -528,7 +528,7 @@ int SecurityDatabaseServer::authenticate(Firebird::CheckStatusWrapper* status, I
#ifdef USE_ATT_RQ_CACHE
LocalStatus s;
TimerInterfacePtr()->start(&s, instance, 10 * 1000 * 1000);
if (s.getStatus() & IStatus::FB_HAS_ERRORS)
if (s.getState() & IStatus::STATE_ERRORS)
instance->handler();
#else
instance->handler();
@ -563,7 +563,7 @@ namespace {
void registerLegacyServer(Firebird::IPluginManager* iPlugin)
{
iPlugin->registerPluginFactory(Firebird::IPluginManager::AuthServer, "Legacy_Auth", &factory);
iPlugin->registerPluginFactory(Firebird::IPluginManager::TYPE_AUTH_SERVER, "Legacy_Auth", &factory);
}
} // namespace Auth

View File

@ -440,12 +440,12 @@ int WinSspiClient::release()
void registerTrustedClient(Firebird::IPluginManager* iPlugin)
{
iPlugin->registerPluginFactory(Firebird::IPluginManager::AuthClient, plugName, &clientFactory);
iPlugin->registerPluginFactory(Firebird::IPluginManager::TYPE_AUTH_CLIENT, plugName, &clientFactory);
}
void registerTrustedServer(Firebird::IPluginManager* iPlugin)
{
iPlugin->registerPluginFactory(Firebird::IPluginManager::AuthServer, plugName, &serverFactory);
iPlugin->registerPluginFactory(Firebird::IPluginManager::TYPE_AUTH_SERVER, plugName, &serverFactory);
}
} // namespace Auth

View File

@ -163,7 +163,7 @@ void IntlParametersBlock::processParametersBlock(ProcessString* processString, C
{
LocalStatus l;
st.stuffException(&l);
if ((l.getStatus() & IStatus::FB_HAS_ERRORS) && (l.getErrors()[1] == isc_bad_conn_str) && tagName)
if ((l.getState() & IStatus::STATE_ERRORS) && (l.getErrors()[1] == isc_bad_conn_str) && tagName)
{
Arg::Gds newErrors(isc_random);
string message("Bad international character in tag ");

View File

@ -77,10 +77,10 @@ StatusVector::ImplStatusVector::ImplStatusVector(const IStatus* s) throw() : Bas
clear();
if (s->getStatus() & IStatus::FB_HAS_ERRORS)
if (s->getState() & IStatus::STATE_ERRORS)
append(s->getErrors(), FB_NELEM(m_status_vector) - 1);
if (s->getStatus() & IStatus::FB_HAS_WARNINGS)
if (s->getState() & IStatus::STATE_WARNINGS)
append(s->getWarnings(), FB_NELEM(m_status_vector) - 1);
}

View File

@ -77,10 +77,10 @@ public:
return warnings.get();
}
unsigned getStatus() const
unsigned getState() const
{
return (errors.vector[1] ? IStatus::FB_HAS_ERRORS : 0) |
(warnings.vector[1] ? IStatus::FB_HAS_WARNINGS : 0);
return (errors.vector[1] ? IStatus::STATE_ERRORS : 0) |
(warnings.vector[1] ? IStatus::STATE_WARNINGS : 0);
}
IStatus* clone() const

View File

@ -335,7 +335,7 @@ static void setAttr(CheckStatusWrapper* status, Auth::UserData* u)
setAttr(attr, "Uid", &u->u);
setAttr(attr, "Gid", &u->g);
u->attributes()->set(status, attr.c_str());
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
return;
u->attributes()->setEntered(status, attr.hasData());
}

View File

@ -322,7 +322,7 @@ UnloadDetectorHelper* getUnloadDetector();
// Generic status checker
inline void check(IStatus* status)
{
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
{
status_exception::raise(status);
}

View File

@ -385,7 +385,7 @@ int fb_msg_format(void* handle, USHORT facility, USHORT number, unsigned int bsi
else if (n == -2)
{
s += "message file ";
s += fb_utils::getPrefix(Firebird::IConfigManager::FB_DIR_MSG, MSG_FILE).ToString();
s += fb_utils::getPrefix(Firebird::IConfigManager::DIR_MSG, MSG_FILE).ToString();
s += " not found";
}
else

View File

@ -51,7 +51,7 @@ public:
{
try
{
ConfigFile file(fb_utils::getPrefix(Firebird::IConfigManager::FB_DIR_CONF, CONFIG_FILE),
ConfigFile file(fb_utils::getPrefix(Firebird::IConfigManager::DIR_CONF, CONFIG_FILE),
ConfigFile::ERROR_WHEN_MISS);
defaultConfig = new Config(file);
}
@ -692,19 +692,19 @@ const char* Config::getPlugins(unsigned int type) const
{
switch (type)
{
case Firebird::IPluginManager::Provider:
case Firebird::IPluginManager::TYPE_PROVIDER:
return (const char*) values[KEY_PLUG_PROVIDERS];
case Firebird::IPluginManager::AuthServer:
case Firebird::IPluginManager::TYPE_AUTH_SERVER:
return (const char*) values[KEY_PLUG_AUTH_SERVER];
case Firebird::IPluginManager::AuthClient:
case Firebird::IPluginManager::TYPE_AUTH_CLIENT:
return (const char*) values[KEY_PLUG_AUTH_CLIENT];
case Firebird::IPluginManager::AuthUserManagement:
case Firebird::IPluginManager::TYPE_AUTH_USER_MANAGEMENT:
return (const char*) values[KEY_PLUG_AUTH_MANAGE];
case Firebird::IPluginManager::Trace:
case Firebird::IPluginManager::TYPE_TRACE:
return (const char*) values[KEY_PLUG_TRACE];
case Firebird::IPluginManager::WireCrypt:
case Firebird::IPluginManager::TYPE_WIRE_CRYPT:
return (const char*) values[KEY_PLUG_WIRE_CRYPT];
case Firebird::IPluginManager::KeyHolder:
case Firebird::IPluginManager::TYPE_KEY_HOLDER:
return (const char*) values[KEY_PLUG_KEY_HOLDER];
}

View File

@ -503,17 +503,17 @@ bool ConfigFile::substituteStandardDir(const String& from, String& to) const
unsigned code;
const char* name;
} dirs[] = {
#define NMDIR(a) {Firebird::IConfigManager::a, #a},
NMDIR(FB_DIR_CONF)
NMDIR(FB_DIR_SECDB)
NMDIR(FB_DIR_PLUGINS)
NMDIR(FB_DIR_UDF)
NMDIR(FB_DIR_SAMPLE)
NMDIR(FB_DIR_SAMPLEDB)
NMDIR(FB_DIR_INTL)
NMDIR(FB_DIR_MSG)
#define NMDIR(a) {Firebird::IConfigManager::a, "FB_"#a},
NMDIR(DIR_CONF)
NMDIR(DIR_SECDB)
NMDIR(DIR_PLUGINS)
NMDIR(DIR_UDF)
NMDIR(DIR_SAMPLE)
NMDIR(DIR_SAMPLEDB)
NMDIR(DIR_INTL)
NMDIR(DIR_MSG)
#undef NMDIR
{Firebird::IConfigManager::FB_DIRCOUNT, NULL}
{Firebird::IConfigManager::DIR_COUNT, NULL}
};
for (const Dir* d = dirs; d->name; ++d)

View File

@ -260,7 +260,7 @@ namespace
{
public:
explicit AliasesConf(MemoryPool& p)
: ConfigCache(p, fb_utils::getPrefix(Firebird::IConfigManager::FB_DIR_CONF, ALIAS_FILE)),
: ConfigCache(p, fb_utils::getPrefix(Firebird::IConfigManager::DIR_CONF, ALIAS_FILE)),
databases(getPool()), aliases(getPool())
#ifdef HAVE_ID_BY_NAME
, ids(getPool())

View File

@ -201,7 +201,7 @@ ModuleLoader::Module* ModuleLoader::loadModule(const PathName& modPath)
if (PathUtils::isRelative(modPath))
{
MasterInterfacePtr master;
const char* baseDir = master->getConfigManager()->getDirectory(IConfigManager::FB_DIR_BIN);
const char* baseDir = master->getConfigManager()->getDirectory(IConfigManager::DIR_BIN);
PathName fullName;
PathUtils::concatPath(fullName, baseDir, modPath);

View File

@ -42,7 +42,7 @@ void raise()
namespace Auth {
Get::Get(Config* firebirdConf)
: GetPlugins<Firebird::IManagement>(IPluginManager::AuthUserManagement, firebirdConf)
: GetPlugins<Firebird::IManagement>(IPluginManager::TYPE_AUTH_USER_MANAGEMENT, firebirdConf)
{
if (!hasData())
{
@ -51,7 +51,7 @@ Get::Get(Config* firebirdConf)
}
Get::Get(Config* firebirdConf, const char* plugName)
: GetPlugins<Firebird::IManagement>(IPluginManager::AuthUserManagement, firebirdConf, plugName)
: GetPlugins<Firebird::IManagement>(IPluginManager::TYPE_AUTH_USER_MANAGEMENT, firebirdConf, plugName)
{
if (!hasData())
{

View File

@ -1144,7 +1144,7 @@ UnicodeUtil::ConversionICU& UnicodeUtil::getConversionICU()
}
}
if (lastError.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (lastError.getState() & Firebird::IStatus::STATE_ERRORS)
{
(Arg::Gds(isc_random) << "Could not find acceptable ICU library"
<< Arg::StatusVector(lastError.getErrors())).raise();

View File

@ -1012,13 +1012,13 @@ Firebird::PathName getPrefix(unsigned int prefType, const char* name)
FB_GUARDDIR, FB_PLUGDIR
};
fb_assert(FB_NELEM(configDir) == Firebird::IConfigManager::FB_DIRCOUNT);
fb_assert(prefType < Firebird::IConfigManager::FB_DIRCOUNT);
fb_assert(FB_NELEM(configDir) == Firebird::IConfigManager::DIR_COUNT);
fb_assert(prefType < Firebird::IConfigManager::DIR_COUNT);
if (! bootBuild())
{
if (prefType != Firebird::IConfigManager::FB_DIR_CONF &&
prefType != Firebird::IConfigManager::FB_DIR_MSG &&
if (prefType != Firebird::IConfigManager::DIR_CONF &&
prefType != Firebird::IConfigManager::DIR_MSG &&
configDir[prefType][0])
{
// Value is set explicitly and is not environment overridable
@ -1029,8 +1029,8 @@ Firebird::PathName getPrefix(unsigned int prefType, const char* name)
switch(prefType)
{
case Firebird::IConfigManager::FB_DIR_BIN:
case Firebird::IConfigManager::FB_DIR_SBIN:
case Firebird::IConfigManager::DIR_BIN:
case Firebird::IConfigManager::DIR_SBIN:
#ifdef WIN_NT
s = "";
#else
@ -1038,14 +1038,14 @@ Firebird::PathName getPrefix(unsigned int prefType, const char* name)
#endif
break;
case Firebird::IConfigManager::FB_DIR_CONF:
case Firebird::IConfigManager::FB_DIR_LOG:
case Firebird::IConfigManager::FB_DIR_GUARD:
case Firebird::IConfigManager::FB_DIR_SECDB:
case Firebird::IConfigManager::DIR_CONF:
case Firebird::IConfigManager::DIR_LOG:
case Firebird::IConfigManager::DIR_GUARD:
case Firebird::IConfigManager::DIR_SECDB:
s = "";
break;
case Firebird::IConfigManager::FB_DIR_LIB:
case Firebird::IConfigManager::DIR_LIB:
#ifdef WIN_NT
s = "";
#else
@ -1053,43 +1053,43 @@ Firebird::PathName getPrefix(unsigned int prefType, const char* name)
#endif
break;
case Firebird::IConfigManager::FB_DIR_PLUGINS:
case Firebird::IConfigManager::DIR_PLUGINS:
s = "plugins";
break;
case Firebird::IConfigManager::FB_DIR_INC:
case Firebird::IConfigManager::DIR_INC:
s = "include";
break;
case Firebird::IConfigManager::FB_DIR_DOC:
case Firebird::IConfigManager::DIR_DOC:
s = "doc";
break;
case Firebird::IConfigManager::FB_DIR_UDF:
case Firebird::IConfigManager::DIR_UDF:
s = "UDF";
break;
case Firebird::IConfigManager::FB_DIR_SAMPLE:
case Firebird::IConfigManager::DIR_SAMPLE:
s = "examples";
break;
case Firebird::IConfigManager::FB_DIR_SAMPLEDB:
case Firebird::IConfigManager::DIR_SAMPLEDB:
s = "examples/empbuild";
break;
case Firebird::IConfigManager::FB_DIR_HELP:
case Firebird::IConfigManager::DIR_HELP:
s = "help";
break;
case Firebird::IConfigManager::FB_DIR_INTL:
case Firebird::IConfigManager::DIR_INTL:
s = "intl";
break;
case Firebird::IConfigManager::FB_DIR_MISC:
case Firebird::IConfigManager::DIR_MISC:
s = "misc";
break;
case Firebird::IConfigManager::FB_DIR_MSG:
case Firebird::IConfigManager::DIR_MSG:
gds__prefix_msg(tmp, name);
return tmp;
@ -1137,9 +1137,9 @@ unsigned int mergeStatus(ISC_STATUS* to, unsigned int space,
{
const ISC_STATUS* s;
unsigned int copied = 0;
int state = from->getStatus();
int state = from->getState();
if (state & Firebird::IStatus::FB_HAS_ERRORS)
if (state & Firebird::IStatus::STATE_ERRORS)
{
s = from->getErrors();
copied = copyStatus(to, space, s, statusLength(s));
@ -1148,7 +1148,7 @@ unsigned int mergeStatus(ISC_STATUS* to, unsigned int space,
space -= copied;
}
if (state & Firebird::IStatus::FB_HAS_WARNINGS)
if (state & Firebird::IStatus::STATE_WARNINGS)
{
if (!copied)
{

View File

@ -9841,7 +9841,7 @@ void MappingNode::runInSecurityDb(SecDbContext* secDbContext)
secDbContext->att->execute(&statusWrapper, secDbContext->tra, 0, ddl.c_str(), SQL_DIALECT_V6,
NULL, NULL, NULL, NULL);
if (statusWrapper.getStatus() & IStatus::FB_HAS_ERRORS)
if (statusWrapper.getState() & IStatus::STATE_ERRORS)
{
try
{
@ -9941,7 +9941,7 @@ void MappingNode::runInSecurityDb(SecDbContext* secDbContext)
}
catch (const Exception&)
{
if (st.getStatus() & IStatus::FB_HAS_ERRORS)
if (st.getState() & IStatus::STATE_ERRORS)
{
const ISC_STATUS* stat2 = st.getErrors();
if (stat2[1] != isc_dsql_token_unk_err)

View File

@ -81,7 +81,7 @@ void DsqlCursor::close(thread_db* tdbb, DsqlCursor* cursor)
if (request->req_fetch_baseline)
{
TraceDSQLFetch trace(attachment, request);
trace.fetch(true, ITracePlugin::TRACE_RESULT_SUCCESS);
trace.fetch(true, ITracePlugin::RESULT_SUCCESS);
}
if (request->req_traced && TraceManager::need_dsql_free(attachment))

View File

@ -10849,7 +10849,7 @@ dsc* UdfCallNode::execute(thread_db* tdbb, jrd_req* request) const
catch (const Exception& ex)
{
const bool noPriv = (ex.stuff_exception(tdbb->tdbb_status_vector) == isc_no_priv);
trace.finish(noPriv ? ITracePlugin::TRACE_RESULT_UNAUTHORIZED : ITracePlugin::TRACE_RESULT_FAILED);
trace.finish(noPriv ? ITracePlugin::RESULT_UNAUTHORIZED : ITracePlugin::RESULT_FAILED);
tdbb->setRequest(request);
EXE_unwind(tdbb, funcRequest);
@ -10866,7 +10866,7 @@ dsc* UdfCallNode::execute(thread_db* tdbb, jrd_req* request) const
if (*nullPtr)
{
request->req_flags |= req_null;
trace.finish(ITracePlugin::TRACE_RESULT_SUCCESS);
trace.finish(ITracePlugin::RESULT_SUCCESS);
}
else
{
@ -10876,7 +10876,7 @@ dsc* UdfCallNode::execute(thread_db* tdbb, jrd_req* request) const
value->vlu_desc = *fmtDesc;
value->vlu_desc.dsc_address = outMsg + argOffset;
trace.finish(ITracePlugin::TRACE_RESULT_SUCCESS, &value->vlu_desc);
trace.finish(ITracePlugin::RESULT_SUCCESS, &value->vlu_desc);
}
EXE_unwind(tdbb, funcRequest);

View File

@ -2862,7 +2862,7 @@ void ExecProcedureNode::executeProcedure(thread_db* tdbb, jrd_req* request) cons
{
const bool noPriv = (ex.stuff_exception(tdbb->tdbb_status_vector) == isc_no_priv);
trace.finish(false,
noPriv ? Firebird::ITracePlugin::TRACE_RESULT_UNAUTHORIZED : ITracePlugin::TRACE_RESULT_FAILED);
noPriv ? Firebird::ITracePlugin::RESULT_UNAUTHORIZED : ITracePlugin::RESULT_FAILED);
EXE_unwind(tdbb, procRequest);
procRequest->req_attachment = NULL;
@ -2871,7 +2871,7 @@ void ExecProcedureNode::executeProcedure(thread_db* tdbb, jrd_req* request) cons
}
// trace procedure execution finish
trace.finish(false, ITracePlugin::TRACE_RESULT_SUCCESS);
trace.finish(false, ITracePlugin::RESULT_SUCCESS);
EXE_unwind(tdbb, procRequest);
procRequest->req_attachment = NULL;

View File

@ -278,14 +278,14 @@ bool DsqlDmlRequest::fetch(thread_db* tdbb, UCHAR* msgBuffer)
if (eofReached)
{
trace.fetch(true, ITracePlugin::TRACE_RESULT_SUCCESS);
trace.fetch(true, ITracePlugin::RESULT_SUCCESS);
return false;
}
map_in_out(this, true, message, delayedFormat, msgBuffer);
delayedFormat = NULL;
trace.fetch(false, ITracePlugin::TRACE_RESULT_SUCCESS);
trace.fetch(false, ITracePlugin::RESULT_SUCCESS);
return true;
}
@ -624,7 +624,7 @@ void DsqlDmlRequest::dsqlPass(thread_db* tdbb, DsqlCompilerScratch* scratch,
{
status = tdbb->tdbb_status_vector[1];
*traceResult = status == isc_no_priv ?
ITracePlugin::TRACE_RESULT_UNAUTHORIZED : ITracePlugin::TRACE_RESULT_FAILED;
ITracePlugin::RESULT_UNAUTHORIZED : ITracePlugin::RESULT_FAILED;
}
// restore warnings (if there are any)
@ -794,7 +794,7 @@ void DsqlDmlRequest::execute(thread_db* tdbb, jrd_tra** traHandle,
}
const bool have_cursor = reqTypeWithCursor(statement->getType()) && !singleton;
trace.finish(have_cursor, ITracePlugin::TRACE_RESULT_SUCCESS);
trace.finish(have_cursor, ITracePlugin::RESULT_SUCCESS);
}
void DsqlDdlRequest::dsqlPass(thread_db* tdbb, DsqlCompilerScratch* scratch,
@ -858,7 +858,7 @@ void DsqlDdlRequest::execute(thread_db* tdbb, jrd_tra** traHandle,
JRD_autocommit_ddl(tdbb, req_transaction);
trace.finish(false, ITracePlugin::TRACE_RESULT_SUCCESS);
trace.finish(false, ITracePlugin::RESULT_SUCCESS);
}
// Rethrow an exception with isc_no_meta_update and prefix codes.
@ -1270,7 +1270,7 @@ static USHORT parse_metadata(dsql_req* request, IMessageMetadata* meta,
// raise error if one present
static void checkD(IStatus* st)
{
if (st->getStatus() & IStatus::FB_HAS_ERRORS)
if (st->getState() & IStatus::STATE_ERRORS)
{
ERRD_post(Arg::StatusVector(st));
}
@ -1405,7 +1405,7 @@ static dsql_req* prepareStatement(thread_db* tdbb, dsql_dbb* database, jrd_tra*
request->req_traced = true;
trace.setStatement(request);
ntrace_result_t traceResult = ITracePlugin::TRACE_RESULT_SUCCESS;
ntrace_result_t traceResult = ITracePlugin::RESULT_SUCCESS;
try
{
request->dsqlPass(tdbb, scratch, &traceResult);
@ -1421,7 +1421,7 @@ static dsql_req* prepareStatement(thread_db* tdbb, dsql_dbb* database, jrd_tra*
}
catch (const Firebird::Exception&)
{
trace.prepare(ITracePlugin::TRACE_RESULT_FAILED);
trace.prepare(ITracePlugin::RESULT_FAILED);
if (request)
{

View File

@ -1364,7 +1364,7 @@ static void gen_database_data() //(const act* action)
{
Firebird::PathName include_buffer;
include_buffer = fb_utils::getPrefix(Firebird::IConfigManager::FB_DIR_INC, INCLUDE_FTN_FILE);
include_buffer = fb_utils::getPrefix(Firebird::IConfigManager::DIR_INC, INCLUDE_FTN_FILE);
sprintf(output_buffer, INCLUDE_ISC_FTN, include_buffer.c_str());
FTN_print_buffer(output_buffer);

View File

@ -159,7 +159,7 @@ static inline void endp(const int column)
static inline void success(const int column, bool ok, const char* status_name, const char* post = "")
{
printa(column, "if (%s%s->getStatus() & Firebird::IStatus::FB_HAS_ERRORS%s)%s",
printa(column, "if (%s%s->getState() & Firebird::IStatus::STATE_ERRORS%s)%s",
ok ? "!(" : "", global_status_name, ok ? ")" : "", post);
}
@ -991,7 +991,7 @@ static void gen_blob_end( const act* action, USHORT column)
static void gen_blob_for( const act* action, USHORT column)
{
PAT args;
const TEXT* pattern1 = "%IFif (!(%S1->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)) {\n\
const TEXT* pattern1 = "%IFif (!(%S1->getState() & Firebird::IStatus::STATE_ERRORS)) {\n\
%ENwhile (1)\n\
{";
@ -1001,8 +1001,8 @@ static void gen_blob_for( const act* action, USHORT column)
PATTERN_expand(column, pattern1, &args);
column += INDENT;
gen_get_segment(action, column);
printa(column, "if (fbIStatus == Firebird::IStatus::FB_ERROR || "
"fbIStatus == Firebird::IStatus::FB_NO_DATA) break;");
printa(column, "if (fbIStatus == Firebird::IStatus::ERROR || "
"fbIStatus == Firebird::IStatus::NO_DATA) break;");
}
@ -2244,7 +2244,7 @@ static void gen_finish( const act* action, int column)
{
if ((action->act_error || (action->act_flags & ACT_sql)) && db != gpreGlob.isc_databases)
{
printa(column, "if (%s && !(%s->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)) ", db->dbb_name->sym_string, global_status_name);
printa(column, "if (%s && !(%s->getState() & Firebird::IStatus::STATE_ERRORS)) ", db->dbb_name->sym_string, global_status_name);
}
else
printa(column, "if (%s)", db->dbb_name->sym_string);
@ -2277,7 +2277,7 @@ static void gen_for( const act* action, int column)
TEXT s[MAX_REF_SIZE];
if (action->act_error || (action->act_flags & ACT_sql))
printa(column, "if (!%s || (%s->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)) break;",
printa(column, "if (!%s || (%s->getState() & Firebird::IStatus::STATE_ERRORS)) break;",
gen_name(s, request->req_eof, true), global_status_name);
else
printa(column, "if (!%s) break;", gen_name(s, request->req_eof, true));
@ -2491,7 +2491,7 @@ static void gen_get_segment( const act* action, int column)
{
const ref* into = action->act_object;
set_sqlcode(action, column);
printa(column, "if (fbIStatus == Firebird::IStatus::FB_OK || fbIStatus == Firebird::IStatus::FB_SEGMENT)");
printa(column, "if (fbIStatus == Firebird::IStatus::OK || fbIStatus == Firebird::IStatus::SEGMENT)");
column += INDENT;
begin(column);
align(column);
@ -3944,7 +3944,7 @@ static void t_start_auto(const act* action,
align(column);
fprintf(gpreGlob.out_file, "if (!%s", db->dbb_name->sym_string);
if (stat && buffer[0])
fprintf(gpreGlob.out_file, " && !(%s->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)", vector);
fprintf(gpreGlob.out_file, " && !(%s->getState() & Firebird::IStatus::STATE_ERRORS)", vector);
fprintf(gpreGlob.out_file, ")");
make_ready(db, filename, vector, (USHORT) (column + INDENT), 0);
if (buffer[0])

View File

@ -52,18 +52,18 @@ interface Disposable : Versioned
[exception]
interface Status : Disposable
{
// flags in value returned by status()
const uint FB_HAS_WARNINGS = 0x01;
const uint FB_HAS_ERRORS = 0x02;
// flags in value returned by getState()
const uint STATE_WARNINGS = 0x01;
const uint STATE_ERRORS = 0x02;
// completion codes - not used in Status, but I must have them somewhere
const int FB_ERROR = -1;
const int FB_OK = 0;
const int FB_NO_DATA = 1;
const int FB_SEGMENT = 2;
const int ERROR = -1;
const int OK = 0;
const int NO_DATA = 1;
const int SEGMENT = 2;
void init();
uint getStatus() const;
uint getState() const;
void setErrors2(uint length, const intptr* value);
void setWarnings2(uint length, const intptr* value);
@ -217,17 +217,17 @@ interface PluginModule : Versioned
interface PluginManager : Versioned
{
// Plugin types
const uint Provider = 1;
const uint FirstNonLibPlugin = 2;
const uint AuthServer = 3;
const uint AuthClient = 4;
const uint AuthUserManagement = 5;
const uint ExternalEngine = 6;
const uint Trace = 7;
const uint WireCrypt = 8;
const uint DbCrypt = 9;
const uint KeyHolder = 10;
const uint MaxType = 11; // keep in sync please
const uint TYPE_PROVIDER = 1;
const uint TYPE_FIRST_NON_LIB = 2;
const uint TYPE_AUTH_SERVER = 3;
const uint TYPE_AUTH_CLIENT = 4;
const uint TYPE_AUTH_USER_MANAGEMENT = 5;
const uint TYPE_EXTERNAL_ENGINE = 6;
const uint TYPE_TRACE = 7;
const uint TYPE_WIRE_CRYPT = 8;
const uint TYPE_DB_CRYPT = 9;
const uint TYPE_KEY_HOLDER = 10;
const uint TYPE_COUNT = 11; // keep in sync
// Main function called by plugin modules in firebird_plugin()
void registerPluginFactory(uint pluginType, const string defaultName, PluginFactory factory);
@ -272,24 +272,24 @@ interface CryptKey : Versioned
interface ConfigManager : Versioned
{
// Codes for ConfigManager::getDirectory()
const uint FB_DIR_BIN = 0;
const uint FB_DIR_SBIN = 1;
const uint FB_DIR_CONF = 2;
const uint FB_DIR_LIB = 3;
const uint FB_DIR_INC = 4;
const uint FB_DIR_DOC = 5;
const uint FB_DIR_UDF = 6;
const uint FB_DIR_SAMPLE = 7;
const uint FB_DIR_SAMPLEDB = 8;
const uint FB_DIR_HELP = 9;
const uint FB_DIR_INTL = 10;
const uint FB_DIR_MISC = 11;
const uint FB_DIR_SECDB = 12;
const uint FB_DIR_MSG = 13;
const uint FB_DIR_LOG = 14;
const uint FB_DIR_GUARD = 15;
const uint FB_DIR_PLUGINS = 16;
const uint FB_DIRCOUNT = 17;
const uint DIR_BIN = 0;
const uint DIR_SBIN = 1;
const uint DIR_CONF = 2;
const uint DIR_LIB = 3;
const uint DIR_INC = 4;
const uint DIR_DOC = 5;
const uint DIR_UDF = 6;
const uint DIR_SAMPLE = 7;
const uint DIR_SAMPLEDB = 8;
const uint DIR_HELP = 9;
const uint DIR_INTL = 10;
const uint DIR_MISC = 11;
const uint DIR_SECDB = 12;
const uint DIR_MSG = 13;
const uint DIR_LOG = 14;
const uint DIR_GUARD = 15;
const uint DIR_PLUGINS = 16;
const uint DIR_COUNT = 17; // keep in sync
const string getDirectory(uint code);
FirebirdConf getFirebirdConf();
@ -316,7 +316,7 @@ interface Blob : ReferenceCounted
uint itemsLength, const uchar* items,
uint bufferLength, uchar* buffer);
[notImplemented(Status::FB_ERROR)]
[notImplemented(Status::ERROR)]
int getSegment(Status status, uint bufferLength, void* buffer, uint* segmentLength);
void putSegment(Status status, uint length,
@ -381,12 +381,12 @@ interface MetadataBuilder : ReferenceCounted
interface ResultSet : ReferenceCounted
{
[notImplemented(Status::FB_ERROR)] int fetchNext(Status status, void* message);
[notImplemented(Status::FB_ERROR)] int fetchPrior(Status status, void* message);
[notImplemented(Status::FB_ERROR)] int fetchFirst(Status status, void* message);
[notImplemented(Status::FB_ERROR)] int fetchLast(Status status, void* message);
[notImplemented(Status::FB_ERROR)] int fetchAbsolute(Status status, int position, void* message);
[notImplemented(Status::FB_ERROR)] int fetchRelative(Status status, int offset, void* message);
[notImplemented(Status::ERROR)] int fetchNext(Status status, void* message);
[notImplemented(Status::ERROR)] int fetchPrior(Status status, void* message);
[notImplemented(Status::ERROR)] int fetchFirst(Status status, void* message);
[notImplemented(Status::ERROR)] int fetchLast(Status status, void* message);
[notImplemented(Status::ERROR)] int fetchAbsolute(Status status, int position, void* message);
[notImplemented(Status::ERROR)] int fetchRelative(Status status, int offset, void* message);
boolean isEof(Status status);
boolean isBof(Status status);
MessageMetadata getMetadata(Status status);
@ -924,8 +924,8 @@ struct dsc;
interface TraceConnection : Versioned
{
const uint TRACE_CONNECTION_DATABASE = 1;
const uint TRACE_CONNECTION_SERVICE = 2;
const uint KIND_DATABASE = 1;
const uint KIND_SERVICE = 2;
uint getKind();
@ -947,10 +947,10 @@ interface TraceDatabaseConnection : TraceConnection
interface TraceTransaction : Versioned
{
const uint TRA_ISO_CONSISTENCY = 1;
const uint TRA_ISO_CONCURRENCY = 2;
const uint TRA_ISO_READ_COMMITTED_RECVER = 3;
const uint TRA_ISO_READ_COMMITTED_NORECVER = 4;
const uint ISOLATION_CONSISTENCY = 1;
const uint ISOLATION_CONCURRENCY = 2;
const uint ISOLATION_READ_COMMITTED_RECVER = 3;
const uint ISOLATION_READ_COMMITTED_NORECVER = 4;
uint getTransactionID();
boolean getReadOnly();
@ -1018,9 +1018,13 @@ interface TraceFunction : Versioned
interface TraceTrigger : Versioned
{
const uint TRACE_ALL = 0;
const uint TRACE_BEFORE = 1;
const uint TRACE_AFTER = 2;
//// TODO: TYPE or WHICH? ExternalTrigger has similar constants.
const uint TYPE_ALL = 0;
const uint TYPE_BEFORE = 1;
const uint TYPE_AFTER = 2;
//// TODO: What about database triggers?
//// TODO: Action constants?
const string getTriggerName();
const string getRelationName();
@ -1072,9 +1076,9 @@ interface TraceInitInfo : Versioned
// API of trace plugin. Used to deliver notifications for each database
interface TracePlugin : ReferenceCounted
{
const uint TRACE_RESULT_SUCCESS = 0;
const uint TRACE_RESULT_FAILED = 1;
const uint TRACE_RESULT_UNAUTHORIZED = 2;
const uint RESULT_SUCCESS = 0;
const uint RESULT_FAILED = 1;
const uint RESULT_UNAUTHORIZED = 2;
// Function to return error string for hook failure
const string trace_get_error();
@ -1187,27 +1191,27 @@ interface TracePlugin : ReferenceCounted
interface TraceFactory : PluginBase
{
// Known notifications
const uint TRACE_EVENT_ATTACH = 0;
const uint TRACE_EVENT_DETACH = 1;
const uint TRACE_EVENT_TRANSACTION_START = 2;
const uint TRACE_EVENT_TRANSACTION_END = 3;
const uint TRACE_EVENT_SET_CONTEXT = 4;
const uint TRACE_EVENT_PROC_EXECUTE = 5;
const uint TRACE_EVENT_TRIGGER_EXECUTE = 6;
const uint TRACE_EVENT_DSQL_PREPARE = 7;
const uint TRACE_EVENT_DSQL_FREE = 8;
const uint TRACE_EVENT_DSQL_EXECUTE = 9;
const uint TRACE_EVENT_BLR_COMPILE = 10;
const uint TRACE_EVENT_BLR_EXECUTE = 11;
const uint TRACE_EVENT_DYN_EXECUTE = 12;
const uint TRACE_EVENT_SERVICE_ATTACH = 13;
const uint TRACE_EVENT_SERVICE_START = 14;
const uint TRACE_EVENT_SERVICE_QUERY = 15;
const uint TRACE_EVENT_SERVICE_DETACH = 16;
const uint TRACE_EVENT_ERROR = 17;
const uint TRACE_EVENT_SWEEP = 18;
const uint TRACE_EVENT_FUNC_EXECUTE = 19;
const uint TRACE_EVENT_MAX = 20; // keep it last
const uint EVENT_ATTACH = 0;
const uint EVENT_DETACH = 1;
const uint EVENT_TRANSACTION_START = 2;
const uint EVENT_TRANSACTION_END = 3;
const uint EVENT_SET_CONTEXT = 4;
const uint EVENT_PROC_EXECUTE = 5;
const uint EVENT_TRIGGER_EXECUTE = 6;
const uint EVENT_DSQL_PREPARE = 7;
const uint EVENT_DSQL_FREE = 8;
const uint EVENT_DSQL_EXECUTE = 9;
const uint EVENT_BLR_COMPILE = 10;
const uint EVENT_BLR_EXECUTE = 11;
const uint EVENT_DYN_EXECUTE = 12;
const uint EVENT_SERVICE_ATTACH = 13;
const uint EVENT_SERVICE_START = 14;
const uint EVENT_SERVICE_QUERY = 15;
const uint EVENT_SERVICE_DETACH = 16;
const uint EVENT_ERROR = 17;
const uint EVENT_SWEEP = 18;
const uint EVENT_FUNC_EXECUTE = 19;
const uint EVENT_MAX = 20; // keep it last
// What notifications does plugin need
uint64 trace_needs();

View File

@ -202,7 +202,7 @@ namespace Firebird
struct VTable : public IDisposable::VTable
{
void (CLOOP_CARG *init)(IStatus* self) throw();
unsigned (CLOOP_CARG *getStatus)(const IStatus* self) throw();
unsigned (CLOOP_CARG *getState)(const IStatus* self) throw();
void (CLOOP_CARG *setErrors2)(IStatus* self, unsigned length, const intptr_t* value) throw();
void (CLOOP_CARG *setWarnings2)(IStatus* self, unsigned length, const intptr_t* value) throw();
void (CLOOP_CARG *setErrors)(IStatus* self, const intptr_t* value) throw();
@ -225,21 +225,21 @@ namespace Firebird
public:
static const unsigned VERSION = 3;
static const unsigned FB_HAS_WARNINGS = 1;
static const unsigned FB_HAS_ERRORS = 2;
static const int FB_ERROR = -1;
static const int FB_OK = 0;
static const int FB_NO_DATA = 1;
static const int FB_SEGMENT = 2;
static const unsigned STATE_WARNINGS = 1;
static const unsigned STATE_ERRORS = 2;
static const int ERROR = -1;
static const int OK = 0;
static const int NO_DATA = 1;
static const int SEGMENT = 2;
void init()
{
static_cast<VTable*>(this->cloopVTable)->init(this);
}
unsigned getStatus() const
unsigned getState() const
{
unsigned ret = static_cast<VTable*>(this->cloopVTable)->getStatus(this);
unsigned ret = static_cast<VTable*>(this->cloopVTable)->getState(this);
return ret;
}
@ -763,17 +763,17 @@ namespace Firebird
public:
static const unsigned VERSION = 2;
static const unsigned Provider = 1;
static const unsigned FirstNonLibPlugin = 2;
static const unsigned AuthServer = 3;
static const unsigned AuthClient = 4;
static const unsigned AuthUserManagement = 5;
static const unsigned ExternalEngine = 6;
static const unsigned Trace = 7;
static const unsigned WireCrypt = 8;
static const unsigned DbCrypt = 9;
static const unsigned KeyHolder = 10;
static const unsigned MaxType = 11;
static const unsigned TYPE_PROVIDER = 1;
static const unsigned TYPE_FIRST_NON_LIB = 2;
static const unsigned TYPE_AUTH_SERVER = 3;
static const unsigned TYPE_AUTH_CLIENT = 4;
static const unsigned TYPE_AUTH_USER_MANAGEMENT = 5;
static const unsigned TYPE_EXTERNAL_ENGINE = 6;
static const unsigned TYPE_TRACE = 7;
static const unsigned TYPE_WIRE_CRYPT = 8;
static const unsigned TYPE_DB_CRYPT = 9;
static const unsigned TYPE_KEY_HOLDER = 10;
static const unsigned TYPE_COUNT = 11;
void registerPluginFactory(unsigned pluginType, const char* defaultName, IPluginFactory* factory)
{
@ -885,24 +885,24 @@ namespace Firebird
public:
static const unsigned VERSION = 2;
static const unsigned FB_DIR_BIN = 0;
static const unsigned FB_DIR_SBIN = 1;
static const unsigned FB_DIR_CONF = 2;
static const unsigned FB_DIR_LIB = 3;
static const unsigned FB_DIR_INC = 4;
static const unsigned FB_DIR_DOC = 5;
static const unsigned FB_DIR_UDF = 6;
static const unsigned FB_DIR_SAMPLE = 7;
static const unsigned FB_DIR_SAMPLEDB = 8;
static const unsigned FB_DIR_HELP = 9;
static const unsigned FB_DIR_INTL = 10;
static const unsigned FB_DIR_MISC = 11;
static const unsigned FB_DIR_SECDB = 12;
static const unsigned FB_DIR_MSG = 13;
static const unsigned FB_DIR_LOG = 14;
static const unsigned FB_DIR_GUARD = 15;
static const unsigned FB_DIR_PLUGINS = 16;
static const unsigned FB_DIRCOUNT = 17;
static const unsigned DIR_BIN = 0;
static const unsigned DIR_SBIN = 1;
static const unsigned DIR_CONF = 2;
static const unsigned DIR_LIB = 3;
static const unsigned DIR_INC = 4;
static const unsigned DIR_DOC = 5;
static const unsigned DIR_UDF = 6;
static const unsigned DIR_SAMPLE = 7;
static const unsigned DIR_SAMPLEDB = 8;
static const unsigned DIR_HELP = 9;
static const unsigned DIR_INTL = 10;
static const unsigned DIR_MISC = 11;
static const unsigned DIR_SECDB = 12;
static const unsigned DIR_MSG = 13;
static const unsigned DIR_LOG = 14;
static const unsigned DIR_GUARD = 15;
static const unsigned DIR_PLUGINS = 16;
static const unsigned DIR_COUNT = 17;
const char* getDirectory(unsigned code)
{
@ -1513,7 +1513,6 @@ namespace Firebird
static const unsigned FLAG_REPEAT_EXECUTE = 2;
static const unsigned CURSOR_TYPE_SCROLLABLE = 1;
template <typename StatusType> void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer)
{
static_cast<VTable*>(this->cloopVTable)->getInfo(this, status, itemsLength, items, bufferLength, buffer);
@ -3368,8 +3367,8 @@ namespace Firebird
public:
static const unsigned VERSION = 2;
static const unsigned TRACE_CONNECTION_DATABASE = 1;
static const unsigned TRACE_CONNECTION_SERVICE = 2;
static const unsigned KIND_DATABASE = 1;
static const unsigned KIND_SERVICE = 2;
unsigned getKind()
{
@ -3486,10 +3485,10 @@ namespace Firebird
public:
static const unsigned VERSION = 2;
static const unsigned TRA_ISO_CONSISTENCY = 1;
static const unsigned TRA_ISO_CONCURRENCY = 2;
static const unsigned TRA_ISO_READ_COMMITTED_RECVER = 3;
static const unsigned TRA_ISO_READ_COMMITTED_NORECVER = 4;
static const unsigned ISOLATION_CONSISTENCY = 1;
static const unsigned ISOLATION_CONCURRENCY = 2;
static const unsigned ISOLATION_READ_COMMITTED_RECVER = 3;
static const unsigned ISOLATION_READ_COMMITTED_NORECVER = 4;
unsigned getTransactionID()
{
@ -3890,9 +3889,9 @@ namespace Firebird
public:
static const unsigned VERSION = 2;
static const unsigned TRACE_ALL = 0;
static const unsigned TRACE_BEFORE = 1;
static const unsigned TRACE_AFTER = 2;
static const unsigned TYPE_ALL = 0;
static const unsigned TYPE_BEFORE = 1;
static const unsigned TYPE_AFTER = 2;
const char* getTriggerName()
{
@ -4211,9 +4210,9 @@ namespace Firebird
public:
static const unsigned VERSION = 3;
static const unsigned TRACE_RESULT_SUCCESS = 0;
static const unsigned TRACE_RESULT_FAILED = 1;
static const unsigned TRACE_RESULT_UNAUTHORIZED = 2;
static const unsigned RESULT_SUCCESS = 0;
static const unsigned RESULT_FAILED = 1;
static const unsigned RESULT_UNAUTHORIZED = 2;
static const unsigned SWEEP_STATE_STARTED = 1;
static const unsigned SWEEP_STATE_FINISHED = 2;
static const unsigned SWEEP_STATE_FAILED = 3;
@ -4368,27 +4367,27 @@ namespace Firebird
public:
static const unsigned VERSION = 4;
static const unsigned TRACE_EVENT_ATTACH = 0;
static const unsigned TRACE_EVENT_DETACH = 1;
static const unsigned TRACE_EVENT_TRANSACTION_START = 2;
static const unsigned TRACE_EVENT_TRANSACTION_END = 3;
static const unsigned TRACE_EVENT_SET_CONTEXT = 4;
static const unsigned TRACE_EVENT_PROC_EXECUTE = 5;
static const unsigned TRACE_EVENT_TRIGGER_EXECUTE = 6;
static const unsigned TRACE_EVENT_DSQL_PREPARE = 7;
static const unsigned TRACE_EVENT_DSQL_FREE = 8;
static const unsigned TRACE_EVENT_DSQL_EXECUTE = 9;
static const unsigned TRACE_EVENT_BLR_COMPILE = 10;
static const unsigned TRACE_EVENT_BLR_EXECUTE = 11;
static const unsigned TRACE_EVENT_DYN_EXECUTE = 12;
static const unsigned TRACE_EVENT_SERVICE_ATTACH = 13;
static const unsigned TRACE_EVENT_SERVICE_START = 14;
static const unsigned TRACE_EVENT_SERVICE_QUERY = 15;
static const unsigned TRACE_EVENT_SERVICE_DETACH = 16;
static const unsigned TRACE_EVENT_ERROR = 17;
static const unsigned TRACE_EVENT_SWEEP = 18;
static const unsigned TRACE_EVENT_FUNC_EXECUTE = 19;
static const unsigned TRACE_EVENT_MAX = 20;
static const unsigned EVENT_ATTACH = 0;
static const unsigned EVENT_DETACH = 1;
static const unsigned EVENT_TRANSACTION_START = 2;
static const unsigned EVENT_TRANSACTION_END = 3;
static const unsigned EVENT_SET_CONTEXT = 4;
static const unsigned EVENT_PROC_EXECUTE = 5;
static const unsigned EVENT_TRIGGER_EXECUTE = 6;
static const unsigned EVENT_DSQL_PREPARE = 7;
static const unsigned EVENT_DSQL_FREE = 8;
static const unsigned EVENT_DSQL_EXECUTE = 9;
static const unsigned EVENT_BLR_COMPILE = 10;
static const unsigned EVENT_BLR_EXECUTE = 11;
static const unsigned EVENT_DYN_EXECUTE = 12;
static const unsigned EVENT_SERVICE_ATTACH = 13;
static const unsigned EVENT_SERVICE_START = 14;
static const unsigned EVENT_SERVICE_QUERY = 15;
static const unsigned EVENT_SERVICE_DETACH = 16;
static const unsigned EVENT_ERROR = 17;
static const unsigned EVENT_SWEEP = 18;
static const unsigned EVENT_FUNC_EXECUTE = 19;
static const unsigned EVENT_MAX = 20;
ISC_UINT64 trace_needs()
{
@ -4726,7 +4725,7 @@ namespace Firebird
this->version = Base::VERSION;
this->dispose = &Name::cloopdisposeDispatcher;
this->init = &Name::cloopinitDispatcher;
this->getStatus = &Name::cloopgetStatusDispatcher;
this->getState = &Name::cloopgetStateDispatcher;
this->setErrors2 = &Name::cloopsetErrors2Dispatcher;
this->setWarnings2 = &Name::cloopsetWarnings2Dispatcher;
this->setErrors = &Name::cloopsetErrorsDispatcher;
@ -4752,11 +4751,11 @@ namespace Firebird
}
}
static unsigned CLOOP_CARG cloopgetStatusDispatcher(const IStatus* self) throw()
static unsigned CLOOP_CARG cloopgetStateDispatcher(const IStatus* self) throw()
{
try
{
return static_cast<const Name*>(self)->Name::getStatus();
return static_cast<const Name*>(self)->Name::getState();
}
catch (...)
{
@ -4879,7 +4878,7 @@ namespace Firebird
}
virtual void init() = 0;
virtual unsigned getStatus() const = 0;
virtual unsigned getState() const = 0;
virtual void setErrors2(unsigned length, const intptr_t* value) = 0;
virtual void setWarnings2(unsigned length, const intptr_t* value) = 0;
virtual void setErrors(const intptr_t* value) = 0;

View File

@ -152,9 +152,9 @@ namespace Firebird
status->init();
}
virtual unsigned getStatus() const
virtual unsigned getState() const
{
return dirty ? status->getStatus() : 0;
return dirty ? status->getState() : 0;
}
virtual void setErrors2(unsigned length, const intptr_t* value)
@ -226,7 +226,7 @@ namespace Firebird
public:
static void checkException(ThrowStatusWrapper* status)
{
if (status->dirty && (status->getStatus() & IStatus::FB_HAS_ERRORS))
if (status->dirty && (status->getState() & IStatus::STATE_ERRORS))
throw FbException(status->status);
}
};

View File

@ -350,7 +350,7 @@ private:
{
(plugin->*routine)(statusWrapper, node->name, node->factory);
if (statusWrapper->getStatus() & IStatus::FB_HAS_ERRORS)
if (statusWrapper->getState() & IStatus::STATE_ERRORS)
return false;
}

View File

@ -277,7 +277,7 @@ static inline bool commit_trans(Firebird::ITransaction** x)
if (ISQL_errmsg (fbStatus))
{
(*x)->rollback(fbStatus);
if (!(fbStatus->getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(fbStatus->getState() & Firebird::IStatus::STATE_ERRORS))
{
*x = NULL;
}
@ -956,8 +956,8 @@ bool ISQL_errmsg(Firebird::IStatus* st)
TEXT errbuf[MSG_LENGTH];
const ISC_STATUS* const status = st->getErrors();
const unsigned state = st->getStatus();
if (Quiet && (state & Firebird::IStatus::FB_HAS_ERRORS))
const unsigned state = st->getState();
if (Quiet && (state & Firebird::IStatus::STATE_ERRORS))
Exit_value = FINI_ERROR;
//else
{
@ -965,8 +965,8 @@ bool ISQL_errmsg(Firebird::IStatus* st)
if (vec[0] != isc_arg_gds)
return false;
if (!(state & Firebird::IStatus::FB_HAS_ERRORS) &&
(!(state & Firebird::IStatus::FB_HAS_WARNINGS) || !setValues.Warnings))
if (!(state & Firebird::IStatus::STATE_ERRORS) &&
(!(state & Firebird::IStatus::STATE_WARNINGS) || !setValues.Warnings))
{
return false;
}
@ -989,7 +989,7 @@ bool ISQL_errmsg(Firebird::IStatus* st)
}
/*
if (state & Firebird::IStatus::FB_HAS_WARNINGS)
if (state & Firebird::IStatus::STATE_WARNINGS)
{
const ISC_STATUS* w = st->getWarnings();
while (fb_interpret(err, es, &w)) {
@ -1061,7 +1061,7 @@ bool ISQL_errmsg(Firebird::IStatus* st)
}
}
return (state & Firebird::IStatus::FB_HAS_ERRORS);
return (state & Firebird::IStatus::STATE_ERRORS);
}
@ -1078,7 +1078,7 @@ void ISQL_warning(Firebird::CheckStatusWrapper* st)
* Simulate isc_print_status exactly, to control stderr
**************************************/
if ((st->getStatus() & Firebird::IStatus::FB_HAS_WARNINGS) && setValues.Warnings)
if ((st->getState() & Firebird::IStatus::STATE_WARNINGS) && setValues.Warnings)
{
const ISC_STATUS* vec = st->getWarnings();
TEXT buf[MSG_LENGTH];
@ -1273,7 +1273,7 @@ void ISQL_get_character_sets(SSHORT char_set_id, SSHORT collation, bool collate_
inline static bool failed()
{
return (fbStatus->getStatus() & Firebird::IStatus::FB_HAS_ERRORS);
return (fbStatus->getState() & Firebird::IStatus::STATE_ERRORS);
}
@ -1880,7 +1880,7 @@ void ISQL_print_validation(FILE* fp,
{
unsigned int length;
int cc = blob->getSegment(fbStatus, sizeof(buffer) - 1, buffer, &length);
if (cc == Firebird::IStatus::FB_NO_DATA || cc == Firebird::IStatus::FB_ERROR)
if (cc == Firebird::IStatus::NO_DATA || cc == Firebird::IStatus::ERROR)
break;
buffer[length] = 0;
@ -7598,7 +7598,7 @@ processing_state ISQL_print_item_blob(FILE* fp, const IsqlVar* var, Firebird::IT
{
unsigned int length;
int cc = blob->getSegment(fbStatus, sizeof(buffer) - 1, buffer, &length);
if (cc == Firebird::IStatus::FB_NO_DATA || cc == Firebird::IStatus::FB_ERROR)
if (cc == Firebird::IStatus::NO_DATA || cc == Firebird::IStatus::ERROR)
break;
// Special displays for blr or acl subtypes
@ -8591,7 +8591,7 @@ static processing_state process_statement(const TEXT* str2)
// Fetch the current cursor
if (curs->fetchNext(fbStatus, buffer) == Firebird::IStatus::FB_NO_DATA)
if (curs->fetchNext(fbStatus, buffer) == Firebird::IStatus::NO_DATA)
break;
// Print the header every Pagelength number of lines for
@ -8692,7 +8692,7 @@ static int query_abort(const int reason, const int, void*)
{
Firebird::LocalStatus status;
DB->cancelOperation(&status, fb_cancel_raise);
flag = !(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS);
flag = !(status.getState() & Firebird::IStatus::STATE_ERRORS);
}
if (flag)

View File

@ -1611,7 +1611,7 @@ void SHOW_print_metadata_text_blob(FILE* fp, ISC_QUAD* blobid, bool escape_squot
{
unsigned int length;
int cc = blob->getSegment(fbStatus, sizeof(buffer) - 1, buffer, &length);
if (cc == Firebird::IStatus::FB_NO_DATA || cc == Firebird::IStatus::FB_ERROR)
if (cc == Firebird::IStatus::NO_DATA || cc == Firebird::IStatus::ERROR)
break;
// ASF: In Windows, \n characters are printed as \r\n in text mode.
@ -1654,7 +1654,7 @@ void SHOW_print_metadata_text_blob(FILE* fp, ISC_QUAD* blobid, bool escape_squot
if (endedWithCr)
fputc('\r', fp);
if (fbStatus->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (fbStatus->getState() & Firebird::IStatus::STATE_ERRORS)
ISQL_errmsg(fbStatus);
blob->close(fbStatus);
@ -1770,7 +1770,7 @@ processing_state SHOW_metadata(const SCHAR* const* cmd, SCHAR** lcmd)
isqlGlob.printf("Server version:%s", NEWLINE);
VersionCallback callback;
Firebird::UtilInterfacePtr()->getFbVersion(fbStatus, DB, &callback);
if (fbStatus->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (fbStatus->getState() & Firebird::IStatus::STATE_ERRORS)
{
IUTILS_msg_get(CANNOT_GET_SRV_VER, msg_string);
STDERROUT(msg_string);
@ -5816,7 +5816,7 @@ static processing_state show_users12()
processing_state rc = OBJECT_NOT_FOUND;
bool newline = false;
while (rs->fetchNext(fbStatus, outBuffer) == Firebird::IStatus::FB_OK)
while (rs->fetchNext(fbStatus, outBuffer) == Firebird::IStatus::OK)
{
if (rc == OBJECT_NOT_FOUND)
{

View File

@ -185,7 +185,7 @@ namespace Jrd {
return;
}
GetPlugins<IDbCryptPlugin> cryptControl(IPluginManager::DbCrypt, dbb.dbb_config, pluginName);
GetPlugins<IDbCryptPlugin> cryptControl(IPluginManager::TYPE_DB_CRYPT, dbb.dbb_config, pluginName);
if (!cryptControl.hasData())
{
(Arg::Gds(isc_no_crypt_plugin) << pluginName).raise();
@ -555,7 +555,7 @@ namespace Jrd {
LocalStatus status;
cryptPlugin->decrypt(&status, dbb.dbb_page_size - sizeof(Ods::pag), &page[1], &page[1]);
if (status.getStatus() & IStatus::FB_HAS_ERRORS)
if (status.getState() & IStatus::STATE_ERRORS)
{
fb_utils::mergeStatus(sv, FB_NELEM(sv), &status);
return false;
@ -583,7 +583,7 @@ namespace Jrd {
LocalStatus status;
cryptPlugin->encrypt(&status, dbb.dbb_page_size - sizeof(Ods::pag), &from[1], &to[1]);
if (status.getStatus() & IStatus::FB_HAS_ERRORS)
if (status.getState() & IStatus::STATE_ERRORS)
{
fb_utils::mergeStatus(sv, FB_NELEM(sv), &status);
return NULL;
@ -668,7 +668,7 @@ namespace Jrd {
{
MutexLockGuard g(holdersMutex, FB_FUNCTION);
for (GetPlugins<IKeyHolderPlugin> keyControl(IPluginManager::KeyHolder, config);
for (GetPlugins<IKeyHolderPlugin> keyControl(IPluginManager::TYPE_KEY_HOLDER, config);
keyControl.hasData(); keyControl.next())
{
IKeyHolderPlugin* keyPlugin = keyControl.plugin();
@ -696,7 +696,7 @@ namespace Jrd {
ha->registerAttachment(att);
break; // Do not need >1 key from attachment to single DB
}
else if (st.getStatus() & IStatus::FB_HAS_ERRORS)
else if (st.getState() & IStatus::STATE_ERRORS)
{
status_exception::raise(&st);
}
@ -731,7 +731,7 @@ namespace Jrd {
LocalStatus st;
crypt->setKey(&st, length, vector);
if (st.getStatus() & IStatus::FB_HAS_ERRORS)
if (st.getState() & IStatus::STATE_ERRORS)
{
status_exception::raise(&st);
}

View File

@ -315,7 +315,7 @@ namespace Jrd
{
Firebird::LocalStatus s;
TimerInterfacePtr()->stop(&s, this);
if (!(s.getStatus() & IStatus::FB_HAS_ERRORS))
if (!(s.getState() & IStatus::STATE_ERRORS))
active = false;
}
}

View File

@ -57,7 +57,7 @@ namespace {
void check(const char* s, IStatus* st)
{
if (!(st->getStatus() & IStatus::FB_HAS_ERRORS))
if (!(st->getState() & IStatus::STATE_ERRORS))
return;
Arg::StatusVector newStatus(st);
@ -77,7 +77,7 @@ bool openDb(const char* securityDb, RefPtr<IAttachment>& att, RefPtr<ITransactio
LocalStatus st;
att = prov->attachDatabase(&st, securityDb,
embeddedSysdba.getBufferLength(), embeddedSysdba.getBuffer());
if (st.getStatus() & IStatus::FB_HAS_ERRORS)
if (st.getState() & IStatus::STATE_ERRORS)
{
if (!fb_utils::containsErrorCode(st.getErrors(), isc_io_error))
check("IProvider::attachDatabase", &st);
@ -133,7 +133,7 @@ bool checkCreateDatabaseGrant(const string& userName, const string& trustedRole,
att->execute(&st, tra, 0, sql, SQL_DIALECT_V6, prm.getMetadata(), prm.getBuffer(),
result.getMetadata(), result.getBuffer());
if (st.getStatus() & IStatus::FB_HAS_ERRORS)
if (st.getState() & IStatus::STATE_ERRORS)
{
// isc_dsql_relation_err when exec SQL - i.e. table RDB$USER_PRIVILEGES
// is missing due to non-FB security DB
@ -169,7 +169,7 @@ bool checkCreateDatabaseGrant(const string& userName, const string& trustedRole,
"select count(*) from RDB$DB_CREATORS"
" where (RDB$USER_TYPE = ? and RDB$USER = ?) or (RDB$USER_TYPE = ? and RDB$USER = ?)",
SQL_DIALECT_V6, gr.getMetadata(), gr.getBuffer(), result.getMetadata(), result.getBuffer());
if (st.getStatus() & IStatus::FB_HAS_ERRORS)
if (st.getState() & IStatus::STATE_ERRORS)
{
if (fb_utils::containsErrorCode(st.getErrors(), isc_dsql_relation_err))
{
@ -240,7 +240,7 @@ RecordBuffer* DbCreatorsList::getList(thread_db* tdbb, jrd_rel* relation)
"select RDB$USER_TYPE, RDB$USER from RDB$DB_CREATORS",
SQL_DIALECT_V6, NULL, NULL, gr.getMetadata(), NULL, 0));
if (st.getStatus() & IStatus::FB_HAS_ERRORS)
if (st.getState() & IStatus::STATE_ERRORS)
{
if (!fb_utils::containsErrorCode(st.getErrors(), isc_dsql_relation_err))
check("IAttachment::openCursor", &st);
@ -258,7 +258,7 @@ RecordBuffer* DbCreatorsList::getList(thread_db* tdbb, jrd_rel* relation)
try
{
buffer = makeBuffer(tdbb);
while (curs->fetchNext(&st, gr.getBuffer()) == IStatus::FB_OK)
while (curs->fetchNext(&st, gr.getBuffer()) == IStatus::OK)
{
int charset = CS_METADATA;
Record* record = buffer->getTempRecord();

View File

@ -1360,7 +1360,7 @@ IExternalEngine* ExtEngineManager::getEngine(thread_db* tdbb, const MetaName& na
if (!engines.get(name, engine))
{
GetPlugins<IExternalEngine> engineControl(IPluginManager::ExternalEngine, name.c_str());
GetPlugins<IExternalEngine> engineControl(IPluginManager::TYPE_EXTERNAL_ENGINE, name.c_str());
if (engineControl.hasData())
{

View File

@ -416,7 +416,7 @@ bool IntlManager::initialize()
ObjectsArray<ConfigFile::String> conflicts;
string builtinConfig;
PathName intlPath = fb_utils::getPrefix(Firebird::IConfigManager::FB_DIR_INTL, "");
PathName intlPath = fb_utils::getPrefix(Firebird::IConfigManager::DIR_INTL, "");
ScanDir dir(intlPath.c_str(), "*.conf");

View File

@ -72,7 +72,7 @@ const char* TYPE_SEEN = "Seen";
void check(const char* s, IStatus* st)
{
if (!(st->getStatus() & IStatus::FB_HAS_ERRORS))
if (!(st->getState() & IStatus::STATE_ERRORS))
return;
Arg::StatusVector newStatus(st);
@ -280,7 +280,7 @@ public:
" RDB$MAP_FROM, RDB$MAP_TO_TYPE, RDB$MAP_TO "
"FROM RDB$AUTH_MAPPING",
3, NULL, NULL, mMap.getMetadata(), NULL, 0);
if (st.getStatus() & IStatus::FB_HAS_ERRORS)
if (st.getState() & IStatus::STATE_ERRORS)
{
if (fb_utils::containsErrorCode(st.getErrors(), isc_dsql_relation_err))
{
@ -293,7 +293,7 @@ public:
check("IAttachment::openCursor", &st);
}
while (curs->fetchNext(&st, mMap.getBuffer()) == IStatus::FB_OK)
while (curs->fetchNext(&st, mMap.getBuffer()) == IStatus::OK)
{
const char* expandedDb = "*";
PathName target;
@ -925,7 +925,7 @@ void mapUser(string& name, string& trusted_role, Firebird::string* auth_method,
{
iSec = prov->attachDatabase(&st, securityAlias,
embeddedSysdba.getBufferLength(), embeddedSysdba.getBuffer());
if (st.getStatus() & IStatus::FB_HAS_ERRORS)
if (st.getState() & IStatus::STATE_ERRORS)
{
if (!fb_utils::containsErrorCode(st.getErrors(), isc_io_error))
check("IProvider::attachDatabase", &st);
@ -946,7 +946,7 @@ void mapUser(string& name, string& trusted_role, Firebird::string* auth_method,
embeddedSysdba.getBufferLength(), embeddedSysdba.getBuffer());
}
if (st.getStatus() & IStatus::FB_HAS_ERRORS)
if (st.getState() & IStatus::STATE_ERRORS)
{
if (!fb_utils::containsErrorCode(st.getErrors(), isc_io_error))
check("IProvider::attachDatabase", &st);
@ -1167,7 +1167,7 @@ RecordBuffer* MappingList::getList(thread_db* tdbb, jrd_rel* relation)
const char* dbName = tdbb->getDatabase()->dbb_config->getSecurityDatabase();
att = prov->attachDatabase(&st, dbName,
embeddedSysdba.getBufferLength(), embeddedSysdba.getBuffer());
if (st.getStatus() & IStatus::FB_HAS_ERRORS)
if (st.getState() & IStatus::STATE_ERRORS)
{
if (!fb_utils::containsErrorCode(st.getErrors(), isc_io_error))
check("IProvider::attachDatabase", &st);
@ -1200,7 +1200,7 @@ RecordBuffer* MappingList::getList(thread_db* tdbb, jrd_rel* relation)
" RDB$MAP_FROM_TYPE, RDB$MAP_FROM, RDB$MAP_TO_TYPE, RDB$MAP_TO "
"FROM RDB$AUTH_MAPPING",
3, NULL, NULL, mMap.getMetadata(), NULL, 0);
if (st.getStatus() & IStatus::FB_HAS_ERRORS)
if (st.getState() & IStatus::STATE_ERRORS)
{
if (!fb_utils::containsErrorCode(st.getErrors(), isc_dsql_relation_err))
check("IAttachment::openCursor", &st);
@ -1220,7 +1220,7 @@ RecordBuffer* MappingList::getList(thread_db* tdbb, jrd_rel* relation)
buffer = makeBuffer(tdbb);
Record* record = buffer->getTempRecord();
while (curs->fetchNext(&st, mMap.getBuffer()) == IStatus::FB_OK)
while (curs->fetchNext(&st, mMap.getBuffer()) == IStatus::OK)
{
int charset = CS_METADATA;
record->nullify();

View File

@ -2376,7 +2376,7 @@ dsc* evlSetContext(thread_db* tdbb, const SysFunction*, const NestValueArray& ar
}
}
if (attachment->att_trace_manager->needs(ITraceFactory::TRACE_EVENT_SET_CONTEXT))
if (attachment->att_trace_manager->needs(ITraceFactory::EVENT_SET_CONTEXT))
{
TraceConnectionImpl conn(attachment);
TraceTransactionImpl tran(transaction);

View File

@ -157,7 +157,7 @@ UserManagement::UserManagement(jrd_tra* tra)
(Arg::Gds(isc_random) << "Unknown user name for given transaction").raise();
}
plugins = att->att_database->dbb_config->getPlugins(IPluginManager::AuthUserManagement);
plugins = att->att_database->dbb_config->getPlugins(IPluginManager::TYPE_AUTH_USER_MANAGEMENT);
}
@ -172,7 +172,7 @@ IManagement* UserManagement::registerManager(Auth::Get& getPlugin, const char* p
UserIdInfo idInfo(att);
manager->start(&statusWrapper, &idInfo);
if (status.getStatus() & IStatus::FB_HAS_ERRORS)
if (status.getState() & IStatus::STATE_ERRORS)
{
status_exception::raise(&statusWrapper);
}
@ -264,7 +264,7 @@ UserManagement::~UserManagement()
managers[i].second = NULL;
/***
if (status.getStatus() & IStatus::FB_HAS_ERRORS)
if (status.getState() & IStatus::STATE_ERRORS)
status_exception::raise(&status);
***/
}
@ -282,7 +282,7 @@ void UserManagement::commit()
CheckStatusWrapper statusWrapper(&status);
manager->commit(&statusWrapper);
if (status.getStatus() & IStatus::FB_HAS_ERRORS)
if (status.getState() & IStatus::STATE_ERRORS)
status_exception::raise(&statusWrapper);
PluginManagerInterfacePtr()->releasePlugin(manager);

View File

@ -1139,7 +1139,7 @@ void EXE_execute_triggers(thread_db* tdbb,
EXE_start(tdbb, trigger, transaction);
const bool ok = (trigger->req_operation != jrd_req::req_unwind);
trace.finish(ok ? ITracePlugin::TRACE_RESULT_SUCCESS : ITracePlugin::TRACE_RESULT_FAILED);
trace.finish(ok ? ITracePlugin::RESULT_SUCCESS : ITracePlugin::RESULT_FAILED);
EXE_unwind(tdbb, trigger);
trigger->req_attachment = NULL;

View File

@ -165,7 +165,7 @@ void InternalConnection::attach(thread_db* tdbb, const Firebird::string& dbName,
m_dpb.getBufferLength(), m_dpb.getBuffer());
}
if (status.getStatus() & IStatus::FB_HAS_ERRORS)
if (status.getState() & IStatus::STATE_ERRORS)
raise(status, tdbb, "JProvider::attach");
}
@ -199,7 +199,7 @@ void InternalConnection::doDetach(thread_db* tdbb)
status.init();
}
if (status.getStatus() & IStatus::FB_HAS_ERRORS)
if (status.getState() & IStatus::STATE_ERRORS)
{
m_attachment = att;
raise(status, tdbb, "JAttachment::detach");
@ -218,7 +218,7 @@ bool InternalConnection::cancelExecution()
CheckStatusWrapper statusWrapper(&status);
m_attachment->cancelOperation(&statusWrapper, fb_cancel_raise);
return !(status.getStatus() & IStatus::FB_HAS_ERRORS);
return !(status.getState() & IStatus::STATE_ERRORS);
}
// this internal connection instance is available for the current execution context if it
@ -423,7 +423,7 @@ void InternalStatement::doPrepare(thread_db* tdbb, const string& sql)
tran->getHandle()->tra_caller_name = save_caller_name;
}
if (status.getStatus() & IStatus::FB_HAS_ERRORS)
if (status.getState() & IStatus::STATE_ERRORS)
raise(status, tdbb, "JAttachment::prepare", &sql);
const DsqlCompiledStatement* statement = m_request->getHandle()->getStatement();
@ -512,7 +512,7 @@ void InternalStatement::doExecute(thread_db* tdbb)
m_inMetadata, m_in_buffer.begin(), m_outMetadata, m_out_buffer.begin());
}
if (status.getStatus() & IStatus::FB_HAS_ERRORS)
if (status.getState() & IStatus::STATE_ERRORS)
raise(status, tdbb, "JStatement::execute");
}
@ -539,7 +539,7 @@ void InternalStatement::doOpen(thread_db* tdbb)
m_inMetadata, m_in_buffer.begin(), m_outMetadata, 0);
}
if (status.getStatus() & IStatus::FB_HAS_ERRORS)
if (status.getState() & IStatus::STATE_ERRORS)
raise(status, tdbb, "JStatement::open");
}
@ -556,10 +556,10 @@ bool InternalStatement::doFetch(thread_db* tdbb)
fb_assert(m_outMetadata->getMessageLength() == m_out_buffer.getCount());
fb_assert(m_cursor);
res = m_cursor->fetchNext(&statusWrapper, m_out_buffer.begin()) == IStatus::FB_OK;
res = m_cursor->fetchNext(&statusWrapper, m_out_buffer.begin()) == IStatus::OK;
}
if (status.getStatus() & IStatus::FB_HAS_ERRORS)
if (status.getState() & IStatus::STATE_ERRORS)
raise(status, tdbb, "JResultSet::fetchNext");
return res;
@ -578,7 +578,7 @@ void InternalStatement::doClose(thread_db* tdbb, bool drop)
m_cursor->close(&statusWrapper);
m_cursor = NULL;
if (status.getStatus() & IStatus::FB_HAS_ERRORS)
if (status.getState() & IStatus::STATE_ERRORS)
{
raise(status, tdbb, "JResultSet::close");
}
@ -591,7 +591,7 @@ void InternalStatement::doClose(thread_db* tdbb, bool drop)
m_allocated = false;
m_request = NULL;
if (status.getStatus() & IStatus::FB_HAS_ERRORS)
if (status.getState() & IStatus::STATE_ERRORS)
{
raise(status, tdbb, "JStatement::free");
}
@ -656,7 +656,7 @@ void InternalBlob::open(thread_db* tdbb, Transaction& tran, const dsc& desc, con
m_blob = att->openBlob(&statusWrapper, transaction, &m_blob_id, bpb_len, bpb_buff);
}
if (status.getStatus() & IStatus::FB_HAS_ERRORS)
if (status.getState() & IStatus::STATE_ERRORS)
m_connection.raise(status, tdbb, "JAttachment::openBlob");
fb_assert(m_blob);
@ -684,7 +684,7 @@ void InternalBlob::create(thread_db* tdbb, Transaction& tran, dsc& desc, const U
memcpy(desc.dsc_address, &m_blob_id, sizeof(m_blob_id));
}
if (status.getStatus() & IStatus::FB_HAS_ERRORS)
if (status.getState() & IStatus::STATE_ERRORS)
m_connection.raise(status, tdbb, "JAttachment::createBlob");
fb_assert(m_blob);
@ -703,7 +703,7 @@ USHORT InternalBlob::read(thread_db* tdbb, UCHAR* buff, USHORT len)
m_blob->getSegment(&statusWrapper, len, buff, &result);
}
if (status.getStatus() & IStatus::FB_HAS_ERRORS)
if (status.getState() & IStatus::STATE_ERRORS)
m_connection.raise(status, tdbb, "JBlob::getSegment");
return result;
@ -721,7 +721,7 @@ void InternalBlob::write(thread_db* tdbb, const UCHAR* buff, USHORT len)
m_blob->putSegment(&statusWrapper, len, buff);
}
if (status.getStatus() & IStatus::FB_HAS_ERRORS)
if (status.getState() & IStatus::STATE_ERRORS)
m_connection.raise(status, tdbb, "JBlob::putSegment");
}
@ -736,7 +736,7 @@ void InternalBlob::close(thread_db* tdbb)
m_blob->close(&statusWrapper);
}
if (status.getStatus() & IStatus::FB_HAS_ERRORS)
if (status.getState() & IStatus::STATE_ERRORS)
m_connection.raise(status, tdbb, "JBlob::close");
fb_assert(!m_blob);
@ -756,7 +756,7 @@ void InternalBlob::cancel(thread_db* tdbb)
m_blob->cancel(&statusWrapper);
}
if (status.getStatus() & IStatus::FB_HAS_ERRORS)
if (status.getState() & IStatus::STATE_ERRORS)
m_connection.raise(status, tdbb, "JBlob::cancel");
fb_assert(!m_blob);

View File

@ -141,11 +141,11 @@ void IbUtil::initialize()
#ifdef WIN_NT
// using bin folder
if (tryLibrary(fb_utils::getPrefix(IConfigManager::FB_DIR_BIN, LIBNAME), message[1]))
if (tryLibrary(fb_utils::getPrefix(IConfigManager::DIR_BIN, LIBNAME), message[1]))
return;
// using firebird root (takes into account environment settings)
if (tryLibrary(fb_utils::getPrefix(IConfigManager::FB_DIR_CONF, LIBNAME), message[2]))
if (tryLibrary(fb_utils::getPrefix(IConfigManager::DIR_CONF, LIBNAME), message[2]))
return;
#else
// using install directory
@ -153,11 +153,11 @@ void IbUtil::initialize()
return;
// using firebird root (takes into an account environment settings)
if (tryLibrary(fb_utils::getPrefix(IConfigManager::FB_DIR_CONF, "lib/" LIBNAME), message[1]))
if (tryLibrary(fb_utils::getPrefix(IConfigManager::DIR_CONF, "lib/" LIBNAME), message[1]))
return;
// using libraries directory
if (tryLibrary(fb_utils::getPrefix(IConfigManager::FB_DIR_LIB, LIBNAME), message[2]))
if (tryLibrary(fb_utils::getPrefix(IConfigManager::DIR_LIB, LIBNAME), message[2]))
return;
#endif // WIN_NT

View File

@ -413,7 +413,7 @@ static Static<EngineFactory> engineFactory;
void registerEngine(IPluginManager* iPlugin)
{
getUnloadDetector()->setCleanup(shutdownBeforeUnload);
iPlugin->registerPluginFactory(IPluginManager::Provider, CURRENT_ENGINE, &engineFactory);
iPlugin->registerPluginFactory(IPluginManager::TYPE_PROVIDER, CURRENT_ENGINE, &engineFactory);
getUnloadDetector()->registerMe();
}
@ -974,7 +974,7 @@ public:
TraceFailedConnection(const char* filename, const DatabaseOptions* options);
// TraceConnection implementation
unsigned getKind() { return TRACE_CONNECTION_DATABASE; };
unsigned getKind() { return KIND_DATABASE; };
int getProcessID() { return m_options->dpb_remote_pid; }
const char* getUserName() { return m_id.usr_user_name.c_str(); }
const char* getRoleName() { return m_options->dpb_role_name.c_str(); }
@ -1080,7 +1080,7 @@ static void successful_completion(CheckStatusWrapper* s, ISC_STATUS acceptCode =
fb_assert(status[0] != isc_arg_gds || status[1] == FB_SUCCESS || status[1] == acceptCode);
// Clear the status vector if it doesn't contain a warning
if (status[0] != isc_arg_gds || status[1] != FB_SUCCESS || !(s->getStatus() & IStatus::FB_HAS_WARNINGS))
if (status[0] != isc_arg_gds || status[1] != FB_SUCCESS || !(s->getState() & IStatus::STATE_WARNINGS))
{
s->init();
}
@ -1094,7 +1094,7 @@ ISC_STATUS transliterateException(thread_db* tdbb, const Exception& ex, IStatus*
ex.stuffException(vector);
Jrd::Attachment* attachment = tdbb->getAttachment();
if (func && attachment && attachment->att_trace_manager->needs(ITraceFactory::TRACE_EVENT_ERROR))
if (func && attachment && attachment->att_trace_manager->needs(ITraceFactory::EVENT_ERROR))
{
TraceConnectionImpl conn(attachment);
TraceStatusVectorImpl traceStatus(vector->getErrors());
@ -1205,7 +1205,7 @@ static void trace_warning(thread_db* tdbb, IStatus* userStatus, const char* func
if (!att)
return;
if (att->att_trace_manager->needs(ITraceFactory::TRACE_EVENT_ERROR))
if (att->att_trace_manager->needs(ITraceFactory::EVENT_ERROR))
{
TraceStatusVectorImpl traceStatus(userStatus->getWarnings());
@ -1230,25 +1230,25 @@ static void trace_failed_attach(TraceManager* traceManager, const char* filename
TraceStatusVectorImpl traceStatus(status);
const ntrace_result_t result = (status[1] == isc_login || status[1] == isc_no_priv) ?
ITracePlugin::TRACE_RESULT_UNAUTHORIZED : ITracePlugin::TRACE_RESULT_FAILED;
ITracePlugin::RESULT_UNAUTHORIZED : ITracePlugin::RESULT_FAILED;
const char* func = create ? "JProvider::createDatabase" : "JProvider::attachDatabase";
if (!traceManager)
{
TraceManager tempMgr(origFilename);
if (tempMgr.needs(ITraceFactory::TRACE_EVENT_ATTACH))
if (tempMgr.needs(ITraceFactory::EVENT_ATTACH))
tempMgr.event_attach(&conn, create, result);
if (tempMgr.needs(ITraceFactory::TRACE_EVENT_ERROR))
if (tempMgr.needs(ITraceFactory::EVENT_ERROR))
tempMgr.event_error(&conn, &traceStatus, func);
}
else
{
if (traceManager->needs(ITraceFactory::TRACE_EVENT_ATTACH))
if (traceManager->needs(ITraceFactory::EVENT_ATTACH))
traceManager->event_attach(&conn, create, result);
if (traceManager->needs(ITraceFactory::TRACE_EVENT_ERROR))
if (traceManager->needs(ITraceFactory::EVENT_ERROR))
traceManager->event_error(&conn, &traceStatus, func);
}
}
@ -1266,7 +1266,7 @@ JTransaction* JAttachment::getTransactionInterface(CheckStatusWrapper* status, I
// If validation is successfull, this means that this attachment and valid transaction
// use same provider. I.e. the following cast is safe.
JTransaction* jt = static_cast<JTransaction*>(tra->validate(status, this));
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
status_exception::raise(status);
if (!jt)
Arg::Gds(isc_bad_trans_handle).raise();
@ -1829,10 +1829,10 @@ JAttachment* JProvider::attachDatabase(CheckStatusWrapper* user_status, const ch
CCH_release_exclusive(tdbb);
if (attachment->att_trace_manager->needs(ITraceFactory::TRACE_EVENT_ATTACH))
if (attachment->att_trace_manager->needs(ITraceFactory::EVENT_ATTACH))
{
TraceConnectionImpl conn(attachment);
attachment->att_trace_manager->event_attach(&conn, false, ITracePlugin::TRACE_RESULT_SUCCESS);
attachment->att_trace_manager->event_attach(&conn, false, ITracePlugin::RESULT_SUCCESS);
}
attachTraced = true;
@ -1904,10 +1904,10 @@ JAttachment* JProvider::attachDatabase(CheckStatusWrapper* user_status, const ch
TraceConnectionImpl conn(attachment);
TraceStatusVectorImpl traceStatus(user_status->getErrors());
if (traceManager->needs(ITraceFactory::TRACE_EVENT_ERROR))
if (traceManager->needs(ITraceFactory::EVENT_ERROR))
traceManager->event_error(&conn, &traceStatus, "JProvider::attachDatabase");
if (traceManager->needs(ITraceFactory::TRACE_EVENT_DETACH))
if (traceManager->needs(ITraceFactory::EVENT_DETACH))
traceManager->event_detach(&conn, false);
}
else
@ -2311,13 +2311,13 @@ JRequest* JAttachment::compileRequest(CheckStatusWrapper* user_status,
JRD_compile(tdbb, getHandle(), &request, blr_length, blr, RefStrPtr(), 0, NULL, false);
stmt = request->getStatement();
trace.finish(request, ITracePlugin::TRACE_RESULT_SUCCESS);
trace.finish(request, ITracePlugin::RESULT_SUCCESS);
}
catch (const Exception& ex)
{
const ISC_STATUS exc = transliterateException(tdbb, ex, user_status, "JAttachment::compileRequest");
const bool no_priv = (exc == isc_no_priv);
trace.finish(NULL, no_priv ? ITracePlugin::TRACE_RESULT_UNAUTHORIZED : ITracePlugin::TRACE_RESULT_FAILED);
trace.finish(NULL, no_priv ? ITracePlugin::RESULT_UNAUTHORIZED : ITracePlugin::RESULT_FAILED);
return NULL;
}
@ -2752,10 +2752,10 @@ JAttachment* JProvider::createDatabase(CheckStatusWrapper* user_status, const ch
guardDbInit.leave();
// Report that we created attachment to Trace API
if (attachment->att_trace_manager->needs(ITraceFactory::TRACE_EVENT_ATTACH))
if (attachment->att_trace_manager->needs(ITraceFactory::EVENT_ATTACH))
{
TraceConnectionImpl conn(attachment);
attachment->att_trace_manager->event_attach(&conn, true, ITracePlugin::TRACE_RESULT_SUCCESS);
attachment->att_trace_manager->event_attach(&conn, true, ITracePlugin::RESULT_SUCCESS);
}
jAtt->getStable()->manualUnlock(attachment->att_flags);
@ -2998,7 +2998,7 @@ void JAttachment::dropDatabase(CheckStatusWrapper* user_status)
CCH_RELEASE(tdbb, &window);
// Notify Trace API manager about successful drop of database
if (attachment->att_trace_manager->needs(ITraceFactory::TRACE_EVENT_DETACH))
if (attachment->att_trace_manager->needs(ITraceFactory::EVENT_DETACH))
{
TraceConnectionImpl conn(attachment);
attachment->att_trace_manager->event_detach(&conn, true);
@ -3074,7 +3074,7 @@ int JBlob::getSegment(CheckStatusWrapper* user_status, unsigned int buffer_lengt
*
**************************************/
unsigned int len = 0;
int cc = IStatus::FB_ERROR;
int cc = IStatus::ERROR;
try
{
@ -3092,11 +3092,11 @@ int JBlob::getSegment(CheckStatusWrapper* user_status, unsigned int buffer_lengt
}
if (getHandle()->blb_flags & BLB_eof)
cc = IStatus::FB_NO_DATA;
cc = IStatus::NO_DATA;
else if (getHandle()->getFragmentSize())
cc = IStatus::FB_SEGMENT;
cc = IStatus::SEGMENT;
else
cc = IStatus::FB_OK;
cc = IStatus::OK;
}
catch (const Exception& ex)
{
@ -3956,13 +3956,13 @@ void JRequest::startAndSend(CheckStatusWrapper* user_status, ITransaction* tra,
JRD_start_and_send(tdbb, request, transaction, msg_type, msg_length, msg);
// Notify Trace API about blr execution
trace.finish(ITracePlugin::TRACE_RESULT_SUCCESS);
trace.finish(ITracePlugin::RESULT_SUCCESS);
}
catch (const Exception& ex)
{
const ISC_STATUS exc = transliterateException(tdbb, ex, user_status, "JRequest::startAndSend");
const bool no_priv = (exc == isc_login || exc == isc_no_priv);
trace.finish(no_priv ? ITracePlugin::TRACE_RESULT_UNAUTHORIZED : ITracePlugin::TRACE_RESULT_FAILED);
trace.finish(no_priv ? ITracePlugin::RESULT_UNAUTHORIZED : ITracePlugin::RESULT_FAILED);
return;
}
@ -4016,13 +4016,13 @@ void JRequest::start(CheckStatusWrapper* user_status, ITransaction* tra, int lev
try
{
JRD_start(tdbb, request, transaction);
trace.finish(ITracePlugin::TRACE_RESULT_SUCCESS);
trace.finish(ITracePlugin::RESULT_SUCCESS);
}
catch (const Exception& ex)
{
const ISC_STATUS exc = transliterateException(tdbb, ex, user_status, "JRequest::start");
const bool no_priv = (exc == isc_login || exc == isc_no_priv);
trace.finish(no_priv ? ITracePlugin::TRACE_RESULT_UNAUTHORIZED : ITracePlugin::TRACE_RESULT_FAILED);
trace.finish(no_priv ? ITracePlugin::RESULT_UNAUTHORIZED : ITracePlugin::RESULT_FAILED);
return;
}
@ -4527,7 +4527,7 @@ IResultSet* JAttachment::openCursor(CheckStatusWrapper* user_status, ITransactio
{
IStatement* tmpStatement = prepare(user_status, apiTra, length, string, dialect,
(outMetadata ? 0 : IStatement::PREPARE_PREFETCH_OUTPUT_PARAMETERS));
if (user_status->getStatus() & IStatus::FB_HAS_ERRORS)
if (user_status->getState() & IStatus::STATE_ERRORS)
{
return NULL;
}
@ -4535,7 +4535,7 @@ IResultSet* JAttachment::openCursor(CheckStatusWrapper* user_status, ITransactio
if (cursorName)
{
tmpStatement->setCursorName(user_status, cursorName);
if (user_status->getStatus() & IStatus::FB_HAS_ERRORS)
if (user_status->getState() & IStatus::STATE_ERRORS)
{
tmpStatement->release();
return NULL;
@ -4624,7 +4624,7 @@ int JResultSet::fetchNext(CheckStatusWrapper* user_status, void* buffer)
catch (const Exception& ex)
{
transliterateException(tdbb, ex, user_status, "JResultSet::fetchNext");
return IStatus::FB_ERROR;
return IStatus::ERROR;
}
trace_warning(tdbb, user_status, "JResultSet::fetchNext");
@ -4632,11 +4632,11 @@ int JResultSet::fetchNext(CheckStatusWrapper* user_status, void* buffer)
catch (const Exception& ex)
{
ex.stuffException(user_status);
return IStatus::FB_ERROR;
return IStatus::ERROR;
}
successful_completion(user_status);
return (state == 0) ? IStatus::FB_OK : IStatus::FB_NO_DATA;
return (state == 0) ? IStatus::OK : IStatus::NO_DATA;
}
int JResultSet::fetchPrior(CheckStatusWrapper* user_status, void* buffer)
@ -4653,7 +4653,7 @@ int JResultSet::fetchPrior(CheckStatusWrapper* user_status, void* buffer)
catch (const Exception& ex)
{
transliterateException(tdbb, ex, user_status, "JResultSet::fetchPrior");
return IStatus::FB_ERROR;
return IStatus::ERROR;
}
trace_warning(tdbb, user_status, "JResultSet::fetchPrior");
@ -4661,11 +4661,11 @@ int JResultSet::fetchPrior(CheckStatusWrapper* user_status, void* buffer)
catch (const Exception& ex)
{
ex.stuffException(user_status);
return IStatus::FB_ERROR;
return IStatus::ERROR;
}
successful_completion(user_status);
return (state == 0) ? IStatus::FB_OK : IStatus::FB_NO_DATA;
return (state == 0) ? IStatus::OK : IStatus::NO_DATA;
}
@ -4683,7 +4683,7 @@ int JResultSet::fetchFirst(CheckStatusWrapper* user_status, void* buffer)
catch (const Exception& ex)
{
transliterateException(tdbb, ex, user_status, "JResultSet::fetchFirst");
return IStatus::FB_ERROR;
return IStatus::ERROR;
}
trace_warning(tdbb, user_status, "JResultSet::fetchFirst");
@ -4691,11 +4691,11 @@ int JResultSet::fetchFirst(CheckStatusWrapper* user_status, void* buffer)
catch (const Exception& ex)
{
ex.stuffException(user_status);
return IStatus::FB_ERROR;
return IStatus::ERROR;
}
successful_completion(user_status);
return (state == 0) ? IStatus::FB_OK : IStatus::FB_NO_DATA;
return (state == 0) ? IStatus::OK : IStatus::NO_DATA;
}
@ -4713,7 +4713,7 @@ int JResultSet::fetchLast(CheckStatusWrapper* user_status, void* buffer)
catch (const Exception& ex)
{
transliterateException(tdbb, ex, user_status, "JResultSet::fetchLast");
return IStatus::FB_ERROR;
return IStatus::ERROR;
}
trace_warning(tdbb, user_status, "JResultSet::fetchLast");
@ -4721,11 +4721,11 @@ int JResultSet::fetchLast(CheckStatusWrapper* user_status, void* buffer)
catch (const Exception& ex)
{
ex.stuffException(user_status);
return IStatus::FB_ERROR;
return IStatus::ERROR;
}
successful_completion(user_status);
return (state == 0) ? IStatus::FB_OK : IStatus::FB_NO_DATA;
return (state == 0) ? IStatus::OK : IStatus::NO_DATA;
}
@ -4743,7 +4743,7 @@ int JResultSet::fetchAbsolute(CheckStatusWrapper* user_status, int position, voi
catch (const Exception& ex)
{
transliterateException(tdbb, ex, user_status, "JResultSet::fetchAbsolute");
return IStatus::FB_ERROR;
return IStatus::ERROR;
}
trace_warning(tdbb, user_status, "JResultSet::fetchAbsolute");
@ -4751,11 +4751,11 @@ int JResultSet::fetchAbsolute(CheckStatusWrapper* user_status, int position, voi
catch (const Exception& ex)
{
ex.stuffException(user_status);
return IStatus::FB_ERROR;
return IStatus::ERROR;
}
successful_completion(user_status);
return (state == 0) ? IStatus::FB_OK : IStatus::FB_NO_DATA;
return (state == 0) ? IStatus::OK : IStatus::NO_DATA;
}
@ -4773,7 +4773,7 @@ int JResultSet::fetchRelative(CheckStatusWrapper* user_status, int offset, void*
catch (const Exception& ex)
{
transliterateException(tdbb, ex, user_status, "JResultSet::fetchRelative");
return IStatus::FB_ERROR;
return IStatus::ERROR;
}
trace_warning(tdbb, user_status, "JResultSet::fetchRelative");
@ -4781,11 +4781,11 @@ int JResultSet::fetchRelative(CheckStatusWrapper* user_status, int offset, void*
catch (const Exception& ex)
{
ex.stuffException(user_status);
return IStatus::FB_ERROR;
return IStatus::ERROR;
}
successful_completion(user_status);
return (state == 0) ? IStatus::FB_OK : IStatus::FB_NO_DATA;
return (state == 0) ? IStatus::OK : IStatus::NO_DATA;
}
@ -5275,7 +5275,7 @@ void JRD_print_procedure_info(thread_db* tdbb, const char* mesg)
******************************************************/
TEXT fname[MAXPATHLEN];
Firebird::string fname = fb_utils::getPrefix(IConfigManager::FB_DIR_LOG, "proc_info.log");
Firebird::string fname = fb_utils::getPrefix(IConfigManager::DIR_LOG, "proc_info.log");
FILE* fptr = os_utils::fopen(fname.c_str(), "a+");
if (!fptr)
{
@ -6995,7 +6995,7 @@ static void purge_attachment(thread_db* tdbb, StableAttachmentPart* sAtt, unsign
}
// Notify Trace API manager about disconnect
if (attachment->att_trace_manager->needs(ITraceFactory::TRACE_EVENT_DETACH))
if (attachment->att_trace_manager->needs(ITraceFactory::EVENT_DETACH))
{
TraceConnectionImpl conn(attachment);
attachment->att_trace_manager->event_detach(&conn, false);

View File

@ -613,7 +613,7 @@ public:
~ThreadContextHolder()
{
unsigned l = fb_utils::statusLength(context.tdbb_status_vector);
if (externStatus && (!(externStatus->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)) &&
if (externStatus && (!(externStatus->getState() & Firebird::IStatus::STATE_ERRORS)) &&
(l > 2 || context.tdbb_status_vector[1]))
{
fb_utils::setIStatus(externStatus, context.tdbb_status_vector);

View File

@ -115,7 +115,7 @@ void ProcedureScan::open(thread_db* tdbb) const
if (iml)
EXE_send(tdbb, proc_request, 0, iml, im);
trace.finish(true, ITracePlugin::TRACE_RESULT_SUCCESS);
trace.finish(true, ITracePlugin::RESULT_SUCCESS);
}
catch (const Exception&)
{
@ -205,19 +205,19 @@ bool ProcedureScan::getRecord(thread_db* tdbb) const
if (!eos)
{
trace.fetch(true, ITracePlugin::TRACE_RESULT_SUCCESS);
trace.fetch(true, ITracePlugin::RESULT_SUCCESS);
rpb->rpb_number.setValid(false);
return false;
}
}
catch (const Exception&)
{
trace.fetch(true, ITracePlugin::TRACE_RESULT_FAILED);
trace.fetch(true, ITracePlugin::RESULT_FAILED);
close(tdbb);
throw;
}
trace.fetch(false, ITracePlugin::TRACE_RESULT_SUCCESS);
trace.fetch(false, ITracePlugin::RESULT_SUCCESS);
for (unsigned i = 0; i < rec_format->fmt_count; i++)
{

View File

@ -877,14 +877,14 @@ Service::Service(const TEXT* service_name, USHORT spb_length, const UCHAR* spb_d
else
trace_manager = FB_NEW(*getDefaultMemoryPool()) TraceManager(this);
if (trace_manager->needs(ITraceFactory::TRACE_EVENT_SERVICE_ATTACH))
if (trace_manager->needs(ITraceFactory::EVENT_SERVICE_ATTACH))
{
const ISC_STATUS exc = ex.stuff_exception(status_vector);
const bool no_priv = (exc == isc_login || exc == isc_no_priv);
TraceServiceImpl service(this);
trace_manager->event_service_attach(&service,
no_priv ? ITracePlugin::TRACE_RESULT_UNAUTHORIZED : ITracePlugin::TRACE_RESULT_FAILED);
no_priv ? ITracePlugin::RESULT_UNAUTHORIZED : ITracePlugin::RESULT_FAILED);
}
if (!hasTrace)
@ -898,10 +898,10 @@ Service::Service(const TEXT* service_name, USHORT spb_length, const UCHAR* spb_d
throw;
}
if (svc_trace_manager->needs(ITraceFactory::TRACE_EVENT_SERVICE_ATTACH))
if (svc_trace_manager->needs(ITraceFactory::EVENT_SERVICE_ATTACH))
{
TraceServiceImpl service(this);
svc_trace_manager->event_service_attach(&service, ITracePlugin::TRACE_RESULT_SUCCESS);
svc_trace_manager->event_service_attach(&service, ITracePlugin::RESULT_SUCCESS);
}
}
@ -932,7 +932,7 @@ void Service::detach()
const bool localDoShutdown = svc_do_shutdown;
TraceServiceImpl service(this);
svc_trace_manager->event_service_detach(&service, ITracePlugin::TRACE_RESULT_SUCCESS);
svc_trace_manager->event_service_detach(&service, ITracePlugin::RESULT_SUCCESS);
// Mark service as detached.
finish(SVC_detached);
@ -1535,11 +1535,11 @@ ISC_STATUS Service::query2(thread_db* /*tdbb*/,
INF_put_item(isc_info_length, length2, buffer, start_info, end, true);
}
if (svc_trace_manager->needs(ITraceFactory::TRACE_EVENT_SERVICE_QUERY))
if (svc_trace_manager->needs(ITraceFactory::EVENT_SERVICE_QUERY))
{
TraceServiceImpl service(this);
svc_trace_manager->event_service_query(&service, send_item_length, send_items,
recv_item_length, recv_items, ITracePlugin::TRACE_RESULT_SUCCESS);
recv_item_length, recv_items, ITracePlugin::RESULT_SUCCESS);
}
if (!requestFromPut)
@ -1569,7 +1569,7 @@ ISC_STATUS Service::query2(thread_db* /*tdbb*/,
{
ISC_STATUS_ARRAY status_vector;
if (svc_trace_manager->needs(ITraceFactory::TRACE_EVENT_SERVICE_QUERY))
if (svc_trace_manager->needs(ITraceFactory::EVENT_SERVICE_QUERY))
{
const ISC_STATUS exc = ex.stuff_exception(status_vector);
const bool no_priv = (exc == isc_login || exc == isc_no_priv ||
@ -1578,7 +1578,7 @@ ISC_STATUS Service::query2(thread_db* /*tdbb*/,
TraceServiceImpl service(this);
svc_trace_manager->event_service_query(&service, send_item_length, send_items,
recv_item_length, recv_items,
(no_priv ? ITracePlugin::TRACE_RESULT_UNAUTHORIZED : ITracePlugin::TRACE_RESULT_FAILED));
(no_priv ? ITracePlugin::RESULT_UNAUTHORIZED : ITracePlugin::RESULT_FAILED));
}
throw;
}
@ -1952,7 +1952,7 @@ void Service::query(USHORT send_item_length,
{
ISC_STATUS_ARRAY status_vector;
if (svc_trace_manager->needs(ITraceFactory::TRACE_EVENT_SERVICE_QUERY))
if (svc_trace_manager->needs(ITraceFactory::EVENT_SERVICE_QUERY))
{
const ISC_STATUS exc = ex.stuff_exception(status_vector);
const bool no_priv = (exc == isc_login || exc == isc_no_priv);
@ -1961,7 +1961,7 @@ void Service::query(USHORT send_item_length,
TraceServiceImpl service(this);
svc_trace_manager->event_service_query(&service, send_item_length, send_items,
recv_item_length, recv_items,
(no_priv ? ITracePlugin::TRACE_RESULT_UNAUTHORIZED : ITracePlugin::TRACE_RESULT_FAILED));
(no_priv ? ITracePlugin::RESULT_UNAUTHORIZED : ITracePlugin::RESULT_FAILED));
}
throw;
}
@ -1969,11 +1969,11 @@ void Service::query(USHORT send_item_length,
if (svc_flags & SVC_finished)
{
if ((svc_flags & SVC_detached) &&
svc_trace_manager->needs(ITraceFactory::TRACE_EVENT_SERVICE_QUERY))
svc_trace_manager->needs(ITraceFactory::EVENT_SERVICE_QUERY))
{
TraceServiceImpl service(this);
svc_trace_manager->event_service_query(&service, send_item_length, send_items,
recv_item_length, recv_items, ITracePlugin::TRACE_RESULT_SUCCESS);
recv_item_length, recv_items, ITracePlugin::RESULT_SUCCESS);
}
}
}
@ -2171,7 +2171,7 @@ void Service::start(USHORT spb_length, const UCHAR* spb_data)
} // try
catch (const Firebird::Exception& ex)
{
if (svc_trace_manager->needs(ITraceFactory::TRACE_EVENT_SERVICE_START))
if (svc_trace_manager->needs(ITraceFactory::EVENT_SERVICE_START))
{
ISC_STATUS_ARRAY status_vector;
const ISC_STATUS exc = ex.stuff_exception(status_vector);
@ -2180,17 +2180,17 @@ void Service::start(USHORT spb_length, const UCHAR* spb_data)
TraceServiceImpl service(this);
svc_trace_manager->event_service_start(&service,
this->svc_switches.length(), this->svc_switches.c_str(),
no_priv ? ITracePlugin::TRACE_RESULT_UNAUTHORIZED : ITracePlugin::TRACE_RESULT_FAILED);
no_priv ? ITracePlugin::RESULT_UNAUTHORIZED : ITracePlugin::RESULT_FAILED);
}
throw;
}
if (this->svc_trace_manager->needs(ITraceFactory::TRACE_EVENT_SERVICE_START))
if (this->svc_trace_manager->needs(ITraceFactory::EVENT_SERVICE_START))
{
TraceServiceImpl service(this);
this->svc_trace_manager->event_service_start(&service,
this->svc_switches.length(), this->svc_switches.c_str(),
this->svc_status[1] ? ITracePlugin::TRACE_RESULT_FAILED : ITracePlugin::TRACE_RESULT_SUCCESS);
this->svc_status[1] ? ITracePlugin::RESULT_FAILED : ITracePlugin::RESULT_SUCCESS);
}
}
@ -2206,7 +2206,7 @@ void Service::readFbLog()
{
bool svc_started = false;
Firebird::PathName name = fb_utils::getPrefix(IConfigManager::FB_DIR_LOG, LOGFILE);
Firebird::PathName name = fb_utils::getPrefix(IConfigManager::DIR_LOG, LOGFILE);
FILE* file = os_utils::fopen(name.c_str(), "r");
try

View File

@ -362,7 +362,7 @@ void TRA_commit(thread_db* tdbb, jrd_tra* transaction, const bool retaining_flag
transaction->tra_save_point = next;
}
trace.finish(ITracePlugin::TRACE_RESULT_SUCCESS);
trace.finish(ITracePlugin::RESULT_SUCCESS);
return;
}
@ -384,7 +384,7 @@ void TRA_commit(thread_db* tdbb, jrd_tra* transaction, const bool retaining_flag
LocalStatus s;
secContext->tra->commit(&s);
if (s.getStatus() & IStatus::FB_HAS_ERRORS)
if (s.getState() & IStatus::STATE_ERRORS)
status_exception::raise(&s);
secContext->tra = NULL;
@ -412,7 +412,7 @@ void TRA_commit(thread_db* tdbb, jrd_tra* transaction, const bool retaining_flag
if (retaining_flag)
{
trace.finish(ITracePlugin::TRACE_RESULT_SUCCESS);
trace.finish(ITracePlugin::RESULT_SUCCESS);
retain_context(tdbb, transaction, true, tra_committed);
return;
}
@ -981,7 +981,7 @@ void TRA_prepare(thread_db* tdbb, jrd_tra* transaction, USHORT length, const UCH
{
LocalStatus s;
secContext->tra->prepare(&s, length, msg);
if (s.getStatus() & IStatus::FB_HAS_ERRORS)
if (s.getState() & IStatus::STATE_ERRORS)
status_exception::raise(&s);
}
@ -1192,7 +1192,7 @@ void TRA_release_transaction(thread_db* tdbb, jrd_tra* transaction, Jrd::TraceTr
TRA_precommited(tdbb, transaction->tra_number, 0);
if (trace)
trace->finish(ITracePlugin::TRACE_RESULT_SUCCESS);
trace->finish(ITracePlugin::RESULT_SUCCESS);
// Unlink the transaction from the database block
@ -1378,7 +1378,7 @@ void TRA_rollback(thread_db* tdbb, jrd_tra* transaction, const bool retaining_fl
if (retaining_flag)
{
trace.finish(ITracePlugin::TRACE_RESULT_SUCCESS);
trace.finish(ITracePlugin::RESULT_SUCCESS);
retain_context(tdbb, transaction, false, state);
return;
}
@ -1577,12 +1577,12 @@ jrd_tra* TRA_start(thread_db* tdbb, ULONG flags, SSHORT lock_timeout, Jrd::jrd_t
throw;
}
if (attachment->att_trace_manager->needs(ITraceFactory::TRACE_EVENT_TRANSACTION_START))
if (attachment->att_trace_manager->needs(ITraceFactory::EVENT_TRANSACTION_START))
{
TraceConnectionImpl conn(attachment);
TraceTransactionImpl tran(transaction);
attachment->att_trace_manager->event_transaction_start(&conn,
&tran, 0, NULL, ITracePlugin::TRACE_RESULT_SUCCESS);
&tran, 0, NULL, ITracePlugin::RESULT_SUCCESS);
}
return transaction;
@ -1628,12 +1628,12 @@ jrd_tra* TRA_start(thread_db* tdbb, int tpb_length, const UCHAR* tpb, Jrd::jrd_t
throw;
}
if (attachment->att_trace_manager->needs(ITraceFactory::TRACE_EVENT_TRANSACTION_START))
if (attachment->att_trace_manager->needs(ITraceFactory::EVENT_TRANSACTION_START))
{
TraceConnectionImpl conn(attachment);
TraceTransactionImpl tran(transaction);
attachment->att_trace_manager->event_transaction_start(&conn,
&tran, tpb_length, tpb, ITracePlugin::TRACE_RESULT_SUCCESS);
&tran, tpb_length, tpb, ITracePlugin::RESULT_SUCCESS);
}
return transaction;
@ -3477,7 +3477,7 @@ TraceSweepEvent::TraceSweepEvent(thread_db* tdbb)
TraceManager* trace_mgr = att->att_trace_manager;
m_need_trace = trace_mgr->needs(ITraceFactory::TRACE_EVENT_SWEEP);
m_need_trace = trace_mgr->needs(ITraceFactory::EVENT_SWEEP);
if (!m_need_trace)
return;

View File

@ -62,7 +62,7 @@ public:
~TraceDSQLPrepare()
{
prepare(ITracePlugin::TRACE_RESULT_FAILED);
prepare(ITracePlugin::RESULT_FAILED);
}
void setStatement(dsql_req* request)
@ -82,7 +82,7 @@ public:
const SINT64 millis = (fb_utils::query_performance_counter() - m_start_clock) * 1000 /
fb_utils::query_performance_frequency();
if ((result == ITracePlugin::TRACE_RESULT_SUCCESS) && m_request)
if ((result == ITracePlugin::RESULT_SUCCESS) && m_request)
{
TraceSQLStatementImpl stmt(m_request, NULL);
TraceManager::event_dsql_prepare(m_attachment, m_transaction, &stmt, millis, result);
@ -121,7 +121,7 @@ public:
{ // scope
TraceSQLStatementImpl stmt(request, NULL);
TraceManager::event_dsql_execute(m_attachment, request->req_transaction, &stmt, true,
ITracePlugin::TRACE_RESULT_SUCCESS);
ITracePlugin::RESULT_SUCCESS);
}
m_start_clock = fb_utils::query_performance_counter();
@ -164,7 +164,7 @@ public:
~TraceDSQLExecute()
{
finish(false, ITracePlugin::TRACE_RESULT_FAILED);
finish(false, ITracePlugin::RESULT_FAILED);
}
private:
@ -195,7 +195,7 @@ public:
~TraceDSQLFetch()
{
fetch(true, ITracePlugin::TRACE_RESULT_FAILED);
fetch(true, ITracePlugin::RESULT_FAILED);
}
void fetch(bool eof, ntrace_result_t result)

View File

@ -46,7 +46,7 @@ public:
m_baseline(NULL)
{
Attachment* attachment = m_transaction->tra_attachment;
m_need_trace = attachment->att_trace_manager->needs(ITraceFactory::TRACE_EVENT_TRANSACTION_END);
m_need_trace = attachment->att_trace_manager->needs(ITraceFactory::EVENT_TRANSACTION_END);
if (!m_need_trace)
return;
@ -57,7 +57,7 @@ public:
~TraceTransactionEnd()
{
finish(ITracePlugin::TRACE_RESULT_FAILED);
finish(ITracePlugin::RESULT_FAILED);
}
void finish(ntrace_result_t result)
@ -97,7 +97,7 @@ public:
m_request(request)
{
TraceManager* trace_mgr = m_tdbb->getAttachment()->att_trace_manager;
m_need_trace = trace_mgr->needs(ITraceFactory::TRACE_EVENT_PROC_EXECUTE);
m_need_trace = trace_mgr->needs(ITraceFactory::EVENT_PROC_EXECUTE);
if (!m_need_trace)
return;
@ -109,7 +109,7 @@ public:
TraceTransactionImpl tran(m_tdbb->getTransaction());
TraceProcedureImpl proc(m_request, NULL);
trace_mgr->event_proc_execute(&conn, &tran, &proc, true, ITracePlugin::TRACE_RESULT_SUCCESS);
trace_mgr->event_proc_execute(&conn, &tran, &proc, true, ITracePlugin::RESULT_SUCCESS);
}
m_start_clock = fb_utils::query_performance_counter();
@ -125,7 +125,7 @@ public:
~TraceProcExecute()
{
finish(false, ITracePlugin::TRACE_RESULT_FAILED);
finish(false, ITracePlugin::RESULT_FAILED);
}
void finish(bool have_cursor, ntrace_result_t result)
@ -172,7 +172,7 @@ public:
{
TraceManager* trace_mgr = m_tdbb->getAttachment()->att_trace_manager;
m_need_trace = (request->req_flags & req_proc_fetch) &&
trace_mgr->needs(ITraceFactory::TRACE_EVENT_PROC_EXECUTE);
trace_mgr->needs(ITraceFactory::EVENT_PROC_EXECUTE);
if (!m_need_trace)
return;
@ -182,7 +182,7 @@ public:
~TraceProcFetch()
{
fetch(true, ITracePlugin::TRACE_RESULT_FAILED);
fetch(true, ITracePlugin::RESULT_FAILED);
}
void fetch(bool eof, ntrace_result_t result)
@ -236,7 +236,7 @@ public:
m_inMsgLength(inMsgLength)
{
TraceManager* trace_mgr = m_tdbb->getAttachment()->att_trace_manager;
m_need_trace = trace_mgr->needs(ITraceFactory::TRACE_EVENT_FUNC_EXECUTE);
m_need_trace = trace_mgr->needs(ITraceFactory::EVENT_FUNC_EXECUTE);
if (!m_need_trace)
return;
@ -252,7 +252,7 @@ public:
m_inMsg, m_inMsgLength);
TraceFunctionImpl func(m_request, inputs, NULL, NULL);
trace_mgr->event_func_execute(&conn, &tran, &func, true, ITracePlugin::TRACE_RESULT_SUCCESS);
trace_mgr->event_func_execute(&conn, &tran, &func, true, ITracePlugin::RESULT_SUCCESS);
}
m_start_clock = fb_utils::query_performance_counter();
@ -268,7 +268,7 @@ public:
~TraceFuncExecute()
{
finish(ITracePlugin::TRACE_RESULT_FAILED);
finish(ITracePlugin::RESULT_FAILED);
}
void finish(ntrace_result_t result, const dsc* value = NULL)
@ -319,7 +319,7 @@ public:
{
TraceManager* trace_mgr = m_tdbb->getAttachment()->att_trace_manager;
m_need_trace = !(m_request->getStatement()->flags & JrdStatement::FLAG_SYS_TRIGGER) &&
trace_mgr->needs(ITraceFactory::TRACE_EVENT_TRIGGER_EXECUTE);
trace_mgr->needs(ITraceFactory::EVENT_TRIGGER_EXECUTE);
if (!m_need_trace)
return;
@ -329,7 +329,7 @@ public:
TraceTransactionImpl tran(m_tdbb->getTransaction());
TraceTriggerImpl trig(m_request, m_which_trig, NULL);
trace_mgr->event_trigger_execute(&conn, &tran, &trig, true, ITracePlugin::TRACE_RESULT_SUCCESS);
trace_mgr->event_trigger_execute(&conn, &tran, &trig, true, ITracePlugin::RESULT_SUCCESS);
}
fb_assert(!m_request->req_fetch_baseline);
@ -362,7 +362,7 @@ public:
~TraceTrigExecute()
{
finish(ITracePlugin::TRACE_RESULT_FAILED);
finish(ITracePlugin::RESULT_FAILED);
}
private:
@ -384,7 +384,7 @@ public:
{
Attachment* attachment = m_tdbb->getAttachment();
m_need_trace = attachment->att_trace_manager->needs(ITraceFactory::TRACE_EVENT_BLR_COMPILE) &&
m_need_trace = attachment->att_trace_manager->needs(ITraceFactory::EVENT_BLR_COMPILE) &&
m_blr_length && m_blr && !attachment->isUtility();
if (!m_need_trace)
@ -423,7 +423,7 @@ public:
~TraceBlrCompile()
{
finish(NULL, ITracePlugin::TRACE_RESULT_FAILED);
finish(NULL, ITracePlugin::RESULT_FAILED);
}
private:
@ -445,7 +445,7 @@ public:
Attachment* attachment = m_tdbb->getAttachment();
JrdStatement* statement = m_request->getStatement();
m_need_trace = attachment->att_trace_manager->needs(ITraceFactory::TRACE_EVENT_BLR_EXECUTE) &&
m_need_trace = attachment->att_trace_manager->needs(ITraceFactory::EVENT_BLR_EXECUTE) &&
!statement->sqlText &&
!(statement->flags & JrdStatement::FLAG_INTERNAL) &&
!attachment->isUtility();
@ -485,7 +485,7 @@ public:
~TraceBlrExecute()
{
finish(ITracePlugin::TRACE_RESULT_FAILED);
finish(ITracePlugin::RESULT_FAILED);
}
private:

View File

@ -136,7 +136,7 @@ void TraceManager::load_plugins()
init_factories = true;
factories = FB_NEW(*getDefaultMemoryPool()) TraceManager::Factories(*getDefaultMemoryPool());
for (GetPlugins<ITraceFactory> traceItr(IPluginManager::Trace); traceItr.hasData(); traceItr.next())
for (GetPlugins<ITraceFactory> traceItr(IPluginManager::TYPE_TRACE); traceItr.hasData(); traceItr.next())
{
FactoryInfo info;
info.factory = traceItr.plugin();
@ -257,7 +257,7 @@ void TraceManager::update_session(const TraceSession& session)
trace_needs |= info->factory->trace_needs();
}
else if (status.getStatus() & IStatus::FB_HAS_ERRORS)
else if (status.getState() & IStatus::STATE_ERRORS)
{
string header;
header.printf("Trace plugin %s returned error on call trace_create.", info->name);
@ -268,17 +268,17 @@ void TraceManager::update_session(const TraceSession& session)
bool TraceManager::need_dsql_prepare(Attachment* att)
{
return att->att_trace_manager->needs(ITraceFactory::TRACE_EVENT_DSQL_PREPARE);
return att->att_trace_manager->needs(ITraceFactory::EVENT_DSQL_PREPARE);
}
bool TraceManager::need_dsql_free(Attachment* att)
{
return att->att_trace_manager->needs(ITraceFactory::TRACE_EVENT_DSQL_FREE);
return att->att_trace_manager->needs(ITraceFactory::EVENT_DSQL_FREE);
}
bool TraceManager::need_dsql_execute(Attachment* att)
{
return att->att_trace_manager->needs(ITraceFactory::TRACE_EVENT_DSQL_EXECUTE);
return att->att_trace_manager->needs(ITraceFactory::EVENT_DSQL_EXECUTE);
}
void TraceManager::event_dsql_prepare(Attachment* att, jrd_tra* transaction,

View File

@ -62,7 +62,7 @@ namespace Jrd {
unsigned TraceConnectionImpl::getKind()
{
return TRACE_CONNECTION_DATABASE;
return KIND_DATABASE;
}
int TraceConnectionImpl::getConnectionID()
@ -142,20 +142,20 @@ unsigned TraceTransactionImpl::getIsolation()
switch (m_tran->tra_flags & (TRA_read_committed | TRA_rec_version | TRA_degree3))
{
case TRA_degree3:
return TRA_ISO_CONSISTENCY;
return ISOLATION_CONSISTENCY;
case TRA_read_committed:
return TRA_ISO_READ_COMMITTED_NORECVER;
return ISOLATION_READ_COMMITTED_NORECVER;
case TRA_read_committed | TRA_rec_version:
return TRA_ISO_READ_COMMITTED_RECVER;
return ISOLATION_READ_COMMITTED_RECVER;
case 0:
return TRA_ISO_CONCURRENCY;
return ISOLATION_CONCURRENCY;
default:
fb_assert(false);
return TRA_ISO_CONCURRENCY;
return ISOLATION_CONCURRENCY;
}
}
@ -523,7 +523,7 @@ const char* TraceServiceImpl::getServiceName()
unsigned TraceServiceImpl::getKind()
{
return TRACE_CONNECTION_SERVICE;
return KIND_SERVICE;
}
int TraceServiceImpl::getProcessID()

View File

@ -164,7 +164,7 @@ namespace
void registerArc4(IPluginManager* iPlugin)
{
iPlugin->registerPluginFactory(IPluginManager::WireCrypt, "Arc4", &factory);
iPlugin->registerPluginFactory(IPluginManager::TYPE_WIRE_CRYPT, "Arc4", &factory);
}
} // namespace Crypt

View File

@ -586,7 +586,7 @@ UdrPluginImpl* Engine::loadModule(ThrowStatusWrapper* status, IRoutineMetadata*
UdrPluginImpl* udrPlugin = new UdrPluginImpl(*moduleName, module);
udrPlugin->theirUnloadFlag = entryPoint(status, &udrPlugin->myUnloadFlag, udrPlugin);
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
{
delete udrPlugin;
ThrowStatusWrapper::checkException(status);
@ -767,7 +767,7 @@ extern "C" void FB_EXPORTED FB_PLUGIN_ENTRY_POINT(IMaster* master)
CachedMasterInterface::set(master);
PluginManagerInterfacePtr pi;
pi->registerPluginFactory(IPluginManager::ExternalEngine, "UDR", &factory);
pi->registerPluginFactory(IPluginManager::TYPE_EXTERNAL_ENGINE, "UDR", &factory);
getUnloadDetector()->registerMe();
}

View File

@ -89,7 +89,7 @@ void HELP_help( qli_syntax* node)
**************************************/
if (!HELP_DB)
{
Firebird::PathName name = fb_utils::getPrefix(Firebird::IConfigManager::FB_DIR_HELP, TARGET);
Firebird::PathName name = fb_utils::getPrefix(Firebird::IConfigManager::DIR_HELP, TARGET);
TEXT target[MAXPATHLEN];
name.copyTo(target, sizeof target);
READY

View File

@ -648,8 +648,8 @@ namespace {
void registerRedirector(Firebird::IPluginManager* iPlugin)
{
iPlugin->registerPluginFactory(IPluginManager::Provider, "Remote", &remoteFactory);
iPlugin->registerPluginFactory(IPluginManager::Provider, "Loopback", &loopbackFactory);
iPlugin->registerPluginFactory(IPluginManager::TYPE_PROVIDER, "Remote", &remoteFactory);
iPlugin->registerPluginFactory(IPluginManager::TYPE_PROVIDER, "Loopback", &loopbackFactory);
Auth::registerLegacyClient(iPlugin);
Auth::registerSrpClient(iPlugin);
@ -1586,7 +1586,7 @@ void Attachment::freeClientData(IStatus* status, bool force)
// free the packet and disconnect the port. Put something into firebird.log
// informing the user of the following.
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
iscLogStatus("REMOTE INTERFACE/gds__detach: Unsuccesful detach from "
"database.\n\tUncommitted work may have been lost.", status);
@ -1885,7 +1885,7 @@ ResultSet* Statement::openCursor(CheckStatusWrapper* status, Firebird::ITransact
if (!outFormat)
{
defaultOutputFormat.assignRefNoIncr(this->getOutputMetadata(status));
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
return NULL;
}
@ -1991,13 +1991,13 @@ IResultSet* Attachment::openCursor(CheckStatusWrapper* status, ITransaction* tra
{
Statement* stmt = prepare(status, transaction, stmtLength, sqlStmt, dialect,
(outMetadata ? 0 : IStatement::PREPARE_PREFETCH_OUTPUT_PARAMETERS));
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
return NULL;
}
ResultSet* rc = stmt->openCursor(status, transaction, inMetadata, inBuffer, outMetadata, cursorFlags);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
stmt->release();
return NULL;
@ -2006,7 +2006,7 @@ IResultSet* Attachment::openCursor(CheckStatusWrapper* status, ITransaction* tra
if (cursorName)
{
stmt->setCursorName(status, cursorName);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
rc->release();
stmt->release();
@ -2469,7 +2469,7 @@ Statement* Attachment::prepare(CheckStatusWrapper* status, ITransaction* apiTra,
}
response->p_resp_data = temp;
if (!(status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status->getState() & Firebird::IStatus::STATE_ERRORS))
{
return stmt;
}
@ -2935,7 +2935,7 @@ int ResultSet::fetchNext(CheckStatusWrapper* status, void* buffer)
//statement->rsr_flags.clear(Rsr::EOF_SET);
statement->rsr_flags.set(Rsr::PAST_EOF);
return IStatus::FB_NO_DATA;
return IStatus::NO_DATA;
}
if (statement->rsr_flags.test(Rsr::STREAM_ERR))
@ -2973,13 +2973,13 @@ int ResultSet::fetchNext(CheckStatusWrapper* status, void* buffer)
}
message->msg_address = NULL;
return IStatus::FB_OK;
return IStatus::OK;
}
catch (const Exception& ex)
{
ex.stuffException(status);
}
return IStatus::FB_ERROR;
return IStatus::ERROR;
}
@ -3368,7 +3368,7 @@ int Blob::getSegment(CheckStatusWrapper* status, unsigned int bufferLength, void
response->p_resp_data = temp;
if (segmentLength)
*segmentLength = response->p_resp_data.cstr_length;
return IStatus::FB_OK;
return IStatus::OK;
}
// New protocol -- ask for a 1K chunk of blob and
@ -3385,14 +3385,14 @@ int Blob::getSegment(CheckStatusWrapper* status, unsigned int bufferLength, void
{
if (segmentLength)
*segmentLength = length;
return IStatus::FB_NO_DATA;
return IStatus::NO_DATA;
}
// Here's the loop, passing out data from our basket & refilling it.
// Our buffer (described by the structure blob) is counted strings
// <count word> <string> <count word> <string>...
int code = IStatus::FB_OK;
int code = IStatus::OK;
while (true)
{
// If there's data to be given away, give some away (p points to the local data)
@ -3422,7 +3422,7 @@ int Blob::getSegment(CheckStatusWrapper* status, unsigned int bufferLength, void
{
blob->rbl_fragment_length = l - bufferLength;
l = bufferLength;
code = IStatus::FB_SEGMENT;
code = IStatus::SEGMENT;
}
// and, just for yucks, see if we're exactly using up the fragment
@ -3431,7 +3431,7 @@ int Blob::getSegment(CheckStatusWrapper* status, unsigned int bufferLength, void
if (l == bufferLength && l == blob->rbl_length && (blob->rbl_flags & Rbl::SEGMENT))
{
code = IStatus::FB_SEGMENT;
code = IStatus::SEGMENT;
}
// finally set up the return length, decrement the current length,
@ -3463,7 +3463,7 @@ int Blob::getSegment(CheckStatusWrapper* status, unsigned int bufferLength, void
if (blob->rbl_flags & Rbl::EOF_PENDING)
{
blob->rbl_flags |= Rbl::EOF_SET;
code = IStatus::FB_NO_DATA;
code = IStatus::NO_DATA;
break;
}
@ -3529,7 +3529,7 @@ int Blob::getSegment(CheckStatusWrapper* status, unsigned int bufferLength, void
ex.stuffException(status);
}
return IStatus::FB_ERROR;
return IStatus::ERROR;
}
@ -5305,7 +5305,7 @@ static void authenticateStep0(ClntAuthBlock& cBlock)
case IAuth::AUTH_MORE_DATA:
return;
case IAuth::AUTH_FAILED:
if (s.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (s.getState() & Firebird::IStatus::STATE_ERRORS)
{
iscLogStatus("Authentication, client plugin:", &s);
}
@ -5338,7 +5338,7 @@ static void secureAuthentication(ClntAuthBlock& cBlock, rem_port* port)
LocalStatus st;
authReceiveResponse(true, cBlock, port, rdb, &st, packet, true);
if (st.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (st.getState() & Firebird::IStatus::STATE_ERRORS)
status_exception::raise(&st);
}
}
@ -7434,7 +7434,7 @@ ClntAuthBlock::ClntAuthBlock(const Firebird::PathName* fileName, Firebird::Clump
userName(getPool()), password(getPool()),
dataForPlugin(getPool()), dataFromPlugin(getPool()),
cryptKeys(getPool()), dpbConfig(getPool()),
hasCryptKey(false), plugins(IPluginManager::AuthClient),
hasCryptKey(false), plugins(IPluginManager::TYPE_AUTH_CLIENT),
authComplete(false), firstTime(true)
{
if (dpb && tags && dpb->find(tags->config_text))

View File

@ -2777,7 +2777,7 @@ static bool packet_receive(rem_port* port, UCHAR* buffer, SSHORT buffer_length,
if (n > 0 && port->port_crypt_plugin)
{
port->port_crypt_plugin->decrypt(&st, n, buffer, buffer);
if (st.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (st.getState() & Firebird::IStatus::STATE_ERRORS)
{
status_exception::raise(&st);
}
@ -2860,7 +2860,7 @@ static bool packet_send( rem_port* port, const SCHAR* buffer, SSHORT buffer_leng
char* d = b.getBuffer(buffer_length);
port->port_crypt_plugin->encrypt(&st, buffer_length, data, d);
if (st.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (st.getState() & Firebird::IStatus::STATE_ERRORS)
{
status_exception::raise(&st);
}

View File

@ -1332,7 +1332,7 @@ static bool packet_receive(rem_port* port, UCHAR* buffer, SSHORT buffer_length,
{
LocalStatus st;
port->port_crypt_plugin->decrypt(&st, n, buffer, buffer);
if (st.getStatus() & IStatus::FB_HAS_ERRORS)
if (st.getState() & IStatus::STATE_ERRORS)
{
status_exception::raise(&st);
}
@ -1374,7 +1374,7 @@ static bool packet_send( rem_port* port, const SCHAR* buffer, SSHORT buffer_leng
char* d = b.getBuffer(buffer_length);
port->port_crypt_plugin->encrypt(&st, buffer_length, data, d);
if (st.getStatus() & IStatus::FB_HAS_ERRORS)
if (st.getState() & IStatus::STATE_ERRORS)
{
status_exception::raise(&st);
}

View File

@ -992,7 +992,7 @@ void ClntAuthBlock::resetClnt(const Firebird::PathName* fileName, const CSTRING*
firstTime = true;
clntConfig = REMOTE_get_config(fileName, &dpbConfig);
pluginList = clntConfig->getPlugins(Firebird::IPluginManager::AuthClient);
pluginList = clntConfig->getPlugins(Firebird::IPluginManager::TYPE_AUTH_CLIENT);
Firebird::PathName final;
if (serverPluginList.hasData())
@ -1264,14 +1264,14 @@ bool rem_port::tryKeyType(const KnownServerKey& srvKey, InternalCryptKey* cryptK
// we got correct key's type pair
// check what about crypt plugin for it
Remote::ParsedList clientPlugins;
REMOTE_parseList(clientPlugins, getPortConfig()->getPlugins(Firebird::IPluginManager::WireCrypt));
REMOTE_parseList(clientPlugins, getPortConfig()->getPlugins(Firebird::IPluginManager::TYPE_WIRE_CRYPT));
for (unsigned n = 0; n < clientPlugins.getCount(); ++n)
{
Firebird::PathName p(clientPlugins[n]);
if (srvKey.plugins.find(" " + p + " ") != Firebird::PathName::npos)
{
Firebird::GetPlugins<Firebird::IWireCryptPlugin>
cp(Firebird::IPluginManager::WireCrypt, p.c_str());
cp(Firebird::IPluginManager::TYPE_WIRE_CRYPT, p.c_str());
if (cp.hasData())
{
Firebird::LocalStatus st;
@ -1283,7 +1283,7 @@ bool rem_port::tryKeyType(const KnownServerKey& srvKey, InternalCryptKey* cryptK
// Pass key to plugin
port_crypt_plugin->setKey(&statusWrapper, cryptKey);
if (st.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (st.getState() & Firebird::IStatus::STATE_ERRORS)
{
Firebird::status_exception::raise(&st);
}

View File

@ -423,7 +423,7 @@ int CLIB_ROUTINE main( int argc, char** argv)
//gds_alloc_report(0, __FILE__, __LINE__);
Firebird::PathName name = fb_utils::getPrefix(
Firebird::IConfigManager::FB_DIR_LOG, "memdebug.log");
Firebird::IConfigManager::DIR_LOG, "memdebug.log");
FILE* file = os_utils::fopen(name.c_str(), "w+t");
if (file)
{

View File

@ -346,7 +346,7 @@ int WINAPI WinMain(HINSTANCE hThisInst, HINSTANCE /*hPrevInst*/, LPSTR lpszArgs,
// due to remote access
//gds_alloc_report(0, __FILE__, __LINE__);
PathName name = fb_utils::getPrefix(IConfigManager::FB_DIR_LOG, "memdebug.log");
PathName name = fb_utils::getPrefix(IConfigManager::DIR_LOG, "memdebug.log");
FILE* file = os_utils::fopen(name.c_str(), "w+t");
if (file)
{

View File

@ -787,7 +787,7 @@ public:
: PermanentStorage(p), knownTypes(getPool())
{
LocalStatus st;
for (GetPlugins<IWireCryptPlugin> cpItr(IPluginManager::WireCrypt); cpItr.hasData(); cpItr.next())
for (GetPlugins<IWireCryptPlugin> cpItr(IPluginManager::TYPE_WIRE_CRYPT); cpItr.hasData(); cpItr.next())
{
const char* list = cpItr.plugin()->getKnownTypes(&st);
check(&st);
@ -1096,7 +1096,7 @@ void SRVR_enum_attachments(ULONG& att_cnt, ULONG& dbs_cnt, ULONG& svc_cnt)
iface->query(&status, 0, NULL, sizeof(spb_query), spb_query, sizeof(buffer), buffer);
const UCHAR* p = buffer;
if ((!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)) && *p++ == isc_info_svc_svr_db_info)
if ((!(status.getState() & Firebird::IStatus::STATE_ERRORS)) && *p++ == isc_info_svc_svr_db_info)
{
while (*p != isc_info_flag_end)
{
@ -1846,7 +1846,7 @@ static bool accept_connection(rem_port* port, P_CNCT* connect, PACKET* send)
if (!accepted)
{
HANDSHAKE_DEBUG(fprintf(stderr, "!accepted, sending reject\n"));
if (status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status.getState() & Firebird::IStatus::STATE_ERRORS)
port->send_response(send, 0, 0, &status, false);
else
port->send(send);
@ -2190,13 +2190,13 @@ void DatabaseAuth::accept(PACKET* send, Auth::WriterImplementation* authBlock)
LocalStatus status_vector;
provider->setDbCryptCallback(&status_vector, authPort->port_server_crypt_callback->getInterface());
if (!(status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
{
ServAttachment iface(operation == op_attach ?
provider->attachDatabase(&status_vector, dbName.c_str(), dl, dpb) :
provider->createDatabase(&status_vector, dbName.c_str(), dl, dpb));
if (!(status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
{
Rdb* rdb = new Rdb;
@ -2255,7 +2255,7 @@ static void aux_request( rem_port* port, /*P_REQ* request,*/ PACKET* send)
port->send_response(send, rdb->rdb_id, send->p_resp.p_resp_data.cstr_length,
&status_vector, false);
if (status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
{
return;
}
@ -2427,7 +2427,7 @@ static USHORT check_statement_type( Rsr* statement)
statement->rsr_iface->getInfo(&local_status, sizeof(sql_info), sql_info, sizeof(buffer), buffer);
if (!(local_status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(local_status.getState() & Firebird::IStatus::STATE_ERRORS))
{
for (const UCHAR* info = buffer; (*info != isc_info_end) && !done;)
{
@ -2491,7 +2491,7 @@ ISC_STATUS rem_port::compile(P_CMPL* compileL, PACKET* sendL)
ServRequest iface(rdb->rdb_iface->compileRequest(&status_vector, blr_length, blr));
if (status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
return this->send_response(sendL, 0, 0, &status_vector, false);
// Parse the request to find the messages
@ -2739,7 +2739,7 @@ void rem_port::drop_database(P_RLSE* /*release*/, PACKET* sendL)
rdb->rdb_iface->dropDatabase(&status_vector);
if ((status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS) &&
if ((status_vector.getState() & Firebird::IStatus::STATE_ERRORS) &&
(status_vector.getErrors()[1] != isc_drdb_completed_with_errs))
{
this->send_response(sendL, 0, 0, &status_vector, false);
@ -2790,7 +2790,7 @@ ISC_STATUS rem_port::end_blob(P_OP operation, P_RLSE * release, PACKET* sendL)
else
blob->rbl_iface->cancel(&status_vector);
if (!(status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
release_blob(blob);
return this->send_response(sendL, 0, 0, &status_vector, false);
@ -2817,7 +2817,7 @@ ISC_STATUS rem_port::end_database(P_RLSE* /*release*/, PACKET* sendL)
rdb->rdb_iface->detach(&status_vector);
if (status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
return this->send_response(sendL, 0, 0, &status_vector, false);
port_flags |= PORT_detached;
@ -2861,7 +2861,7 @@ ISC_STATUS rem_port::end_request(P_RLSE * release, PACKET* sendL)
requestL->rrq_iface->free(&status_vector);
if (!(status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
release_request(requestL);
return this->send_response(sendL, 0, 0, &status_vector, true);
@ -2890,7 +2890,7 @@ ISC_STATUS rem_port::end_statement(P_SQLFREE* free_stmt, PACKET* sendL)
if (statement->rsr_cursor)
{
statement->rsr_cursor->close(&status_vector);
if (status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
{
return this->send_response(sendL, 0, 0, &status_vector, true);
}
@ -2913,7 +2913,7 @@ ISC_STATUS rem_port::end_statement(P_SQLFREE* free_stmt, PACKET* sendL)
if (statement->rsr_iface)
{
statement->rsr_iface->free(&status_vector);
if (status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
{
return this->send_response(sendL, 0, 0, &status_vector, true);
}
@ -2976,12 +2976,12 @@ ISC_STATUS rem_port::end_transaction(P_OP operation, P_RLSE * release, PACKET* s
case op_prepare:
transaction->rtr_iface->prepare(&status_vector, 0, NULL);
if (!(status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
transaction->rtr_limbo = true;
break;
}
if (!(status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
{
if (operation == op_commit || operation == op_rollback)
{
@ -3089,11 +3089,11 @@ ISC_STATUS rem_port::execute_immediate(P_OP op, P_SQLST * exnow, PACKET* sendL)
sendL->p_operation = op_sql_response;
sendL->p_sqldata.p_sqldata_messages =
((status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS) || !out_msg) ? 0 : 1;
((status_vector.getState() & Firebird::IStatus::STATE_ERRORS) || !out_msg) ? 0 : 1;
this->send_partial(sendL);
}
if (!(status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
{
if (transaction && !newTra)
{
@ -3203,7 +3203,7 @@ ISC_STATUS rem_port::execute_statement(P_OP op, P_SQLDATA* sqldata, PACKET* send
iMsgBuffer.metadata, iMsgBuffer.buffer,
(out_blr_length ? oMsgBuffer.metadata : DELAYED_OUT_FORMAT),
0);
if (!(status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
{
transaction->rtr_cursors.add(statement);
statement->rsr_delayed_format = !out_blr_length;
@ -3220,11 +3220,11 @@ ISC_STATUS rem_port::execute_statement(P_OP op, P_SQLDATA* sqldata, PACKET* send
this->port_statement->rsr_format = this->port_statement->rsr_select_format;
sendL->p_operation = op_sql_response;
sendL->p_sqldata.p_sqldata_messages = (status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS || !out_msg) ? 0 : 1;
sendL->p_sqldata.p_sqldata_messages = (status_vector.getState() & Firebird::IStatus::STATE_ERRORS || !out_msg) ? 0 : 1;
this->send_partial(sendL);
}
if (!(status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
{
if (transaction && !newTra)
{
@ -3356,11 +3356,11 @@ ISC_STATUS rem_port::fetch(P_SQLDATA * sqldata, PACKET* sendL)
{
fb_assert(statement->rsr_msgs_waiting == 0);
rc = statement->rsr_cursor->fetchNext(&status_vector, message->msg_buffer) == IStatus::FB_OK;
rc = statement->rsr_cursor->fetchNext(&status_vector, message->msg_buffer) == IStatus::OK;
statement->rsr_flags.set(Rsr::FETCHED);
if (status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
return this->send_response(sendL, 0, 0, &status_vector, false);
if (!rc)
@ -3435,8 +3435,8 @@ ISC_STATUS rem_port::fetch(P_SQLDATA * sqldata, PACKET* sendL)
next = message;
}
rc = statement->rsr_cursor->fetchNext(&status_vector, message->msg_buffer) == IStatus::FB_OK;
if (status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
rc = statement->rsr_cursor->fetchNext(&status_vector, message->msg_buffer) == IStatus::OK;
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
{
// If already have an error queued, don't overwrite it
if (!statement->rsr_flags.test(Rsr::STREAM_ERR))
@ -3480,7 +3480,7 @@ static bool get_next_msg_no(Rrq* request, USHORT incarnation, USHORT * msg_numbe
request->rrq_iface->getInfo(&status_vector, incarnation,
sizeof(request_info), request_info, sizeof(info_buffer), info_buffer);
if (status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
return false;
bool result = false;
@ -3559,9 +3559,9 @@ ISC_STATUS rem_port::get_segment(P_SGMT* segment, PACKET* sendL)
p += 2;
unsigned length;
int cc = blob->rbl_iface->getSegment(&status_vector, buffer_length, p, &length);
if (cc == IStatus::FB_NO_DATA || cc == IStatus::FB_ERROR)
if (cc == IStatus::NO_DATA || cc == IStatus::ERROR)
{
if (cc == IStatus::FB_NO_DATA)
if (cc == IStatus::NO_DATA)
state = 2;
p -= 2;
break;
@ -3571,7 +3571,7 @@ ISC_STATUS rem_port::get_segment(P_SGMT* segment, PACKET* sendL)
p[-1] = (UCHAR) (length >> 8);
p += length;
buffer_length -= length;
if (cc == IStatus::FB_SEGMENT)
if (cc == IStatus::SEGMENT)
{
state = 1;
break;
@ -3630,7 +3630,7 @@ ISC_STATUS rem_port::get_slice(P_SLC * stuff, PACKET* sendL)
stuff->p_slc_parameters.cstr_address, stuff->p_slc_length, slice);
ISC_STATUS status;
if (status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
status = this->send_response(sendL, 0, 0, &status_vector, false);
else
{
@ -3722,7 +3722,7 @@ void rem_port::info(P_OP op, P_INFO* stuff, PACKET* sendL)
buffer_length, //sizeof(temp)
temp_buffer); //temp
if (!(status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
{
string version;
versionInfo(version);
@ -3877,7 +3877,7 @@ ISC_STATUS rem_port::open_blob(P_OP op, P_BLOB* stuff, PACKET* sendL)
&sendL->p_resp.p_resp_blob_id, bpb_length, bpb));
USHORT object = 0;
if (!(status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
{
Rbl* blob = new Rbl;
#ifdef DEBUG_REMOTE_MEMORY
@ -3923,7 +3923,7 @@ ISC_STATUS rem_port::prepare(P_PREP * stuff, PACKET* sendL)
transaction->rtr_iface->prepare(&status_vector,
stuff->p_prep_data.cstr_length, stuff->p_prep_data.cstr_address);
if (!(status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
{
transaction->rtr_limbo = true;
}
@ -3973,7 +3973,7 @@ ISC_STATUS rem_port::prepare_statement(P_SQLST * prepareL, PACKET* sendL)
if (statement->rsr_iface)
{
statement->rsr_iface->free(&status_vector);
if (status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
return this->send_response(sendL, 0, 0, &status_vector, false);
}
@ -3989,19 +3989,19 @@ ISC_STATUS rem_port::prepare_statement(P_SQLST * prepareL, PACKET* sendL)
iface, prepareL->p_sqlst_SQL_str.cstr_length,
reinterpret_cast<const char*>(prepareL->p_sqlst_SQL_str.cstr_address),
prepareL->p_sqlst_SQL_dialect, flags);
if (status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
return this->send_response(sendL, 0, 0, &status_vector, false);
if (statement->rsr_cursor_name.hasData())
{
statement->rsr_iface->setCursorName(&status_vector, statement->rsr_cursor_name.c_str());
if (status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
return this->send_response(sendL, 0, 0, &status_vector, false);
}
LocalStatus s2;
statement->rsr_iface->getInfo(&s2, infoLength, info, prepareL->p_sqlst_buffer_length, buffer);
if (s2.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (s2.getState() & Firebird::IStatus::STATE_ERRORS)
return this->send_response(sendL, 0, 0, &s2, false);
REMOTE_reset_statement(statement);
@ -4474,7 +4474,7 @@ ISC_STATUS rem_port::put_segment(P_OP op, P_SGMT * segment, PACKET* sendL)
length += *p++ << 8;
blob->rbl_iface->putSegment(&status_vector, length, p);
if (status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
return this->send_response(sendL, 0, 0, &status_vector, false);
p += length;
}
@ -4682,7 +4682,7 @@ ISC_STATUS rem_port::receive_msg(P_DATA * data, PACKET* sendL)
requestL->rrq_iface->receive(&status_vector, level,
msg_number, format->fmt_length, message->msg_buffer);
if (status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
return this->send_response(sendL, 0, 0, &status_vector, false);
message->msg_address = message->msg_buffer;
@ -4763,7 +4763,7 @@ ISC_STATUS rem_port::receive_msg(P_DATA * data, PACKET* sendL)
// Did we have an error? If so, save it for later delivery
if (status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
{
// If already have an error queued, don't overwrite it
@ -5257,13 +5257,13 @@ ISC_STATUS rem_port::service_attach(const char* service_name,
LocalStatus status_vector;
provider->setDbCryptCallback(&status_vector, port_server_crypt_callback->getInterface());
if (!(status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
{
dumpAuthBlock("rem_port::service_attach()", spb, isc_spb_auth_block);
ServService iface(provider->attachServiceManager(&status_vector, service_name,
(ULONG) spb->getBufferLength(), spb->getBuffer()));
if (!(status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
{
Rdb* rdb = new Rdb;
@ -5302,7 +5302,7 @@ ISC_STATUS rem_port::service_end(P_RLSE* /*release*/, PACKET* sendL)
rdb->rdb_svc->svc_iface->detach(&status_vector);
if (!(status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
{
port_flags |= PORT_detached;
rdb->rdb_svc->svc_iface = NULL;
@ -5408,7 +5408,7 @@ void rem_port::start_crypt(P_CRYPT * crypt, PACKET* sendL)
PathName plugName(crypt->p_plugin.cstr_address, crypt->p_plugin.cstr_length);
// Check it's availability
Remote::ParsedList plugins;
REMOTE_parseList(plugins, Config::getDefaultConfig()->getPlugins(IPluginManager::WireCrypt));
REMOTE_parseList(plugins, Config::getDefaultConfig()->getPlugins(IPluginManager::TYPE_WIRE_CRYPT));
bool found = false;
for (unsigned n = 0; n < plugins.getCount(); ++n)
{
@ -5423,7 +5423,7 @@ void rem_port::start_crypt(P_CRYPT * crypt, PACKET* sendL)
(Arg::Gds(isc_wirecrypt_plugin) << plugName).raise();
}
GetPlugins<IWireCryptPlugin> cp(IPluginManager::WireCrypt, plugName.c_str());
GetPlugins<IWireCryptPlugin> cp(IPluginManager::TYPE_WIRE_CRYPT, plugName.c_str());
if (!cp.hasData())
{
(Arg::Gds(isc_wirecrypt_plugin) << plugName).raise();
@ -5508,7 +5508,7 @@ ISC_STATUS rem_port::start(P_OP operation, P_DATA * data, PACKET* sendL)
requestL->rrq_iface->start(&status_vector, transaction->rtr_iface, data->p_data_incarnation);
if (!(status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
{
requestL->rrq_rtr = transaction;
if (operation == op_start_and_receive)
@ -5554,7 +5554,7 @@ ISC_STATUS rem_port::start_and_send(P_OP operation, P_DATA* data, PACKET* sendL)
transaction->rtr_iface, data->p_data_incarnation,
number, format->fmt_length, message->msg_address);
if (!(status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
{
requestL->rrq_rtr = transaction;
if (operation == op_start_send_and_receive)
@ -5590,7 +5590,7 @@ ISC_STATUS rem_port::start_transaction(P_OP operation, P_STTR * stuff, PACKET* s
stuff->p_sttr_tpb.cstr_length, stuff->p_sttr_tpb.cstr_address));
OBJCT object = 0;
if (!(status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
{
Rtr* transaction = make_transaction(rdb, iface);
if (transaction)
@ -5942,7 +5942,7 @@ ISC_STATUS rem_port::transact_request(P_TRRQ* trrq, PACKET* sendL)
rdb->rdb_iface->transactRequest(&status_vector, transaction->rtr_iface,
blr_length, blr, in_msg_length, in_msg, out_msg_length, out_msg);
if (status_vector.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
return this->send_response(sendL, 0, 0, &status_vector, false);
P_DATA* data = &sendL->p_data;
@ -6299,7 +6299,7 @@ void SrvAuthBlock::createPluginsItr()
REMOTE_parseList(fromClient, pluginList);
Remote::ParsedList onServer;
REMOTE_parseList(onServer, port->getPortConfig()->getPlugins(IPluginManager::AuthServer));
REMOTE_parseList(onServer, port->getPortConfig()->getPlugins(IPluginManager::TYPE_AUTH_SERVER));
Remote::ParsedList final;
for (unsigned s = 0; s < onServer.getCount(); ++s)
@ -6354,7 +6354,7 @@ void SrvAuthBlock::createPluginsItr()
REMOTE_makeList(pluginList, final);
RefPtr<Config> portConf(port->getPortConfig());
plugins = new AuthServerPlugins(IPluginManager::AuthServer, portConf, pluginList.c_str());
plugins = new AuthServerPlugins(IPluginManager::TYPE_AUTH_SERVER, portConf, pluginList.c_str());
}
void SrvAuthBlock::reset()

View File

@ -486,7 +486,7 @@ int gsec(Firebird::UtilSvc* uSvc)
ex.stuffException(&st);
}
if (st.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (st.getState() & Firebird::IStatus::STATE_ERRORS)
{
ISC_STATUS_ARRAY tmp;
fb_utils::mergeStatus(tmp, FB_NELEM(tmp), &st);
@ -566,7 +566,7 @@ int gsec(Firebird::UtilSvc* uSvc)
get_security_error(status, ret);
}
if (st.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (st.getState() & Firebird::IStatus::STATE_ERRORS)
{
Firebird::status_exception::raise(&st);
}
@ -597,7 +597,7 @@ int gsec(Firebird::UtilSvc* uSvc)
}
manager->commit(&statusWrapper2);
if (st.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (st.getState() & Firebird::IStatus::STATE_ERRORS)
{
Firebird::status_exception::raise(&st);
}

View File

@ -87,7 +87,7 @@ pid_t UTIL_start_process(const char* process, char** argv, const char* prog_name
fb_assert(argv != NULL);
// prepend Firebird home directory to the program name
Firebird::PathName string = fb_utils::getPrefix(Firebird::IConfigManager::FB_DIR_SBIN, process);
Firebird::PathName string = fb_utils::getPrefix(Firebird::IConfigManager::DIR_SBIN, process);
if (prog_name) {
gds__log("%s: guardian starting %s\n", prog_name, string.c_str());
@ -246,7 +246,7 @@ int UTIL_ex_lock(const TEXT* file)
**************************************/
// get the file name and prepend the complete path etc
Firebird::PathName expanded_filename = fb_utils::getPrefix(Firebird::IConfigManager::FB_DIR_GUARD, file);
Firebird::PathName expanded_filename = fb_utils::getPrefix(Firebird::IConfigManager::DIR_GUARD, file);
// file fd for the opened and locked file
int fd_file = open(expanded_filename.c_str(), O_RDWR | O_CREAT, 0660);

View File

@ -481,7 +481,7 @@ static bool start_server( ibmgr_data_t* data)
// We failed to attach to service, thus server might not be running
// You know what? We'll try to start it.
Firebird::PathName path = fb_utils::getPrefix(Firebird::IConfigManager::FB_DIR_SBIN, SERVER_GUARDIAN);
Firebird::PathName path = fb_utils::getPrefix(Firebird::IConfigManager::DIR_SBIN, SERVER_GUARDIAN);
// CVC: Newer compilers won't accept assigning literal strings to non-const
// char pointers, so this code prevents changing argv's type to const TEXT* argv[4]

View File

@ -435,11 +435,11 @@ void TracePluginImpl::logRecordError(const char* action, ITraceConnection* conne
{
switch (connection->getKind())
{
case ITraceConnection::TRACE_CONNECTION_DATABASE:
case ITraceConnection::KIND_DATABASE:
logRecordConn(action, (ITraceDatabaseConnection*) connection);
break;
case ITraceConnection::TRACE_CONNECTION_SERVICE:
case ITraceConnection::KIND_SERVICE:
logRecordServ(action, (ITraceServiceConnection*) connection);
break;
@ -1006,13 +1006,13 @@ void TracePluginImpl::log_event_attach(ITraceDatabaseConnection* connection,
const char* event_type;
switch (att_result)
{
case ITracePlugin::TRACE_RESULT_SUCCESS:
case ITracePlugin::RESULT_SUCCESS:
event_type = create_db ? "CREATE_DATABASE" : "ATTACH_DATABASE";
break;
case ITracePlugin::TRACE_RESULT_FAILED:
case ITracePlugin::RESULT_FAILED:
event_type = create_db ? "FAILED CREATE_DATABASE" : "FAILED ATTACH_DATABASE";
break;
case ITracePlugin::TRACE_RESULT_UNAUTHORIZED:
case ITracePlugin::RESULT_UNAUTHORIZED:
event_type = create_db ? "UNAUTHORIZED CREATE_DATABASE" : "UNAUTHORIZED ATTACH_DATABASE";
break;
default:
@ -1050,19 +1050,19 @@ void TracePluginImpl::register_transaction(ITraceTransaction* transaction)
switch (transaction->getIsolation())
{
case ITraceTransaction::TRA_ISO_CONSISTENCY:
case ITraceTransaction::ISOLATION_CONSISTENCY:
trans_data.description->append("CONSISTENCY");
break;
case ITraceTransaction::TRA_ISO_CONCURRENCY:
case ITraceTransaction::ISOLATION_CONCURRENCY:
trans_data.description->append("CONCURRENCY");
break;
case ITraceTransaction::TRA_ISO_READ_COMMITTED_RECVER:
case ITraceTransaction::ISOLATION_READ_COMMITTED_RECVER:
trans_data.description->append("READ_COMMITTED | REC_VERSION");
break;
case ITraceTransaction::TRA_ISO_READ_COMMITTED_NORECVER:
case ITraceTransaction::ISOLATION_READ_COMMITTED_NORECVER:
trans_data.description->append("READ_COMMITTED | NO_REC_VERSION");
break;
@ -1110,13 +1110,13 @@ void TracePluginImpl::log_event_transaction_start(ITraceDatabaseConnection* conn
const char* event_type;
switch (tra_result)
{
case ITracePlugin::TRACE_RESULT_SUCCESS:
case ITracePlugin::RESULT_SUCCESS:
event_type = "START_TRANSACTION";
break;
case ITracePlugin::TRACE_RESULT_FAILED:
case ITracePlugin::RESULT_FAILED:
event_type = "FAILED START_TRANSACTION";
break;
case ITracePlugin::TRACE_RESULT_UNAUTHORIZED:
case ITracePlugin::RESULT_UNAUTHORIZED:
event_type = "UNAUTHORIZED START_TRANSACTION";
break;
default:
@ -1143,17 +1143,17 @@ void TracePluginImpl::log_event_transaction_end(ITraceDatabaseConnection* connec
const char* event_type;
switch (tra_result)
{
case ITracePlugin::TRACE_RESULT_SUCCESS:
case ITracePlugin::RESULT_SUCCESS:
event_type = commit ?
(retain_context ? "COMMIT_RETAINING" : "COMMIT_TRANSACTION") :
(retain_context ? "ROLLBACK_RETAINING" : "ROLLBACK_TRANSACTION");
break;
case ITracePlugin::TRACE_RESULT_FAILED:
case ITracePlugin::RESULT_FAILED:
event_type = commit ?
(retain_context ? "FAILED COMMIT_RETAINING" : "FAILED COMMIT_TRANSACTION") :
(retain_context ? "FAILED ROLLBACK_RETAINING" : "FAILED ROLLBACK_TRANSACTION");
break;
case ITracePlugin::TRACE_RESULT_UNAUTHORIZED:
case ITracePlugin::RESULT_UNAUTHORIZED:
event_type = commit ?
(retain_context ? "UNAUTHORIZED COMMIT_RETAINING" : "UNAUTHORIZED COMMIT_TRANSACTION") :
(retain_context ? "UNAUTHORIZED ROLLBACK_RETAINING" : "UNAUTHORIZED ROLLBACK_TRANSACTION");
@ -1237,15 +1237,15 @@ void TracePluginImpl::log_event_proc_execute(ITraceDatabaseConnection* connectio
const char* event_type;
switch (proc_result)
{
case ITracePlugin::TRACE_RESULT_SUCCESS:
case ITracePlugin::RESULT_SUCCESS:
event_type = started ? "EXECUTE_PROCEDURE_START" :
"EXECUTE_PROCEDURE_FINISH";
break;
case ITracePlugin::TRACE_RESULT_FAILED:
case ITracePlugin::RESULT_FAILED:
event_type = started ? "FAILED EXECUTE_PROCEDURE_START" :
"FAILED EXECUTE_PROCEDURE_FINISH";
break;
case ITracePlugin::TRACE_RESULT_UNAUTHORIZED:
case ITracePlugin::RESULT_UNAUTHORIZED:
event_type = started ? "UNAUTHORIZED EXECUTE_PROCEDURE_START" :
"UNAUTHORIZED EXECUTE_PROCEDURE_FINISH";
break;
@ -1279,7 +1279,7 @@ void TracePluginImpl::log_event_func_execute(ITraceDatabaseConnection* connectio
record.append(NEWLINE);
}
if (!started && func_result == ITracePlugin::TRACE_RESULT_SUCCESS)
if (!started && func_result == ITracePlugin::RESULT_SUCCESS)
{
params = function->getResult();
{
@ -1304,15 +1304,15 @@ void TracePluginImpl::log_event_func_execute(ITraceDatabaseConnection* connectio
const char* event_type;
switch (func_result)
{
case ITracePlugin::TRACE_RESULT_SUCCESS:
case ITracePlugin::RESULT_SUCCESS:
event_type = started ? "EXECUTE_FUNCTION_START" :
"EXECUTE_FUNCTION_FINISH";
break;
case ITracePlugin::TRACE_RESULT_FAILED:
case ITracePlugin::RESULT_FAILED:
event_type = started ? "FAILED EXECUTE_FUNCTION_START" :
"FAILED EXECUTE_FUNCTION_FINISH";
break;
case ITracePlugin::TRACE_RESULT_UNAUTHORIZED:
case ITracePlugin::RESULT_UNAUTHORIZED:
event_type = started ? "UNAUTHORIZED EXECUTE_FUNCTION_START" :
"UNAUTHORIZED EXECUTE_FUNCTION_FINISH";
break;
@ -1423,13 +1423,13 @@ void TracePluginImpl::log_event_dsql_prepare(ITraceDatabaseConnection* connectio
const char* event_type;
switch (req_result)
{
case ITracePlugin::TRACE_RESULT_SUCCESS:
case ITracePlugin::RESULT_SUCCESS:
event_type = "PREPARE_STATEMENT";
break;
case ITracePlugin::TRACE_RESULT_FAILED:
case ITracePlugin::RESULT_FAILED:
event_type = "FAILED PREPARE_STATEMENT";
break;
case ITracePlugin::TRACE_RESULT_UNAUTHORIZED:
case ITracePlugin::RESULT_UNAUTHORIZED:
event_type = "UNAUTHORIZED PREPARE_STATEMENT";
break;
default:
@ -1497,15 +1497,15 @@ void TracePluginImpl::log_event_dsql_execute(ITraceDatabaseConnection* connectio
const char* event_type;
switch (req_result)
{
case ITracePlugin::TRACE_RESULT_SUCCESS:
case ITracePlugin::RESULT_SUCCESS:
event_type = started ? "EXECUTE_STATEMENT_START" :
"EXECUTE_STATEMENT_FINISH";
break;
case ITracePlugin::TRACE_RESULT_FAILED:
case ITracePlugin::RESULT_FAILED:
event_type = started ? "FAILED EXECUTE_STATEMENT_START" :
"FAILED EXECUTE_STATEMENT_FINISH";
break;
case ITracePlugin::TRACE_RESULT_UNAUTHORIZED:
case ITracePlugin::RESULT_UNAUTHORIZED:
event_type = started ? "UNAUTHORIZED EXECUTE_STATEMENT_START" :
"UNAUTHORIZED EXECUTE_STATEMENT_FINISH";
break;
@ -1574,13 +1574,13 @@ void TracePluginImpl::log_event_blr_compile(ITraceDatabaseConnection* connection
const char* event_type;
switch (req_result)
{
case ITracePlugin::TRACE_RESULT_SUCCESS:
case ITracePlugin::RESULT_SUCCESS:
event_type = "COMPILE_BLR";
break;
case ITracePlugin::TRACE_RESULT_FAILED:
case ITracePlugin::RESULT_FAILED:
event_type = "FAILED COMPILE_BLR";
break;
case ITracePlugin::TRACE_RESULT_UNAUTHORIZED:
case ITracePlugin::RESULT_UNAUTHORIZED:
event_type = "UNAUTHORIZED COMPILE_BLR";
break;
default:
@ -1612,13 +1612,13 @@ void TracePluginImpl::log_event_blr_execute(ITraceDatabaseConnection* connection
const char* event_type;
switch (req_result)
{
case ITracePlugin::TRACE_RESULT_SUCCESS:
case ITracePlugin::RESULT_SUCCESS:
event_type = "EXECUTE_BLR";
break;
case ITracePlugin::TRACE_RESULT_FAILED:
case ITracePlugin::RESULT_FAILED:
event_type = "FAILED EXECUTE_BLR";
break;
case ITracePlugin::TRACE_RESULT_UNAUTHORIZED:
case ITracePlugin::RESULT_UNAUTHORIZED:
event_type = "UNAUTHORIZED EXECUTE_BLR";
break;
default:
@ -1667,13 +1667,13 @@ void TracePluginImpl::log_event_dyn_execute(ITraceDatabaseConnection* connection
const char* event_type;
switch (req_result)
{
case ITracePlugin::TRACE_RESULT_SUCCESS:
case ITracePlugin::RESULT_SUCCESS:
event_type = "EXECUTE_DYN";
break;
case ITracePlugin::TRACE_RESULT_FAILED:
case ITracePlugin::RESULT_FAILED:
event_type = "FAILED EXECUTE_DYN";
break;
case ITracePlugin::TRACE_RESULT_UNAUTHORIZED:
case ITracePlugin::RESULT_UNAUTHORIZED:
event_type = "UNAUTHORIZED EXECUTE_DYN";
break;
default:
@ -1778,13 +1778,13 @@ void TracePluginImpl::log_event_service_attach(ITraceServiceConnection* service,
const char* event_type;
switch (att_result)
{
case ITracePlugin::TRACE_RESULT_SUCCESS:
case ITracePlugin::RESULT_SUCCESS:
event_type = "ATTACH_SERVICE";
break;
case ITracePlugin::TRACE_RESULT_FAILED:
case ITracePlugin::RESULT_FAILED:
event_type = "FAILED ATTACH_SERVICE";
break;
case ITracePlugin::TRACE_RESULT_UNAUTHORIZED:
case ITracePlugin::RESULT_UNAUTHORIZED:
event_type = "UNAUTHORIZED ATTACH_SERVICE";
break;
default:
@ -1807,13 +1807,13 @@ void TracePluginImpl::log_event_service_start(ITraceServiceConnection* service,
const char* event_type;
switch (start_result)
{
case ITracePlugin::TRACE_RESULT_SUCCESS:
case ITracePlugin::RESULT_SUCCESS:
event_type = "START_SERVICE";
break;
case ITracePlugin::TRACE_RESULT_FAILED:
case ITracePlugin::RESULT_FAILED:
event_type = "FAILED START_SERVICE";
break;
case ITracePlugin::TRACE_RESULT_UNAUTHORIZED:
case ITracePlugin::RESULT_UNAUTHORIZED:
event_type = "UNAUTHORIZED START_SERVICE";
break;
default:
@ -1868,13 +1868,13 @@ void TracePluginImpl::log_event_service_query(ITraceServiceConnection* service,
const char* event_type;
switch (query_result)
{
case ITracePlugin::TRACE_RESULT_SUCCESS:
case ITracePlugin::RESULT_SUCCESS:
event_type = "QUERY_SERVICE";
break;
case ITracePlugin::TRACE_RESULT_FAILED:
case ITracePlugin::RESULT_FAILED:
event_type = "FAILED QUERY_SERVICE";
break;
case ITracePlugin::TRACE_RESULT_UNAUTHORIZED:
case ITracePlugin::RESULT_UNAUTHORIZED:
event_type = "UNAUTHORIZED QUERY_SERVICE";
break;
default:
@ -1894,13 +1894,13 @@ void TracePluginImpl::log_event_service_detach(ITraceServiceConnection* service,
const char* event_type;
switch (detach_result)
{
case ITracePlugin::TRACE_RESULT_SUCCESS:
case ITracePlugin::RESULT_SUCCESS:
event_type = "DETACH_SERVICE";
break;
case ITracePlugin::TRACE_RESULT_FAILED:
case ITracePlugin::RESULT_FAILED:
event_type = "FAILED DETACH_SERVICE";
break;
case ITracePlugin::TRACE_RESULT_UNAUTHORIZED:
case ITracePlugin::RESULT_UNAUTHORIZED:
event_type = "UNAUTHORIZED DETACH_SERVICE";
break;
default:
@ -1940,7 +1940,7 @@ void TracePluginImpl::log_event_trigger_execute(ITraceDatabaseConnection* connec
if (trgname.empty())
trgname = "<unknown>";
if ((trigger->getWhich() != ITraceTrigger::TRACE_ALL) && trigger->getRelationName())
if ((trigger->getWhich() != ITraceTrigger::TYPE_ALL) && trigger->getRelationName())
{
string relation;
relation.printf(" FOR %s", trigger->getRelationName());
@ -1950,13 +1950,13 @@ void TracePluginImpl::log_event_trigger_execute(ITraceDatabaseConnection* connec
string action;
switch (trigger->getWhich())
{
case ITraceTrigger::TRACE_ALL:
action = "ON ";
case ITraceTrigger::TYPE_ALL:
action = "ON "; //// TODO: Why ALL means ON (DATABASE) triggers?
break;
case ITraceTrigger::TRACE_BEFORE:
case ITraceTrigger::TYPE_BEFORE:
action = "BEFORE ";
break;
case ITraceTrigger::TRACE_AFTER:
case ITraceTrigger::TYPE_AFTER:
action = "AFTER ";
break;
default:
@ -2009,15 +2009,15 @@ void TracePluginImpl::log_event_trigger_execute(ITraceDatabaseConnection* connec
const char* event_type;
switch (trig_result)
{
case ITracePlugin::TRACE_RESULT_SUCCESS:
case ITracePlugin::RESULT_SUCCESS:
event_type = started ? "EXECUTE_TRIGGER_START" :
"EXECUTE_TRIGGER_FINISH";
break;
case ITracePlugin::TRACE_RESULT_FAILED:
case ITracePlugin::RESULT_FAILED:
event_type = started ? "FAILED EXECUTE_TRIGGER_START" :
"FAILED EXECUTE_TRIGGER_FINISH";
break;
case ITracePlugin::TRACE_RESULT_UNAUTHORIZED:
case ITracePlugin::RESULT_UNAUTHORIZED:
event_type = started ? "UNAUTHORIZED EXECUTE_TRIGGER_START" :
"UNAUTHORIZED EXECUTE_TRIGGER_FINISH";
break;

View File

@ -58,7 +58,7 @@ int TraceFactoryImpl::release()
ntrace_mask_t TraceFactoryImpl::trace_needs()
{
return (1 << Firebird::ITraceFactory::TRACE_EVENT_MAX) - 1;
return (1 << Firebird::ITraceFactory::EVENT_MAX) - 1;
}
Firebird::ITracePlugin* TraceFactoryImpl::trace_create(Firebird::CheckStatusWrapper* status,
@ -121,7 +121,7 @@ static Firebird::SimpleFactory<TraceFactoryImpl> traceFactory;
void registerTrace(Firebird::IPluginManager* iPlugin)
{
iPlugin->registerPluginFactory(Firebird::IPluginManager::Trace, "fbtrace", &traceFactory);
iPlugin->registerPluginFactory(Firebird::IPluginManager::TYPE_TRACE, "fbtrace", &traceFactory);
Firebird::getUnloadDetector()->registerMe();
}

View File

@ -107,7 +107,7 @@ bool DTransaction::buildPrepareInfo(CheckStatusWrapper* status, TdrBuffer& tdr,
// limit MAX_USHORT is chosen cause for old API it was limit of all blocks
UCHAR* buf = bigBuffer.getBuffer(MAX_USHORT);
from->getInfo(status, sizeof(PREPARE_TR_INFO), PREPARE_TR_INFO, bigBuffer.getCount(), buf);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return false;
UCHAR* const end = bigBuffer.end();
@ -188,7 +188,7 @@ void DTransaction::getInfo(CheckStatusWrapper* status,
if (sub[i])
{
sub[i]->getInfo(status, itemsLength, items, bufferLength, buffer);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
return;
}
@ -242,7 +242,7 @@ void DTransaction::prepare(CheckStatusWrapper* status,
{
sub[i]->prepare(status, msgLength, message);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return;
}
}
@ -262,7 +262,7 @@ void DTransaction::commit(CheckStatusWrapper* status)
status->init();
prepare(status, 0, NULL);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
return;
}
@ -275,7 +275,7 @@ void DTransaction::commit(CheckStatusWrapper* status)
if (sub[i])
{
sub[i]->commit(status);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return;
sub[i] = NULL;
@ -305,7 +305,7 @@ void DTransaction::commitRetaining(CheckStatusWrapper* status)
if (sub[i])
{
sub[i]->commitRetaining(status);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return;
}
}
@ -332,7 +332,7 @@ void DTransaction::rollback(CheckStatusWrapper* status)
if (sub[i])
{
sub[i]->rollback(status);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return;
sub[i] = NULL;
@ -359,7 +359,7 @@ void DTransaction::rollbackRetaining(CheckStatusWrapper* status)
if (sub[i])
{
sub[i]->rollbackRetaining(status);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return;
}
}
@ -388,7 +388,7 @@ void DTransaction::disconnect(CheckStatusWrapper* status)
if (sub[i])
{
sub[i]->disconnect(status);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return;
sub[i] = NULL;
@ -538,7 +538,7 @@ YTransaction* DtcStart::start(CheckStatusWrapper* status)
RefPtr<DTransaction> dtransaction(new DTransaction);
unsigned cnt = components.getCount();
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
status_exception::raise(status);
if (cnt == 0)
(Arg::Gds(isc_random) << "No attachments to start distributed transaction provided").raise();
@ -546,11 +546,11 @@ YTransaction* DtcStart::start(CheckStatusWrapper* status)
for (unsigned i = 0; i < cnt; ++i)
{
ITransaction* started = components[i].att->startTransaction(status, components[i].tpbLen, components[i].tpb);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
status_exception::raise(status);
dtransaction->join(status, started);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
started->release();
status_exception::raise(status);
@ -579,12 +579,12 @@ YTransaction* Dtc::join(CheckStatusWrapper* status, ITransaction* one, ITransact
RefPtr<DTransaction> dtransaction(new DTransaction);
dtransaction->join(status, one);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return NULL;
dtransaction->join(status, two);
/* We must not return NULL - first transaction is available only inside dtransaction
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return NULL;
*/

View File

@ -80,7 +80,7 @@ namespace
public:
explicit StaticConfHolder(MemoryPool& p)
: confFile(FB_NEW(p) ConfigFile(p,
fb_utils::getPrefix(IConfigManager::FB_DIR_CONF, "plugins.conf"), ConfigFile::HAS_SUB_CONF))
fb_utils::getPrefix(IConfigManager::DIR_CONF, "plugins.conf"), ConfigFile::HAS_SUB_CONF))
{
}
@ -418,11 +418,11 @@ namespace
explicit CountByTypeArray(MemoryPool&)
{}
CountByType values[PluginManager::MaxType];
CountByType values[PluginManager::TYPE_COUNT];
CountByType& get(unsigned int t)
{
fb_assert(t < PluginManager::MaxType);
fb_assert(t < PluginManager::TYPE_COUNT);
return values[t];
}
};
@ -605,7 +605,7 @@ namespace
Firebird::LocalStatus s;
IPluginBase* plugin = module->getPlugin(regPlugin).factory->createPlugin(&s, par);
if (!(s.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(s.getState() & Firebird::IStatus::STATE_ERRORS))
{
plugin->setOwner(par);
return plugin;
@ -730,7 +730,7 @@ namespace
PluginLoadInfo(const char* pluginName)
{
// define default values for plugin ...
curModule = fb_utils::getPrefix(IConfigManager::FB_DIR_PLUGINS, pluginName);
curModule = fb_utils::getPrefix(IConfigManager::DIR_PLUGINS, pluginName);
regName = pluginName;
required = false;
@ -953,7 +953,7 @@ namespace
return p;
next(status);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
break;
}
}
@ -1011,7 +1011,7 @@ void PluginManager::registerPluginFactory(unsigned int interfaceType, const char
if (current == builtin)
{
PathName plugConfigFile = fb_utils::getPrefix(IConfigManager::FB_DIR_PLUGINS, defaultName);
PathName plugConfigFile = fb_utils::getPrefix(IConfigManager::DIR_PLUGINS, defaultName);
changeExtension(plugConfigFile, "conf");
ConfiguredPlugin* p = new ConfiguredPlugin(RefPtr<PluginModule>(builtin), r,
@ -1118,7 +1118,7 @@ void PluginManager::shutdown()
void PluginManager::waitForType(unsigned int typeThatMustGoAway)
{
fb_assert(typeThatMustGoAway < PluginManager::MaxType);
fb_assert(typeThatMustGoAway < PluginManager::TYPE_COUNT);
Semaphore sem;
Semaphore* semPtr = NULL;
@ -1158,8 +1158,8 @@ public:
explicit DirCache(MemoryPool &p)
: cache(p)
{
cache.resize(IConfigManager::FB_DIRCOUNT);
for (unsigned i = 0; i < IConfigManager::FB_DIRCOUNT; ++i)
cache.resize(IConfigManager::DIR_COUNT);
for (unsigned i = 0; i < IConfigManager::DIR_COUNT; ++i)
{
cache[i] = fb_utils::getPrefix(i, "");
}
@ -1167,7 +1167,7 @@ public:
const char* getDir(unsigned code)
{
fb_assert(code < IConfigManager::FB_DIRCOUNT);
fb_assert(code < IConfigManager::DIR_COUNT);
return cache[code].c_str();
}

View File

@ -673,7 +673,7 @@ void API_ROUTINE gds_alloc_report(ULONG flags, const char* filter_filename, int
*
**************************************/
// Skidder: Calls to this function must be replaced with MemoryPool::print_contents
Firebird::PathName report_name = fb_utils::getPrefix(Firebird::IConfigManager::FB_DIR_LOG, "fbsrvreport.txt");
Firebird::PathName report_name = fb_utils::getPrefix(Firebird::IConfigManager::DIR_LOG, "fbsrvreport.txt");
// Our new facilities don't expose flags for reporting.
const bool used_only = !(flags & ALLOC_verbose);
getDefaultMemoryPool()->print_contents(report_name.c_str(), used_only, filter_filename);
@ -1052,7 +1052,7 @@ void API_ROUTINE gds__trace_raw(const char* text, unsigned int length)
{
if (CleanupTraceHandles::trace_file_handle == INVALID_HANDLE_VALUE)
{
Firebird::PathName name = fb_utils::getPrefix(Firebird::IConfigManager::FB_DIR_LOG, LOGFILE);
Firebird::PathName name = fb_utils::getPrefix(Firebird::IConfigManager::DIR_LOG, LOGFILE);
// We do not care to close this file.
// It will be closed automatically when our process terminates.
CleanupTraceHandles::trace_file_handle = CreateFile(name.c_str(), GENERIC_WRITE,
@ -1076,7 +1076,7 @@ void API_ROUTINE gds__trace_raw(const char* text, unsigned int length)
}
ReleaseMutex(CleanupTraceHandles::trace_mutex_handle);
#else
Firebird::PathName name = fb_utils::getPrefix(Firebird::IConfigManager::FB_DIR_LOG, LOGFILE);
Firebird::PathName name = fb_utils::getPrefix(Firebird::IConfigManager::DIR_LOG, LOGFILE);
int file = os_utils::open(name.c_str(), O_CREAT | O_APPEND | O_WRONLY, 0660);
if (file == -1)
return;
@ -1181,7 +1181,7 @@ void API_ROUTINE gds__log(const TEXT* text, ...)
now = time((time_t *)0);
#endif
Firebird::PathName name = fb_utils::getPrefix(Firebird::IConfigManager::FB_DIR_LOG, LOGFILE);
Firebird::PathName name = fb_utils::getPrefix(Firebird::IConfigManager::DIR_LOG, LOGFILE);
#ifdef WIN_NT
WaitForSingleObject(CleanupTraceHandles::trace_mutex_handle, INFINITE);
@ -1247,7 +1247,7 @@ void gds__print_pool(MemoryPool* pool, const TEXT* text, ...)
now = time((time_t *)0);
#endif
Firebird::PathName name = fb_utils::getPrefix(Firebird::IConfigManager::FB_DIR_LOG, LOGFILE);
Firebird::PathName name = fb_utils::getPrefix(Firebird::IConfigManager::DIR_LOG, LOGFILE);
const int oldmask = umask(0111);
#ifdef WIN_NT

View File

@ -537,7 +537,7 @@ found: ;
{
UCHAR buffer[BUFFER_LARGE];
att->getInfo(status, pinfo - info, info, sizeof(buffer), buffer);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return;
const UCHAR* p = buffer;

View File

@ -189,7 +189,7 @@ void load(CheckStatusWrapper* status, ISC_QUAD* blobId, IAttachment* att, ITrans
// Open the blob. If it failed, what the hell -- just return failure
IBlob* blob = att->createBlob(status, tra, blobId, 0, NULL);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return;
// Copy data from file to blob. Make up boundaries at end of line.
@ -211,7 +211,7 @@ void load(CheckStatusWrapper* status, ISC_QUAD* blobId, IAttachment* att, ITrans
const SSHORT l = p - buffer;
blob->putSegment(status, l, buffer);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
blob->close(&temp);
return;
@ -243,7 +243,7 @@ void dump(CheckStatusWrapper* status, ISC_QUAD* blobId, IAttachment* att, ITrans
// Open the blob. If it failed, what the hell -- just return failure
IBlob* blob = att->openBlob(status, tra, blobId, 0, NULL);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return;
// Copy data from blob to scratch file
@ -256,8 +256,8 @@ void dump(CheckStatusWrapper* status, ISC_QUAD* blobId, IAttachment* att, ITrans
unsigned l = 0;
switch (blob->getSegment(status, short_length, buffer, &l))
{
case Firebird::IStatus::FB_ERROR:
case Firebird::IStatus::FB_NO_DATA:
case Firebird::IStatus::ERROR:
case Firebird::IStatus::NO_DATA:
break;
}
@ -314,7 +314,7 @@ FB_BOOLEAN edit(CheckStatusWrapper* status, ISC_QUAD* blob_id, IAttachment* att,
// Would have saved me a lot of time, if I had seen this earlier :-(
// FSG 15.Oct.2000
PathName tmpf = TempFile::create(status, buffer);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return FB_FALSE;
FILE* file = os_utils::fopen(tmpf.c_str(), FOPEN_WRITE_TYPE_TEXT);
@ -326,7 +326,7 @@ FB_BOOLEAN edit(CheckStatusWrapper* status, ISC_QUAD* blob_id, IAttachment* att,
dump(status, blob_id, att, tra, file);
if (status->getStatus() & IStatus::FB_HAS_ERRORS)
if (status->getState() & IStatus::STATE_ERRORS)
{
isc_print_status(status->getErrors());
fclose(file);
@ -348,7 +348,7 @@ FB_BOOLEAN edit(CheckStatusWrapper* status, ISC_QUAD* blob_id, IAttachment* att,
load(status, blob_id, att, tra, file);
fclose(file);
return status->getStatus() & IStatus::FB_HAS_ERRORS ? FB_FALSE : FB_TRUE;
return status->getState() & IStatus::STATE_ERRORS ? FB_FALSE : FB_TRUE;
}
unlink(tmpf.c_str());
@ -448,7 +448,7 @@ void UtilInterface::getFbVersion(CheckStatusWrapper* status, IAttachment* att,
do
{
att->getInfo(status, sizeof(info), info, buf_len, buf);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return;
const UCHAR* p = buf;
@ -549,14 +549,14 @@ void UtilInterface::getFbVersion(CheckStatusWrapper* status, IAttachment* att,
s.printf("%s (%s), version \"%.*s\"", implementation_string, class_string, l, versions);
callback->callback(status, s.c_str());
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return;
versions += l;
}
USHORT ods_version, ods_minor_version;
get_ods_version(status, att, &ods_version, &ods_minor_version);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return;
s.printf("on disk structure version %d.%d", ods_version, ods_minor_version);
@ -586,7 +586,7 @@ YAttachment* UtilInterface::executeCreateDatabase(
if (stmtIsCreateDb)
*stmtIsCreateDb = FB_TRUE;
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return NULL;
LocalStatus tempStatus;
@ -594,7 +594,7 @@ YAttachment* UtilInterface::executeCreateDatabase(
ITransaction* crdbTrans = att->startTransaction(status, 0, NULL);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
att->dropDatabase(&tempCheckStatusWrapper);
return NULL;
@ -605,7 +605,7 @@ YAttachment* UtilInterface::executeCreateDatabase(
if (!stmtEaten)
{
att->execute(status, crdbTrans, stmtLength, creatDBstatement, dialect, NULL, NULL, NULL, NULL);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
crdbTrans->rollback(&tempCheckStatusWrapper);
att->dropDatabase(&tempCheckStatusWrapper);
@ -614,7 +614,7 @@ YAttachment* UtilInterface::executeCreateDatabase(
}
crdbTrans->commit(status);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
crdbTrans->rollback(&tempCheckStatusWrapper);
att->dropDatabase(&tempCheckStatusWrapper);
@ -1530,13 +1530,13 @@ int API_ROUTINE isc_version(FB_API_HANDLE* handle, FPTR_VERSION_CALLBACK routine
LocalStatus st;
RefPtr<IAttachment> att(REF_NO_INCR, handleToIAttachment(&st, handle));
if (st.getStatus() & IStatus::FB_HAS_ERRORS)
if (st.getState() & IStatus::STATE_ERRORS)
return FB_FAILURE;
VersionCallback callback(routine, user_arg);
UtilInterfacePtr()->getFbVersion(&st, att, &callback);
return st.getStatus() & IStatus::FB_HAS_ERRORS ? FB_FAILURE : FB_SUCCESS;
return st.getState() & IStatus::STATE_ERRORS ? FB_FAILURE : FB_SUCCESS;
}
@ -1695,10 +1695,10 @@ int API_ROUTINE BLOB_display(ISC_QUAD* blob_id,
CheckStatusWrapper statusWrapper(&st);
RefPtr<IAttachment> att(REF_NO_INCR, handleToIAttachment(&statusWrapper, &database));
if (st.getStatus() & IStatus::FB_HAS_ERRORS)
if (st.getState() & IStatus::STATE_ERRORS)
return FB_FAILURE;
RefPtr<ITransaction> tra(REF_NO_INCR, handleToITransaction(&statusWrapper, &transaction));
if (st.getStatus() & IStatus::FB_HAS_ERRORS)
if (st.getState() & IStatus::STATE_ERRORS)
return FB_FAILURE;
try
@ -1710,7 +1710,7 @@ int API_ROUTINE BLOB_display(ISC_QUAD* blob_id,
ex.stuffException(&st);
}
if (st.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (st.getState() & Firebird::IStatus::STATE_ERRORS)
{
isc_print_status(st.getErrors());
return FB_FAILURE;
@ -1770,15 +1770,15 @@ static int any_text_dump(ISC_QUAD* blob_id,
**************************************/
LocalStatus st;
RefPtr<IAttachment> att(REF_NO_INCR, handleToIAttachment(&st, &database));
if (st.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (st.getState() & Firebird::IStatus::STATE_ERRORS)
return FB_FAILURE;
RefPtr<ITransaction> tra(REF_NO_INCR, handleToITransaction(&st, &transaction));
if (st.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (st.getState() & Firebird::IStatus::STATE_ERRORS)
return FB_FAILURE;
UtilInterfacePtr()->dumpBlob(&st, blob_id, att, tra, file_name, txt);
if (st.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (st.getState() & Firebird::IStatus::STATE_ERRORS)
{
isc_print_status(st.getErrors());
return FB_FAILURE;
@ -1871,10 +1871,10 @@ int API_ROUTINE BLOB_edit(ISC_QUAD* blob_id,
CheckStatusWrapper statusWrapper(&st);
RefPtr<IAttachment> att(REF_NO_INCR, handleToIAttachment(&statusWrapper, &database));
if (st.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (st.getState() & Firebird::IStatus::STATE_ERRORS)
return FB_FAILURE;
RefPtr<ITransaction> tra(REF_NO_INCR, handleToITransaction(&statusWrapper, &transaction));
if (st.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (st.getState() & Firebird::IStatus::STATE_ERRORS)
return FB_FAILURE;
int rc = FB_SUCCESS;
@ -1888,7 +1888,7 @@ int API_ROUTINE BLOB_edit(ISC_QUAD* blob_id,
ex.stuffException(&st);
}
if (st.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (st.getState() & Firebird::IStatus::STATE_ERRORS)
isc_print_status(st.getErrors());
return rc;
@ -1986,15 +1986,15 @@ static int any_text_load(ISC_QUAD* blob_id,
**************************************/
LocalStatus st;
RefPtr<IAttachment> att(REF_NO_INCR, handleToIAttachment(&st, &database));
if (st.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (st.getState() & Firebird::IStatus::STATE_ERRORS)
return FB_FAILURE;
RefPtr<ITransaction> tra(REF_NO_INCR, handleToITransaction(&st, &transaction));
if (st.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (st.getState() & Firebird::IStatus::STATE_ERRORS)
return FB_FAILURE;
UtilInterfacePtr()->loadBlob(&st, blob_id, att, tra, file_name, flag);
if (st.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (st.getState() & Firebird::IStatus::STATE_ERRORS)
{
isc_print_status(st.getErrors());
return FB_FAILURE;
@ -2247,7 +2247,7 @@ static void get_ods_version(CheckStatusWrapper* status, IAttachment* att,
att->getInfo(status, sizeof(ods_info), ods_info, sizeof(buffer), buffer);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return;
const UCHAR* p = buffer;

View File

@ -1319,7 +1319,7 @@ namespace {
statement->openCursor(status, transaction, inMetadata, buffer, outMetadata, 0);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return;
fb_assert(statement->cursor);
@ -1334,7 +1334,7 @@ namespace {
fb_assert(!pseudoOpened);
statement->cursor->close(status);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
status_exception::raise(status);
statement->cursor = NULL;
@ -1350,7 +1350,7 @@ namespace {
if (statement)
{
statement->free(status);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
status_exception::raise(status);
statement = NULL;
@ -1370,7 +1370,7 @@ namespace {
ITransaction* newTrans = statement->execute(status, transaction,
inMetadata, inBuffer, outMetadata, outBuffer);
if (!(status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status->getState() & Firebird::IStatus::STATE_ERRORS))
{
if (transaction && !newTrans)
{
@ -1395,13 +1395,13 @@ namespace {
{
statement->cursor->setDelayedOutputFormat(status, outMetadata);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return FB_FALSE;
delayedFormat = false;
}
return statement->cursor->fetchNext(status, outBuffer) == IStatus::FB_OK;
return statement->cursor->fetchNext(status, outBuffer) == IStatus::OK;
}
}
@ -1538,7 +1538,7 @@ static ISC_STATUS openOrCreateBlob(ISC_STATUS* userStatus, FB_API_HANDLE* dbHand
attachment->createBlob(&statusWrapper, transaction, blobId, bpbLength, bpb) :
attachment->openBlob(&statusWrapper, transaction, blobId, bpbLength, bpb);
if (status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status.getState() & Firebird::IStatus::STATE_ERRORS)
return status[1];
*blobHandle = blob->getHandle();
@ -1634,12 +1634,12 @@ ISC_STATUS API_ROUTINE isc_attach_database(ISC_STATUS* userStatus, SSHORT fileLe
RefPtr<Dispatcher> dispatcher(new Dispatcher);
dispatcher->setDbCryptCallback(&statusWrapper, TLS_GET(legacyCryptCallback));
if (status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status.getState() & Firebird::IStatus::STATE_ERRORS)
return status[1];
YAttachment* attachment = dispatcher->attachDatabase(&statusWrapper, pathName.c_str(),
dpbLength, reinterpret_cast<const UCHAR*>(dpb));
if (status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status.getState() & Firebird::IStatus::STATE_ERRORS)
return status[1];
*publicHandle = attachment->getHandle();
@ -1696,7 +1696,7 @@ ISC_STATUS API_ROUTINE isc_cancel_blob(ISC_STATUS* userStatus, FB_API_HANDLE* bl
blob->cancel(&statusWrapper);
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
*blobHandle = 0;
}
catch (const Exception& e)
@ -1725,7 +1725,7 @@ ISC_STATUS API_ROUTINE isc_cancel_events(ISC_STATUS* userStatus, FB_API_HANDLE*
event->cancel(&statusWrapper);
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
*id = 0;
}
catch (const Exception& e)
@ -1770,7 +1770,7 @@ ISC_STATUS API_ROUTINE isc_close_blob(ISC_STATUS* userStatus, FB_API_HANDLE* blo
blob->close(&statusWrapper);
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
*blobHandle = 0;
}
catch (const Exception& e)
@ -1793,7 +1793,7 @@ ISC_STATUS API_ROUTINE isc_commit_transaction(ISC_STATUS* userStatus, FB_API_HAN
RefPtr<YTransaction> transaction(translateHandle(transactions, traHandle));
transaction->commit(&statusWrapper);
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
*traHandle = 0;
}
catch (const Exception& e)
@ -1843,7 +1843,7 @@ ISC_STATUS API_ROUTINE isc_compile_request(ISC_STATUS* userStatus, FB_API_HANDLE
request = attachment->compileRequest(&statusWrapper, blrLength,
reinterpret_cast<const UCHAR*>(blr));
if (status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status.getState() & Firebird::IStatus::STATE_ERRORS)
return status[1];
*reqHandle = request->getHandle();
@ -1930,7 +1930,7 @@ ISC_STATUS API_ROUTINE isc_create_database(ISC_STATUS* userStatus, USHORT fileLe
RefPtr<Dispatcher> dispatcher(new Dispatcher);
dispatcher->setDbCryptCallback(&statusWrapper, TLS_GET(legacyCryptCallback));
if (status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status.getState() & Firebird::IStatus::STATE_ERRORS)
return status[1];
ClumpletWriter newDpb(ClumpletReader::dpbList, MAX_DPB_SIZE, dpb, dpbLength);
@ -1943,7 +1943,7 @@ ISC_STATUS API_ROUTINE isc_create_database(ISC_STATUS* userStatus, USHORT fileLe
YAttachment* attachment = dispatcher->createDatabase(&statusWrapper, pathName.c_str(),
dpbLength, reinterpret_cast<const UCHAR*>(dpb));
if (status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status.getState() & Firebird::IStatus::STATE_ERRORS)
return status[1];
*publicHandle = attachment->getHandle();
@ -1973,7 +1973,7 @@ ISC_STATUS API_ROUTINE isc_database_cleanup(ISC_STATUS* userStatus, FB_API_HANDL
attachment->addCleanupHandler(&statusWrapper, callback);
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
callback.release();
}
catch (const Exception& e)
@ -2041,7 +2041,7 @@ ISC_STATUS API_ROUTINE isc_detach_database(ISC_STATUS* userStatus, FB_API_HANDLE
RefPtr<YAttachment> attachment(translateHandle(attachments, handle));
attachment->detach(&statusWrapper);
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
*handle = 0;
}
catch (const Exception& e)
@ -2072,7 +2072,7 @@ ISC_STATUS API_ROUTINE isc_drop_database(ISC_STATUS* userStatus, FB_API_HANDLE*
RefPtr<YAttachment> attachment(translateHandle(attachments, handle));
attachment->dropDatabase(&statusWrapper);
if ((!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)) || status[1] == isc_drdb_completed_with_errs)
if ((!(status.getState() & Firebird::IStatus::STATE_ERRORS)) || status[1] == isc_drdb_completed_with_errs)
*handle = 0;
}
catch (const Exception& e)
@ -2228,7 +2228,7 @@ ISC_STATUS API_ROUTINE isc_dsql_execute2(ISC_STATUS* userStatus, FB_API_HANDLE*
statement->checkPrepared();
const unsigned flags = statement->statement->getFlags(&statusWrapper);
if (status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status.getState() & Firebird::IStatus::STATE_ERRORS)
{
return status[1];
}
@ -2243,7 +2243,7 @@ ISC_STATUS API_ROUTINE isc_dsql_execute2(ISC_STATUS* userStatus, FB_API_HANDLE*
statement->openCursor(&statusWrapper, traHandle,
inMessage.metadata, inMsgBuffer.begin(), DELAYED_OUT_FORMAT);
if (status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status.getState() & Firebird::IStatus::STATE_ERRORS)
{
return status[1];
}
@ -2256,7 +2256,7 @@ ISC_STATUS API_ROUTINE isc_dsql_execute2(ISC_STATUS* userStatus, FB_API_HANDLE*
statement->execute(&statusWrapper, traHandle,
inMessage.metadata, inMsgBuffer.begin(), outMessage.metadata, outMessage.getBuffer());
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
outMessage.scatterData();
}
}
@ -2304,7 +2304,7 @@ ISC_STATUS API_ROUTINE isc_dsql_execute2_m(ISC_STATUS* userStatus, FB_API_HANDLE
InternalMessageBuffer outMsgBuffer(outBlrLength, (const UCHAR*)outBlr, outMsgLength, (UCHAR*)outMsg);
const unsigned flags = statement->statement->getFlags(&statusWrapper);
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
{
if ((flags & IStatement::FLAG_HAS_CURSOR) && (outMsgLength == 0))
{
@ -2367,7 +2367,7 @@ ISC_STATUS API_ROUTINE isc_dsql_exec_immed2(ISC_STATUS* userStatus, FB_API_HANDL
if (stmtIsCrDb)
{
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
*dbHandle = att->getHandle();
return status[1];
@ -2385,7 +2385,7 @@ ISC_STATUS API_ROUTINE isc_dsql_exec_immed2(ISC_STATUS* userStatus, FB_API_HANDL
dialect, inMessage.metadata, inMessageBuffer.begin(),
outMessage.metadata, outMessage.getBuffer());
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
{
outMessage.scatterData();
}
@ -2435,7 +2435,7 @@ ISC_STATUS API_ROUTINE isc_dsql_exec_immed2_m(ISC_STATUS* userStatus, FB_API_HAN
if (stmtIsCrDb)
{
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
*dbHandle = att->getHandle();
return status[1];
@ -2495,7 +2495,7 @@ ISC_STATUS API_ROUTINE isc_dsql_fetch(ISC_STATUS* userStatus, FB_API_HANDLE* stm
if (statement->fetch(&statusWrapper, outMessage.metadata, outMessage.getBuffer()))
outMessage.scatterData();
else if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
else if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
return 100;
}
catch (const Exception& e)
@ -2527,7 +2527,7 @@ ISC_STATUS API_ROUTINE isc_dsql_fetch_m(ISC_STATUS* userStatus, FB_API_HANDLE* s
}
if (!statement->fetch(&statusWrapper, msgBuffer.metadata, reinterpret_cast<UCHAR*>(msg)) &&
!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
!(status.getState() & Firebird::IStatus::STATE_ERRORS))
{
return 100;
}
@ -2616,7 +2616,7 @@ ISC_STATUS API_ROUTINE isc_dsql_prepare(ISC_STATUS* userStatus, FB_API_HANDLE* t
if (statement->statement)
{
statement->closeStatement(&statusWrapper);
if (status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status.getState() & Firebird::IStatus::STATE_ERRORS)
return status[1];
}
@ -2628,7 +2628,7 @@ ISC_STATUS API_ROUTINE isc_dsql_prepare(ISC_STATUS* userStatus, FB_API_HANDLE* t
statement->statement = statement->attachment->prepare(&statusWrapper, transaction,
stmtLength, sqlStmt, dialect, IStatement::PREPARE_PREFETCH_METADATA);
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
{
StatusVector tempStatus(NULL);
CheckStatusWrapper tempCheckStatusWrapper(&tempStatus);
@ -2665,7 +2665,7 @@ ISC_STATUS API_ROUTINE isc_dsql_prepare_m(ISC_STATUS* userStatus, FB_API_HANDLE*
if (statement->statement)
{
statement->closeStatement(&statusWrapper);
if (status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status.getState() & Firebird::IStatus::STATE_ERRORS)
return status[1];
}
@ -2680,7 +2680,7 @@ ISC_STATUS API_ROUTINE isc_dsql_prepare_m(ISC_STATUS* userStatus, FB_API_HANDLE*
statement->statement = statement->attachment->prepare(&statusWrapper, transaction,
stmtLength, sqlStmt, dialect, flags);
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
{
StatusVector tempStatus(NULL);
CheckStatusWrapper tempCheckStatusWrapper(&tempStatus);
@ -2820,7 +2820,7 @@ ISC_STATUS API_ROUTINE isc_wait_for_event(ISC_STATUS* userStatus, FB_API_HANDLE*
events = attachment->queEvents(&statusWrapper, callback, length, eventsData);
if (status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status.getState() & Firebird::IStatus::STATE_ERRORS)
return status[1];
callback->sem.enter();
@ -2897,7 +2897,7 @@ ISC_STATUS API_ROUTINE isc_que_events(ISC_STATUS* userStatus, FB_API_HANDLE* dbH
events = attachment->queEvents(&statusWrapper, callback, length, eventsData);
if (status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status.getState() & Firebird::IStatus::STATE_ERRORS)
return status[1];
*id = FB_API_HANDLE_TO_ULONG(events->getHandle());
@ -2932,16 +2932,16 @@ ISC_STATUS API_ROUTINE isc_get_segment(ISC_STATUS* userStatus, FB_API_HANDLE* bl
unsigned int length;
int cc = blob->getSegment(&statusWrapper, bufferLength, buffer, &length);
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
*returnLength = length;
// Raise pseudo errors
switch (cc)
{
case IStatus::FB_NO_DATA:
case IStatus::NO_DATA:
Arg::Gds(isc_segstr_eof).raise();
break;
case IStatus::FB_SEGMENT:
case IStatus::SEGMENT:
Arg::Gds(isc_segment).raise();
break;
}
@ -2971,7 +2971,7 @@ ISC_STATUS API_ROUTINE isc_get_slice(ISC_STATUS* userStatus, FB_API_HANDLE* dbHa
int length = attachment->getSlice(&statusWrapper, transaction, arrayId, sdlLength, sdl,
paramLength, param, sliceLength, slice);
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS) && returnLength)
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS) && returnLength)
*returnLength = length;
}
catch (const Exception& e)
@ -2994,7 +2994,7 @@ ISC_STATUS API_ROUTINE fb_disconnect_transaction(ISC_STATUS* userStatus, FB_API_
RefPtr<YTransaction> transaction(translateHandle(transactions, traHandle));
transaction->disconnect(&statusWrapper);
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
*traHandle = 0; // ASF: Previous versions wasn't cleaning the handle.
}
catch (const Exception& e)
@ -3134,7 +3134,7 @@ ISC_STATUS API_ROUTINE isc_reconnect_transaction(ISC_STATUS* userStatus, FB_API_
YTransaction* transaction = attachment->reconnectTransaction(&statusWrapper, length, id);
if (status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status.getState() & Firebird::IStatus::STATE_ERRORS)
status_exception::raise(status);
*traHandle = transaction->getHandle();
@ -3159,7 +3159,7 @@ ISC_STATUS API_ROUTINE isc_release_request(ISC_STATUS* userStatus, FB_API_HANDLE
RefPtr<YRequest> request(translateHandle(requests, reqHandle));
request->free(&statusWrapper);
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
*reqHandle = 0;
}
catch (const Exception& e)
@ -3244,7 +3244,7 @@ ISC_STATUS API_ROUTINE isc_rollback_transaction(ISC_STATUS* userStatus, FB_API_H
RefPtr<YTransaction> transaction(translateHandle(transactions, traHandle));
transaction->rollback(&statusWrapper);
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
*traHandle = 0;
}
catch (const Exception& e)
@ -3268,7 +3268,7 @@ ISC_STATUS API_ROUTINE isc_seek_blob(ISC_STATUS* userStatus, FB_API_HANDLE* blob
RefPtr<YBlob> blob(translateHandle(blobs, blobHandle));
unsigned int pos = blob->seek(&statusWrapper, mode, offset);
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS) && result)
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS) && result)
*result = pos;
}
catch (const Exception& e)
@ -3322,12 +3322,12 @@ ISC_STATUS API_ROUTINE isc_service_attach(ISC_STATUS* userStatus, USHORT service
RefPtr<Dispatcher> dispatcher(new Dispatcher);
dispatcher->setDbCryptCallback(&statusWrapper, TLS_GET(legacyCryptCallback));
if (status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status.getState() & Firebird::IStatus::STATE_ERRORS)
return status[1];
service = dispatcher->attachServiceManager(&statusWrapper, svcName.c_str(),
spbLength, reinterpret_cast<const UCHAR*>(spb));
if (status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status.getState() & Firebird::IStatus::STATE_ERRORS)
return status[1];
*publicHandle = service->getHandle();
@ -3359,7 +3359,7 @@ ISC_STATUS API_ROUTINE isc_service_detach(ISC_STATUS* userStatus, FB_API_HANDLE*
RefPtr<YService> service(translateHandle(services, handle));
service->detach(&statusWrapper);
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
*handle = 0;
}
catch (const Exception& e)
@ -3500,7 +3500,7 @@ ISC_STATUS API_ROUTINE isc_start_multiple(ISC_STATUS* userStatus, FB_API_HANDLE*
}
DtcStart* ds = MasterImplementation::dtc->startBuilder(&statusWrapper);
if (statusWrapper.getStatus() & IStatus::FB_HAS_ERRORS)
if (statusWrapper.getState() & IStatus::STATE_ERRORS)
return status[1];
for (SSHORT i = 0; i < count; ++i, ++vector)
@ -3509,7 +3509,7 @@ ISC_STATUS API_ROUTINE isc_start_multiple(ISC_STATUS* userStatus, FB_API_HANDLE*
ds->addWithTpb(&statusWrapper, attachment, vector->teb_tpb_length,
reinterpret_cast<const unsigned char*>(vector->teb_tpb));
if (statusWrapper.getStatus() & IStatus::FB_HAS_ERRORS)
if (statusWrapper.getState() & IStatus::STATE_ERRORS)
{
ds->dispose();
return status[1];
@ -3614,7 +3614,7 @@ ISC_STATUS API_ROUTINE gds__transaction_cleanup(ISC_STATUS* userStatus, FB_API_H
transaction->addCleanupHandler(&statusWrapper, callback);
if (!(status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status.getState() & Firebird::IStatus::STATE_ERRORS))
callback.release();
}
catch (const Exception& e)
@ -3679,7 +3679,7 @@ int API_ROUTINE fb_shutdown(unsigned int timeout, const int reason)
RefPtr<Dispatcher> dispatcher(new Dispatcher);
dispatcher->shutdown(&statusWrapper, timeout, reason);
return (status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS) ? FB_FAILURE : FB_SUCCESS;
return (status.getState() & Firebird::IStatus::STATE_ERRORS) ? FB_FAILURE : FB_SUCCESS;
}
@ -3836,7 +3836,7 @@ void YEvents::cancel(CheckStatusWrapper* status)
entry.next()->cancel(status);
if (!(status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status->getState() & Firebird::IStatus::STATE_ERRORS))
destroy(DF_RELEASE);
}
catch (const Exception& e)
@ -3975,7 +3975,7 @@ void YRequest::free(CheckStatusWrapper* status)
entry.next()->free(status);
if (!(status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status->getState() & Firebird::IStatus::STATE_ERRORS))
destroy(DF_RELEASE);
}
catch (const Exception& e)
@ -4065,7 +4065,7 @@ void YBlob::cancel(CheckStatusWrapper* status)
entry.next()->cancel(status);
if (!(status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status->getState() & Firebird::IStatus::STATE_ERRORS))
destroy(DF_RELEASE);
}
catch (const Exception& e)
@ -4082,7 +4082,7 @@ void YBlob::close(CheckStatusWrapper* status)
entry.next()->close(status);
if (!(status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status->getState() & Firebird::IStatus::STATE_ERRORS))
destroy(DF_RELEASE);
}
catch (const Exception& e)
@ -4223,7 +4223,7 @@ IMessageMetadata* YStatement::getMetadata(bool in, IStatement* next)
IMessageMetadata* rc = in ?
next->getInputMetadata(&statusWrapper) : next->getOutputMetadata(&statusWrapper);
if (status.getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status.getState() & Firebird::IStatus::STATE_ERRORS)
status_exception::raise(&status);
return rc;
@ -4329,7 +4329,7 @@ IResultSet* YStatement::openCursor(Firebird::CheckStatusWrapper* status, ITransa
attachment->getNextTransaction(status, transaction, trans);
IResultSet* rs = entry.next()->openCursor(status, trans, inMetadata, inBuffer, outMetadata, flags);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
return NULL;
}
@ -4354,7 +4354,7 @@ void YStatement::free(CheckStatusWrapper* status)
YEntry<YStatement> entry(status, this);
entry.next()->free(status);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
return;
}
@ -4594,7 +4594,7 @@ void YResultSet::close(CheckStatusWrapper* status)
entry.next()->close(status);
if (!(status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status->getState() & Firebird::IStatus::STATE_ERRORS))
destroy(DF_RELEASE);
}
catch (const Exception& e)
@ -4690,7 +4690,7 @@ void YTransaction::commit(CheckStatusWrapper* status)
entry.next()->commit(status);
if (!(status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status->getState() & Firebird::IStatus::STATE_ERRORS))
destroy(DF_RELEASE);
}
catch (const Exception& e)
@ -4723,7 +4723,7 @@ void YTransaction::rollback(CheckStatusWrapper* status)
if (isNetworkError(status))
status->init();
if (!(status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status->getState() & Firebird::IStatus::STATE_ERRORS))
destroy(DF_RELEASE);
}
catch (const Exception& e)
@ -4759,7 +4759,7 @@ void YTransaction::disconnect(CheckStatusWrapper* status)
{
i->next->disconnect(status);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
return;
i->next = NULL;
@ -4951,7 +4951,7 @@ YStatement* YAttachment::prepare(CheckStatusWrapper* status, ITransaction* trans
getNextTransaction(status, transaction, trans);
IStatement* st = entry.next()->prepare(status, trans, stmtLength, sqlStmt, dialect, flags);
if (!(status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status->getState() & Firebird::IStatus::STATE_ERRORS))
{
return new YStatement(this, st);
}
@ -5159,7 +5159,7 @@ IResultSet* YAttachment::openCursor(CheckStatusWrapper* status, ITransaction* tr
rs = entry.next()->openCursor(status, trans, length, string, dialect,
inMetadata, inBuffer, outMetadata, cursorName, cursorFlags);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
return NULL;
}
@ -5234,7 +5234,7 @@ void YAttachment::execute(Firebird::CheckStatusWrapper* status, FB_API_HANDLE* t
ITransaction* newTrans = execute(status, transaction, stmtLength, sqlStmt,
dialect, inMetadata, inBuffer, outMetadata, outBuffer);
if (!(status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status->getState() & Firebird::IStatus::STATE_ERRORS))
{
if (transaction && !newTrans)
{
@ -5296,7 +5296,7 @@ void YAttachment::ping(CheckStatusWrapper* status)
entry.next()->ping(status);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
{
if (!savedStatus.getError())
savedStatus.save(status);
@ -5324,7 +5324,7 @@ void YAttachment::detach(CheckStatusWrapper* status)
if (entry.next())
entry.next()->detach(status);
if (!(status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status->getState() & Firebird::IStatus::STATE_ERRORS))
destroy(DF_RELEASE);
}
catch (const Exception& e)
@ -5341,7 +5341,7 @@ void YAttachment::dropDatabase(CheckStatusWrapper* status)
entry.next()->dropDatabase(status);
if (!(status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status->getState() & Firebird::IStatus::STATE_ERRORS))
destroy(DF_RELEASE);
}
catch (const Exception& e)
@ -5375,7 +5375,7 @@ YTransaction* YAttachment::getTransaction(CheckStatusWrapper* status, ITransacti
// If validation is successfull, this means that this attachment and valid transaction
// use same provider. I.e. the following cast is safe.
YTransaction* yt = static_cast<YTransaction*>(tra->validate(status, this));
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
status_exception::raise(status);
if (!yt)
Arg::Gds(isc_bad_trans_handle).raise();
@ -5565,7 +5565,7 @@ YAttachment* Dispatcher::attachOrCreateDatabase(Firebird::CheckStatusWrapper* st
CheckStatusWrapper tempCheckStatusWrapper(&temp);
CheckStatusWrapper* currentStatus = status;
for (GetPlugins<IProvider> providerIterator(IPluginManager::Provider, config);
for (GetPlugins<IProvider> providerIterator(IPluginManager::TYPE_PROVIDER, config);
providerIterator.hasData();
providerIterator.next())
{
@ -5574,7 +5574,7 @@ YAttachment* Dispatcher::attachOrCreateDatabase(Firebird::CheckStatusWrapper* st
if (cryptCallback)
{
provider->setDbCryptCallback(currentStatus, cryptCallback);
if (currentStatus->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (currentStatus->getState() & Firebird::IStatus::STATE_ERRORS)
continue;
}
@ -5584,7 +5584,7 @@ YAttachment* Dispatcher::attachOrCreateDatabase(Firebird::CheckStatusWrapper* st
provider->attachDatabase(currentStatus, expandedFilename.c_str(),
newDpb.getBufferLength(), newDpb.getBuffer());
if (!(currentStatus->getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(currentStatus->getState() & Firebird::IStatus::STATE_ERRORS))
{
if (createFlag)
{
@ -5660,7 +5660,7 @@ YService* Dispatcher::attachServiceManager(CheckStatusWrapper* status, const cha
Config::merge(config, &spb_config);
}
for (GetPlugins<IProvider> providerIterator(IPluginManager::Provider, config);
for (GetPlugins<IProvider> providerIterator(IPluginManager::TYPE_PROVIDER, config);
providerIterator.hasData();
providerIterator.next())
{
@ -5669,18 +5669,18 @@ YService* Dispatcher::attachServiceManager(CheckStatusWrapper* status, const cha
if (cryptCallback)
{
p->setDbCryptCallback(status, cryptCallback);
if (status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS)
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
continue;
}
service = p->attachServiceManager(status, svcName.c_str(),
spbWriter.getBufferLength(), spbWriter.getBuffer());
if (!(status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status->getState() & Firebird::IStatus::STATE_ERRORS))
return new YService(p, service, utfData);
}
if (!(status->getStatus() & Firebird::IStatus::FB_HAS_ERRORS))
if (!(status->getState() & Firebird::IStatus::STATE_ERRORS))
{
(Arg::Gds(isc_service_att_err) <<
Arg::Gds(isc_no_providers)).copyTo(status);
@ -5749,7 +5749,7 @@ void Dispatcher::shutdown(CheckStatusWrapper* userStatus, unsigned int timeout,
shutdownStarted = true;
// Shutdown providers (if any present).
for (GetPlugins<IProvider> providerIterator(IPluginManager::Provider);
for (GetPlugins<IProvider> providerIterator(IPluginManager::TYPE_PROVIDER);
providerIterator.hasData();
providerIterator.next())
{
@ -5837,7 +5837,7 @@ void Dispatcher::shutdown(CheckStatusWrapper* userStatus, unsigned int timeout,
}
// ... and wait for all providers to go away
PluginManager::waitForType(IPluginManager::Provider);
PluginManager::waitForType(IPluginManager::TYPE_PROVIDER);
// Shutdown clients after providers.
if (ShutChain::run(fb_shut_postproviders, reason) != FB_SUCCESS)