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); static unsigned int hash(const_pointer string, size_type tableSize);
inline unsigned int hash(size_type tableSize) const inline unsigned int hash(size_type tableSize) const
{ {
return hash(c_str(), tableSize); return hash(c_str(), tableSize);

View File

@ -372,5 +372,4 @@ void ConfigFile::wildCardInclude(const char* fileName)
while (scanDir.next()) while (scanDir.next())
pushStream (new InputFile (scanDir.getFilePath())); 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 */ VARY_STR(MAX_SQL_IDENTIFIER_SIZE) temp; /* 31 bytes + 1 NULL */
const char* p; const char* p;
const USHORT length = CVT_make_string(desc, ttype_metadata, &p, const USHORT length = CVT_make_string(desc, ttype_metadata, &p, (vary*) &temp, sizeof(temp), err);
(vary*) &temp, sizeof(temp), err);
memcpy(string, p, length); memcpy(string, p, length);
string[length] = 0; string[length] = 0;

View File

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

View File

@ -59,7 +59,7 @@ void IBERR_append_status(ISC_STATUS* status_vector, ISC_STATUS status, ...)
ISC_STATUS* const status_end = status_vector + ISC_STATUS_LENGTH; ISC_STATUS* const status_end = status_vector + ISC_STATUS_LENGTH;
while (*status_vector && status_vector < status_end) while (*status_vector && status_vector < status_end)
++status_vector; ++status_vector;
// If we fail here, an unterminated, illegal status vector was passed as argument. // If we fail here, an unterminated, illegal status vector was passed as argument.
fb_assert(status_vector < status_end); fb_assert(status_vector < status_end);

View File

@ -5766,6 +5766,7 @@ static ISC_STATUS unwindAttach(const Firebird::Exception& ex,
ThreadStatusGuard temp_status(tdbb); ThreadStatusGuard temp_status(tdbb);
dbb->dbb_flags &= ~DBB_being_opened; dbb->dbb_flags &= ~DBB_being_opened;
if (attachment) if (attachment)
{ {
attachment->att_mutex.enter(); // will be unlocked in release_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_local_status[1] = m_local_status[2] = 0; // isc_arg_end is zero
m_tdbb->tdbb_status_vector = m_local_status; m_tdbb->tdbb_status_vector = m_local_status;
} }
~ThreadStatusGuard() ~ThreadStatusGuard()
{ {
m_tdbb->tdbb_status_vector = m_old_status; m_tdbb->tdbb_status_vector = m_old_status;
} }
//ISC_STATUS* restore() //ISC_STATUS* restore()
//{ //{
// return m_tdbb->tdbb_status_vector = m_old_status; // copy, not comparison // return m_tdbb->tdbb_status_vector = m_old_status; // copy, not comparison
//} //}
operator ISC_STATUS*() { return m_local_status; } operator ISC_STATUS*() { return m_local_status; }
void copyToOriginal() void copyToOriginal()
{ {
memcpy(m_old_status, m_local_status, sizeof(ISC_STATUS_ARRAY)); memcpy(m_old_status, m_local_status, sizeof(ISC_STATUS_ARRAY));
} }
private: private:
thread_db* const m_tdbb; thread_db* const m_tdbb;
ISC_STATUS* const m_old_status; ISC_STATUS* const m_old_status;
ISC_STATUS_ARRAY m_local_status; ISC_STATUS_ARRAY m_local_status;
// copying is prohibited // copying is prohibited
ThreadStatusGuard(const ThreadStatusGuard&); ThreadStatusGuard(const ThreadStatusGuard&);
ThreadStatusGuard& operator=(const ThreadStatusGuard&); ThreadStatusGuard& operator=(const ThreadStatusGuard&);