8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 22:43:04 +01:00
This commit is contained in:
asfernandes 2008-04-27 02:39:51 +00:00
parent 13915998c3
commit 53a2090f65
7 changed files with 11 additions and 4 deletions

View File

@ -415,6 +415,7 @@ namespace Firebird
}
static unsigned int hash(const_pointer string, size_type tableSize);
inline unsigned int hash(size_type tableSize) const
{
return hash(c_str(), tableSize);

View File

@ -372,5 +372,4 @@ void ConfigFile::wildCardInclude(const char* fileName)
while (scanDir.next())
pushStream (new InputFile (scanDir.getFilePath()));
}

View File

@ -605,8 +605,7 @@ void CVT2_get_name(const dsc* desc, TEXT* string, FPTR_ERROR err)
VARY_STR(MAX_SQL_IDENTIFIER_SIZE) temp; /* 31 bytes + 1 NULL */
const char* p;
const USHORT length = CVT_make_string(desc, ttype_metadata, &p,
(vary*) &temp, sizeof(temp), err);
const USHORT length = CVT_make_string(desc, ttype_metadata, &p, (vary*) &temp, sizeof(temp), err);
memcpy(string, p, length);
string[length] = 0;

View File

@ -224,6 +224,7 @@ struct impure_value
bid vlu_bid;
void* vlu_invariant; // Pre-compiled invariant object for nod_like and other string functions
} vlu_misc;
void make_long(const SLONG val, const signed char scale = 0);
void make_int64(const SINT64 val, const signed char scale = 0);

View File

@ -5766,6 +5766,7 @@ static ISC_STATUS unwindAttach(const Firebird::Exception& ex,
ThreadStatusGuard temp_status(tdbb);
dbb->dbb_flags &= ~DBB_being_opened;
if (attachment)
{
attachment->att_mutex.enter(); // will be unlocked in release_attachment

View File

@ -744,23 +744,29 @@ public:
m_local_status[1] = m_local_status[2] = 0; // isc_arg_end is zero
m_tdbb->tdbb_status_vector = m_local_status;
}
~ThreadStatusGuard()
{
m_tdbb->tdbb_status_vector = m_old_status;
}
//ISC_STATUS* restore()
//{
// return m_tdbb->tdbb_status_vector = m_old_status; // copy, not comparison
//}
operator ISC_STATUS*() { return m_local_status; }
void copyToOriginal()
{
memcpy(m_old_status, m_local_status, sizeof(ISC_STATUS_ARRAY));
}
private:
thread_db* const m_tdbb;
ISC_STATUS* const m_old_status;
ISC_STATUS_ARRAY m_local_status;
// copying is prohibited
ThreadStatusGuard(const ThreadStatusGuard&);
ThreadStatusGuard& operator=(const ThreadStatusGuard&);