Bug #18534: ifx_close() leaves open session
| From: | martin at ctco dot lv | Date: | Wed, 24 Jul 2002 09:55:37 +0000 |
| Subject: | Bug #18534: ifx_close() leaves open session | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-15027@lists.php.net to get a copy of this message | ||
From: martin@ctco.lv
Operating system: Sun Solaris 8
PHP version: 4.2.1
PHP Bug Type: Informix related
Bug description: ifx_close() leaves open session
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 bug report at http://bugs.php.net/?id=18534&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18534&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18534&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18534&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18534&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18534&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18534&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18534&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18534&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18534&r=globals