mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 20:03:03 +01:00
Misc
This commit is contained in:
parent
7b3fb919cb
commit
7d52a84520
@ -235,6 +235,8 @@ CharSetContainer* CharSetContainer::lookupCharset(thread_db* tdbb, USHORT ttype)
|
||||
return cs;
|
||||
}
|
||||
|
||||
|
||||
// Lookup a system character set without looking in the database.
|
||||
bool CharSetContainer::lookupInternalCharSet(USHORT id, SubtypeInfo* info)
|
||||
{
|
||||
if (id == CS_UTF16)
|
||||
@ -260,7 +262,7 @@ bool CharSetContainer::lookupInternalCharSet(USHORT id, SubtypeInfo* info)
|
||||
if (colDef->charSetId == id && colDef->collationId == 0)
|
||||
{
|
||||
info->charsetName = csDef->name;
|
||||
info->collationName = csDef->name;
|
||||
info->collationName = colDef->name;
|
||||
info->attributes = colDef->attributes;
|
||||
info->ignoreAttributes = false;
|
||||
|
||||
@ -278,6 +280,7 @@ bool CharSetContainer::lookupInternalCharSet(USHORT id, SubtypeInfo* info)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Lock* CharSetContainer::createCollationLock(thread_db* tdbb, USHORT ttype)
|
||||
{
|
||||
/**************************************
|
||||
|
@ -223,10 +223,8 @@ namespace
|
||||
|
||||
inline void validateHandle(Service* service)
|
||||
{
|
||||
if (service && service->checkHandle())
|
||||
return;
|
||||
|
||||
status_exception::raise(Arg::Gds(isc_bad_svc_handle));
|
||||
if (!service || !service->checkHandle())
|
||||
status_exception::raise(Arg::Gds(isc_bad_svc_handle));
|
||||
}
|
||||
|
||||
class AttachmentHolder
|
||||
|
@ -129,16 +129,19 @@ namespace {
|
||||
class ThreadIdHolder
|
||||
{
|
||||
public:
|
||||
explicit ThreadIdHolder(Jrd::Service::StatusStringsHelper& p) : strHelper(&p)
|
||||
explicit ThreadIdHolder(Jrd::Service::StatusStringsHelper& p)
|
||||
: strHelper(&p)
|
||||
{
|
||||
MutexLockGuard guard(strHelper->mtx);
|
||||
strHelper->workerThread = getThreadId();
|
||||
}
|
||||
|
||||
~ThreadIdHolder()
|
||||
{
|
||||
MutexLockGuard guard(strHelper->mtx);
|
||||
strHelper->workerThread = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
Jrd::Service::StatusStringsHelper* strHelper;
|
||||
};
|
||||
@ -309,10 +312,10 @@ Service::ExistenceGuard::ExistenceGuard(Service* s)
|
||||
|
||||
if (! svc->locateInAllServices())
|
||||
{
|
||||
// Service is so old that it's even missing in allSevrices array
|
||||
// Service is so old that it's even missing in allServices array
|
||||
Arg::Gds(isc_bad_svc_handle).raise();
|
||||
}
|
||||
|
||||
|
||||
if (svc->svc_flags & SVC_detached)
|
||||
{
|
||||
// Service was already detached
|
||||
|
@ -279,6 +279,7 @@ public:
|
||||
FB_THREAD_ID workerThread;
|
||||
Firebird::Mutex mtx;
|
||||
};
|
||||
|
||||
private:
|
||||
StatusStringsHelper svc_thread_strings;
|
||||
|
||||
@ -289,11 +290,14 @@ private:
|
||||
ExistenceGuard(Service* svc);
|
||||
~ExistenceGuard();
|
||||
void release();
|
||||
|
||||
private:
|
||||
Service* svc;
|
||||
bool locked;
|
||||
};
|
||||
|
||||
friend class ExistenceGuard;
|
||||
|
||||
Firebird::Mutex svc_existence_lock;
|
||||
ExistenceGuard* svc_current_guard;
|
||||
};
|
||||
|
@ -88,7 +88,7 @@ void TraceSvcJrd::startSession(TraceSession& session, bool interactive)
|
||||
m_svc.printf("Can not start trace session. There are no trace plugins loaded\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
ConfigStorage* storage = TraceManager::getStorage();
|
||||
|
||||
{ // scope
|
||||
|
@ -1636,7 +1636,7 @@ bool TracePluginImpl::checkServiceFilter(TraceService* service, bool started)
|
||||
{
|
||||
ReadLockGuard lock(servicesLock);
|
||||
|
||||
ServiceData *data = NULL;
|
||||
ServiceData* data = NULL;
|
||||
ServicesTree::Accessor accessor(&services);
|
||||
if (accessor.locate(service->getServiceID()))
|
||||
data = &accessor.current();
|
||||
|
@ -186,7 +186,7 @@ private:
|
||||
void register_sql_statement(TraceSQLStatement* statement);
|
||||
void register_blr_statement(TraceBLRStatement* statement);
|
||||
void register_service(TraceService* service);
|
||||
|
||||
|
||||
bool checkServiceFilter(TraceService* service, bool started);
|
||||
|
||||
// Write message to text log file
|
||||
|
@ -124,7 +124,7 @@
|
||||
|
||||
# default services section
|
||||
#
|
||||
# List of names of currently existing Firebirds services (to use with service
|
||||
# List of names of currently existing Firebird services (to use with service
|
||||
# filters below) :
|
||||
# Backup Database
|
||||
# Restore Database
|
||||
|
Loading…
Reference in New Issue
Block a user