Re: Re: Bug #2942 Updated: Cursor memory not freed
| From: | Thies C. Arntzen | Date: | Thu, 09 Dec 1999 18:48:05 +0000 |
| Subject: | Re: Re: Bug #2942 Updated: Cursor memory not freed | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-13528@lists.php.net to get a copy of this message | ||
please try to send me (off-list) a minimal/complete script + the needed
sql-scripts (DDL + data) that shows this behaviour. emphasis is on
*minimal* & *complete* (got no time to dig around;-).
if i can reproduce it here i'm pretty sure i can fix it.
BTW: i'll be out of my office all of next week, so it might take a few
days!
tc
On Thu, 9 Dec 1999, Kris Cardinaels wrote:
> I use several ora_close statements as in the example I attached, and still
> php crashes as too many cursors open and out of memory (I think)
>
> KrisC
>
> function zoekArtikels($query) {
> if ($cursor2 = ora_open($GLOBALS["conn"])) {
> if (ora_parse($cursor2, $query)) {
> if (ora_exec($cursor2)) {
> $i = 0;
> while(ora_fetch($cursor2)) {
> $cursor = ora_open($GLOBALS["conn"]);
> $query2 = "select * from document d, artikel a where d.id = a.id
> and a.id = ".ora_getcolumn($cursor2,"0")." order by titel";
> ora_parse($cursor, $query2);
> ora_exec($cursor);
> if (ora_fetch($cursor)) {
> $res[$i]= new Artikel;
> $res[$i]->init($cursor);
> $res[$i]->journal = ora_getcolumn($cursor, "14");
> $res[$i]->volume = ora_getcolumn($cursor, "15");
> $res[$i]->nummer = ora_getcolumn($cursor, "16");
> $res[$i]->pages = ora_getcolumn($cursor, "17");
> $i++;
> }
> ora_close($cursor);
> }
> }
> }
> }
> ora_close($cursor2);
> return $res;
> }
>
> ----
> Kris Cardinaels
> K.U.Leuven, Dept. Computer Science
> +32(0)16 327660
> ----- Original Message -----
> From: Bug Database <php-dev@lists.php.net>
> To: <Kris.Cardinaels@cs.kuleuven.ac.be>; <php-dev@lists.php.net>
> Sent: Thursday, December 09, 1999 5:31 PM
> Subject: Bug #2942 Updated: Cursor memory not freed
>
>
> > ID: 2942
> > Updated by: thies
> > Reported By: krisc@cs.kuleuven.ac.be
> > Status: Closed
> > Bug Type: Reproduceable crash
> > Assigned To:
> > Comments:
> >
> > pelase use ora_close to close cursors that you no longer need. this will
> happen automagicly at the end of the script.
> >
> > Full Bug description available at:
> > http://bugs.php.net/?id=2942
> >
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany