Re: [HACKERS] Bug in cursors?? - Mailing list pgsql-hackers
From | Bruce Momjian |
---|---|
Subject | Re: [HACKERS] Bug in cursors?? |
Date | |
Msg-id | 200002080916.EAA12880@candle.pha.pa.us Whole thread Raw |
In response to | RE: [HACKERS] Bug in cursors?? ("Hiroshi Inoue" <Inoue@tpf.co.jp>) |
Responses |
RE: [HACKERS] Bug in cursors??
("Hiroshi Inoue" <Inoue@tpf.co.jp>)
|
List | 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@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
pgsql-hackers by date: