From d4eb90d848ee2d75fd39b1b563a9d01db304e6b5 Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Thu, 12 Jan 2017 14:08:05 -0700 Subject: [PATCH] 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! --- Cursor.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Cursor.c b/Cursor.c index 78e70f4..c2f6fe8 100644 --- a/Cursor.c +++ b/Cursor.c @@ -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, ¤tPosition, 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;