mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 22:43:04 +01:00
Fixed CORE-2101: Bugcheck 249 when attempting to fetch outside the end-of-stream mark for the open PSQL cursor.
This commit is contained in:
parent
d58aa84877
commit
a2eee6c085
@ -2105,6 +2105,9 @@ jrd_nod* EXE_looper(thread_db* tdbb, jrd_req* request, jrd_nod* in_node)
|
||||
if (!(impure->irsb_flags & irsb_open)) {
|
||||
ERR_post(Arg::Gds(isc_cursor_not_open));
|
||||
}
|
||||
if (impure->irsb_flags & irsb_eof) {
|
||||
ERR_post(Arg::Gds(isc_stream_eof));
|
||||
}
|
||||
request->req_records_affected.clear();
|
||||
// perform preliminary navigation, if specified
|
||||
if (node->nod_arg[e_cursor_stmt_seek]) {
|
||||
|
@ -266,6 +266,8 @@ bool RSE_get_record(thread_db* tdbb, RecordSource* rsb, RSE_GET_MODE mode)
|
||||
request->req_flags &= ~req_fetch_required;
|
||||
#endif
|
||||
|
||||
impure->irsb_flags |= irsb_eof;
|
||||
|
||||
/* Turn off the flag so that records at a
|
||||
lower level will not be counted. */
|
||||
|
||||
@ -323,6 +325,8 @@ bool RSE_get_record(thread_db* tdbb, RecordSource* rsb, RSE_GET_MODE mode)
|
||||
request->req_records_selected++;
|
||||
request->req_records_affected.bumpFetched();
|
||||
}
|
||||
|
||||
impure->irsb_flags &= ~irsb_eof;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -303,12 +303,12 @@ const ULONG irsb_singular_processed = 256; // singleton stream already delivered
|
||||
const ULONG irsb_last_backwards = 512; // rsb was last scrolled in the backward direction
|
||||
const ULONG irsb_bof = 1024; // rsb is at beginning of stream
|
||||
const ULONG irsb_eof = 2048; // rsb is at end of stream
|
||||
// Obsolete: they belonged to PC_ENGINE.
|
||||
//const ULONG irsb_crack = 4096; // the record at our current position is missing
|
||||
//const ULONG irsb_forced_crack = 8192; // the above-mentioned crack was forced by user
|
||||
//const ULONG irsb_refresh = 16384; // enter records into refresh range
|
||||
#endif
|
||||
const ULONG irsb_key_changed = 32768; // key has changed since record last returned from rsb
|
||||
const ULONG irsb_key_changed = 4096; // key has changed since record last returned from rsb
|
||||
// The below flag duplicates the one from the disabled SCROLLABLE_CURSORS
|
||||
// implementation, but it's used slightly differently (at the top RSB levels).
|
||||
// To be renamed if the SCROLLABLE_CURSORS code will ever be enabled.
|
||||
const ULONG irsb_eof = 8192; // rsb is at end of stream
|
||||
|
||||
|
||||
// Sort map block
|
||||
|
Loading…
Reference in New Issue
Block a user