From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> |
Cc: | chris(at)bitmead(dot)com, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Bug in cursors?? |
Date: | 2000-02-08 09:16:02 |
Message-ID: | 200002080916.EAA12880@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hiroshi, do you need this applied?
>
> I've forgotten to apply the following patch.
> Without the patch,backward sequential scan is impossible
> after reaching EOF.
> It may be one of the cause.
>
> Regards.
>
> *** access/heap/heapam.c.orig Mon Aug 2 14:56:36 1999
> --- access/heap/heapam.c Tue Nov 9 12:59:48 1999
> ***************
> *** 775,782 ****
> if (scan->rs_ptup.t_data == scan->rs_ctup.t_data &&
> BufferIsInvalid(scan->rs_pbuf))
> {
> - if (BufferIsValid(scan->rs_nbuf))
> - ReleaseBuffer(scan->rs_nbuf);
> return NULL;
> }
>
> --- 775,780 ----
> ***************
> *** 833,842 ****
> ReleaseBuffer(scan->rs_pbuf);
> scan->rs_ptup.t_data = NULL;
> scan->rs_pbuf = InvalidBuffer;
> - if (BufferIsValid(scan->rs_nbuf))
> - ReleaseBuffer(scan->rs_nbuf);
> - scan->rs_ntup.t_data = NULL;
> - scan->rs_nbuf = InvalidBuffer;
> return NULL;
> }
>
> --- 831,836 ----
> ***************
> *** 855,862 ****
> if (scan->rs_ctup.t_data == scan->rs_ntup.t_data &&
> BufferIsInvalid(scan->rs_nbuf))
> {
> - if (BufferIsValid(scan->rs_pbuf))
> - ReleaseBuffer(scan->rs_pbuf);
> HEAPDEBUG_3; /* heap_getnext returns NULL at end */
> return NULL;
> }
> --- 849,854 ----
> ***************
> *** 915,924 ****
> ReleaseBuffer(scan->rs_nbuf);
> scan->rs_ntup.t_data = NULL;
> scan->rs_nbuf = InvalidBuffer;
> - if (BufferIsValid(scan->rs_pbuf))
> - ReleaseBuffer(scan->rs_pbuf);
> - scan->rs_ptup.t_data = NULL;
> - scan->rs_pbuf = InvalidBuffer;
> HEAPDEBUG_6; /* heap_getnext returning EOS */
> return NULL;
> }
> --- 907,912 ----
>
> ************
>
--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Hiroshi Inoue | 2000-02-08 10:12:52 | RE: [HACKERS] Bug in cursors?? |
Previous Message | Bruce Momjian | 2000-02-08 09:12:44 | Re: [HACKERS] TODO item |