char *new_field_name;
Int2 dummy1, dummy2;
int cidx;
+ BOOL reached_eof_now = FALSE;
if (NULL != conn)
/* First, get column information */
return FALSE;
inolog("!!%p->cursTup=%d total_read=%d\n", self, self->cursTuple, self->num_total_read);
+ if (self->num_cached_rows < self->cache_size)
+ {
+ reached_eof_now = TRUE;
+ QR_set_reached_eof(self);
+ }
if (!QR_once_reached_eof(self) && self->cursTuple >= (Int4) self->num_total_read)
self->num_total_read = self->cursTuple + 1;
+ if (reached_eof_now && self->cursTuple < (Int4) self->num_total_read)
+ self->cursTuple++;
if (NULL != conn)
{
self->tupleField = NULL;
num_rows_in = self->num_cached_rows;
- if (curr_eof)
- reached_eof_now = curr_eof;
- else
- curr_eof = reached_eof_now = (QR_once_reached_eof(self) && self->cursTuple >= (Int4)self->num_total_read);
+ curr_eof = reached_eof_now = (QR_once_reached_eof(self) && self->cursTuple >= (Int4)self->num_total_read);
inolog("reached_eof_now=%d\n", reached_eof_now);
mylog("_%s: PGresult: fetch_total = %d & this_fetch = %d\n", func, self->num_total_read, self->num_cached_rows);
{
mylog("%s: reached eof now\n", func);
QR_set_reached_eof(self);
- if (self->cursTuple >= (Int4) self->num_total_read)
- {
- self->num_total_read = self->cursTuple + 1;
-inolog("mayumi setting total_read to %d\n", self->num_total_read);
- }
- self->cursTuple++;
if (self->ad_count > 0 && cur_fetch < fetch_size)
{
/* We have to append the tuples(keys) info from the added tuples(keys) here */