The current position does not need to be checked upon execute (since we are

always moving forward) and especially not since its value is always zero in
any case!
This commit is contained in:
Anthony Tuininga 2017-01-12 14:08:05 -07:00
parent 71f2b1cc7e
commit d4eb90d848

View File

@ -1878,7 +1878,6 @@ static int Cursor_InternalFetch(
udt_Cursor *self, // cursor to fetch from
int numRows) // number of rows to fetch
{
ub4 currentPosition;
udt_Variable *var;
sword status;
int i;
@ -1912,15 +1911,7 @@ static int Cursor_InternalFetch(
"Cursor_InternalFetch(): get rows fetched") < 0)
return -1;
// determine the current position in the cursor
status = OCIAttrGet(self->handle, OCI_HTYPE_STMT, &currentPosition, 0,
OCI_ATTR_CURRENT_POSITION, self->environment->errorHandle);
if (Environment_CheckForError(self->environment, status,
"Cursor_InternalFetch(): get current position") < 0)
return -1;
// reset buffer row index and row count
self->rowCount = currentPosition - self->bufferRowCount;
// reset buffer row index
self->bufferRowIndex = 0;
return 0;