8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 23:23:04 +01:00
This commit is contained in:
robocop 2008-12-18 12:09:35 +00:00
parent 09c0991d23
commit 29f1b0d641
3 changed files with 8 additions and 13 deletions

View File

@ -814,8 +814,8 @@ void SORT_put(thread_db* tdbb, sort_context* scb, ULONG ** record_address)
// Check that we are not at the beginning of the buffer in addition // Check that we are not at the beginning of the buffer in addition
// to checking for space for the record. This avoids the pointer // to checking for space for the record. This avoids the pointer
// record from underflowing in the second condition. // record from underflowing in the second condition.
if ((BLOB_PTR *) record < (BLOB_PTR *) (scb->scb_memory + scb->scb_longs) if ((BLOB_PTR *) record < (BLOB_PTR *) (scb->scb_memory + scb->scb_longs) ||
|| (BLOB_PTR *) NEXT_RECORD(record) <= (BLOB_PTR *) (scb->scb_next_pointer + 1)) (BLOB_PTR *) NEXT_RECORD(record) <= (BLOB_PTR *) (scb->scb_next_pointer + 1))
{ {
put_run(scb); put_run(scb);
while (true) { while (true) {
@ -1630,10 +1630,8 @@ static sort_record* get_merge(merge_control* merge, sort_context* scb
// check for end-of-file condition in either direction // check for end-of-file condition in either direction
#ifdef SCROLLABLE_CURSORS #ifdef SCROLLABLE_CURSORS
if ( if ((mode == RSE_get_backward && run->run_records >= run->run_max_records - 1) ||
(mode == RSE_get_backward (mode == RSE_get_forward && run->run_records == 0))
&& run->run_records >= run->run_max_records - 1)
|| (mode == RSE_get_forward && run->run_records == 0))
#else #else
if (run->run_records == 0) if (run->run_records == 0)
#endif #endif

View File

@ -401,9 +401,7 @@ void TRA_commit(thread_db* tdbb, jrd_tra* transaction, const bool retaining_flag
// and no events have been posted (via stored procedures etc) // and no events have been posted (via stored procedures etc)
// no-op the operation. // no-op the operation.
if (retaining_flag if (retaining_flag && !(transaction->tra_flags & TRA_write || transaction->tra_deferred_work))
&& !(transaction->tra_flags & TRA_write
|| transaction->tra_deferred_work))
{ {
transaction->tra_flags &= ~TRA_prepared; transaction->tra_flags &= ~TRA_prepared;
// Get rid of all user savepoints // Get rid of all user savepoints
@ -2590,8 +2588,7 @@ static void start_sweeper(thread_db* tdbb, Database* dbb)
* *
**************************************/ **************************************/
if ((dbb->dbb_flags & DBB_sweep_in_progress) if ((dbb->dbb_flags & DBB_sweep_in_progress) || (dbb->dbb_ast_flags & DBB_shutdown))
|| (dbb->dbb_ast_flags & DBB_shutdown))
{ {
return; // false; return; // false;
} }

View File

@ -1143,8 +1143,8 @@ int API_ROUTINE isc_version(FB_API_HANDLE* handle,
const USHORT impl_class_nr = *implementations++; const USHORT impl_class_nr = *implementations++;
const int l = *versions++; // it was UCHAR const int l = *versions++; // it was UCHAR
const TEXT* implementation_string; const TEXT* implementation_string;
if (implementation_nr >= FB_NELEM(impl_implementation) if (implementation_nr >= FB_NELEM(impl_implementation) ||
|| !(implementation_string = impl_implementation[implementation_nr])) !(implementation_string = impl_implementation[implementation_nr]))
{ {
implementation_string = "**unknown**"; implementation_string = "**unknown**";
} }