#18534 [Opn->Fbk]: ifx_close() leaves open session

From: Date: Sat, 07 Dec 2002 07:44:11 +0000
Subject: #18534 [Opn->Fbk]: ifx_close() leaves open session
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-26956@lists.php.net to get a copy of this message
ID: 18534 Updated by: iliaa@php.net Reported By: martin@ctco.lv -Status: Open +Status: Feedback Bug Type: Informix related Operating System: Sun Solaris 8 PHP Version: 4.2.1 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2002-07-24 05:55:36] martin@ctco.lv When working with tranaztions. ifx_close() does not close session. I have following script: <? $db=ifx_connect("db","uid","pwd"); $result=ifx_query("begin work",$db); $result=ifx_query("insert into m_test1 (i) values('1');", $db); $result=ifx_query("select * from m_test1;", $db); while($row=ifx_fetch_row($result)) { echo($row['i']); } //$result=ifx_query("rollback work;", $db); echo("rollback"); $result=ifx_query("select * from m_test1;", $db); while($row=ifx_fetch_row($result)) { echo($row['i']); } ifx_close($db); ?> If i dont execute $result=ifx_query("rollback work;", $db); and just call ifx_close session is not closed and autmatic rollback is not executed (as it must be) but connection to Informix database stays with lock on this row. Usualy you must have rollback or commit; But to avoid problems with bad code or other coding probs after calling ifx_close() session must be rolled back and closed. Martins Junkers ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18534&edit=1

« previous php.bugs (#26956) next »