8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 01:23:03 +01:00
This commit is contained in:
asfernandes 2007-05-20 03:25:52 +00:00
parent dec656aeb6
commit 97843da8a3
3 changed files with 15 additions and 8 deletions

View File

@ -148,7 +148,7 @@ static void clear_page_dirty_flag(thread_db*, BufferDesc*);
#ifdef DIRTY_LIST #ifdef DIRTY_LIST
inline void insertDirty(BufferControl* bcb, BufferDesc* bdb) static inline void insertDirty(BufferControl* bcb, BufferDesc* bdb)
{ {
if (bdb->bdb_dirty.que_forward == &bdb->bdb_dirty) if (bdb->bdb_dirty.que_forward == &bdb->bdb_dirty)
{ {
@ -157,7 +157,7 @@ inline void insertDirty(BufferControl* bcb, BufferDesc* bdb)
} }
} }
inline void removeDirty(BufferControl* bcb, BufferDesc* bdb) static inline void removeDirty(BufferControl* bcb, BufferDesc* bdb)
{ {
if (bdb->bdb_dirty.que_forward != &bdb->bdb_dirty) if (bdb->bdb_dirty.que_forward != &bdb->bdb_dirty)
{ {
@ -2828,10 +2828,11 @@ static int blocking_ast_bdb(void* ast_object)
// Used in qsort below // Used in qsort below
extern "C" extern "C"
int cmpBdbs(const void* a, const void* b) static int cmpBdbs(const void* a, const void* b)
{ {
const BufferDesc* bdbA = *(BufferDesc**) a; const BufferDesc* bdbA = *(BufferDesc**) a;
const BufferDesc* bdbB = *(BufferDesc**) b; const BufferDesc* bdbB = *(BufferDesc**) b;
if (bdbA->bdb_page > bdbB->bdb_page) if (bdbA->bdb_page > bdbB->bdb_page)
return 1; return 1;
@ -2897,11 +2898,13 @@ static void flushDirty(thread_db* tdbb,
} }
qsort(flush.begin(), flush.getCount(), sizeof(BufferDesc*), cmpBdbs); qsort(flush.begin(), flush.getCount(), sizeof(BufferDesc*), cmpBdbs);
bool writeAll = false; bool writeAll = false;
while (flush.getCount()) while (flush.getCount())
{ {
BufferDesc **ptr = flush.begin(); BufferDesc** ptr = flush.begin();
const size_t cnt = flush.getCount(); const size_t cnt = flush.getCount();
while (ptr < flush.end()) while (ptr < flush.end())
{ {
BufferDesc* bdb = *ptr; BufferDesc* bdb = *ptr;
@ -2988,6 +2991,7 @@ static void flushAll(thread_db* tdbb, USHORT flush_flag)
} }
qsort(flush.begin(), flush.getCount(), sizeof(BufferDesc*), cmpBdbs); qsort(flush.begin(), flush.getCount(), sizeof(BufferDesc*), cmpBdbs);
bool writeAll = false; bool writeAll = false;
while (flush.getCount()) while (flush.getCount())
{ {

View File

@ -3634,7 +3634,8 @@ static void get_procedure_dependencies(DeferredWork* work, bool compile)
thread_db* tdbb = JRD_get_thread_data(); thread_db* tdbb = JRD_get_thread_data();
Database* dbb = tdbb->tdbb_database; Database* dbb = tdbb->tdbb_database;
compile = compile ? !(tdbb->tdbb_attachment->att_flags & ATT_gbak_attachment) : false; if (compile)
compile = !(tdbb->tdbb_attachment->att_flags & ATT_gbak_attachment);
jrd_prc* procedure = NULL; jrd_prc* procedure = NULL;
bid blob_id; bid blob_id;
@ -3706,7 +3707,8 @@ static void get_trigger_dependencies(DeferredWork* work, bool compile)
thread_db* tdbb = JRD_get_thread_data(); thread_db* tdbb = JRD_get_thread_data();
Database* dbb = tdbb->tdbb_database; Database* dbb = tdbb->tdbb_database;
compile = compile ? !(tdbb->tdbb_attachment->att_flags & ATT_gbak_attachment) : false; if (compile)
compile = !(tdbb->tdbb_attachment->att_flags & ATT_gbak_attachment);
jrd_rel* relation = NULL; jrd_rel* relation = NULL;
bid blob_id; bid blob_id;

View File

@ -480,7 +480,8 @@ bool printInfo(const char* p, UserPrint& up)
break; break;
case isc_info_svc_limbo_trans: case isc_info_svc_limbo_trans:
while (*p != isc_info_flag_end) { while (*p != isc_info_flag_end)
{
switch (*p++) switch (*p++)
{ {
case isc_spb_tra_host_site: case isc_spb_tra_host_site:
@ -589,7 +590,7 @@ bool printInfo(const char* p, UserPrint& up)
void usage() void usage()
{ {
for (int i=19; i<=33; ++i) for (int i = 19; i <= 33; ++i)
{ {
printf("%s\n", getMessage(i).c_str()); printf("%s\n", getMessage(i).c_str());
} }