cvs: pear /MDB2/MDB2/Driver fbsql.php mssql.php mysql.php mysqli.php oci8.php pgsql.php sqlite.php

From: Date: Sun, 16 Oct 2005 21:00:44 +0000
Subject: cvs: pear /MDB2/MDB2/Driver fbsql.php mssql.php mysql.php mysqli.php oci8.php pgsql.php sqlite.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-35612@lists.php.net to get a copy of this message
lsmith Sun Oct 16 17:00:44 2005 EDT Modified files: /pear/MDB2/MDB2/Driver fbsql.php mssql.php mysql.php mysqli.php oci8.php pgsql.php sqlite.php Log: - force rollback() with open transactions on disconnect

http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/fbsql.php?r1=1.75&r2=1.76&ty=u Index: pear/MDB2/MDB2/Driver/fbsql.php diff -u pear/MDB2/MDB2/Driver/fbsql.php:1.75 pear/MDB2/MDB2/Driver/fbsql.php:1.76 --- pear/MDB2/MDB2/Driver/fbsql.php:1.75 Sun Oct 16 10:34:00 2005 +++ pear/MDB2/MDB2/Driver/fbsql.php Sun Oct 16 17:00:42 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: fbsql.php,v 1.75 2005/10/16 14:34:00 lsmith Exp $ +// $Id: fbsql.php,v 1.76 2005/10/16 21:00:42 lsmith Exp $ // /** @@ -282,10 +282,11 @@ function disconnect($force = true) { if (is_resource($this->connection)) { + if($this->in_transaction) { + $this->rollback(); + } if (!$this->opened_persistent || $force) { @fbsql_close($this->connection); - } elseif($this->in_transaction) { - $this->rollback(); } $this->connection = 0; $this->in_transaction = false; http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mssql.php?r1=1.87&r2=1.88&ty=u Index: pear/MDB2/MDB2/Driver/mssql.php diff -u pear/MDB2/MDB2/Driver/mssql.php:1.87 pear/MDB2/MDB2/Driver/mssql.php:1.88 --- pear/MDB2/MDB2/Driver/mssql.php:1.87 Sun Oct 16 12:31:54 2005 +++ pear/MDB2/MDB2/Driver/mssql.php Sun Oct 16 17:00:42 2005 @@ -43,7 +43,7 @@ // | Author: Frank M. Kromann <frank@kromann.info> | // +----------------------------------------------------------------------+ // -// $Id: mssql.php,v 1.87 2005/10/16 16:31:54 lsmith Exp $ +// $Id: mssql.php,v 1.88 2005/10/16 21:00:42 lsmith Exp $ // // {{{ Class MDB2_Driver_mssql /** @@ -307,10 +307,11 @@ function disconnect($force = true) { if (is_resource($this->connection)) { + if($this->in_transaction) { + $this->rollback(); + } if (!$this->opened_persistent || $force) { @mssql_close($this->connection); - } elseif($this->in_transaction) { - $this->rollback(); } $this->connection = 0; $this->in_transaction = false; http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mysql.php?r1=1.78&r2=1.79&ty=u Index: pear/MDB2/MDB2/Driver/mysql.php diff -u pear/MDB2/MDB2/Driver/mysql.php:1.78 pear/MDB2/MDB2/Driver/mysql.php:1.79 --- pear/MDB2/MDB2/Driver/mysql.php:1.78 Sun Oct 16 10:34:01 2005 +++ pear/MDB2/MDB2/Driver/mysql.php Sun Oct 16 17:00:42 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.78 2005/10/16 14:34:01 lsmith Exp $ +// $Id: mysql.php,v 1.79 2005/10/16 21:00:42 lsmith Exp $ // /** @@ -405,10 +405,11 @@ function disconnect($force = true) { if (is_resource($this->connection)) { + if($this->in_transaction) { + $this->rollback(); + } if (!$this->opened_persistent || $force) { @mysql_close($this->connection); - } elseif($this->in_transaction) { - $this->rollback(); } $this->connection = 0; $this->in_transaction = false; http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mysqli.php?r1=1.43&r2=1.44&ty=u Index: pear/MDB2/MDB2/Driver/mysqli.php diff -u pear/MDB2/MDB2/Driver/mysqli.php:1.43 pear/MDB2/MDB2/Driver/mysqli.php:1.44 --- pear/MDB2/MDB2/Driver/mysqli.php:1.43 Sun Oct 16 10:34:01 2005 +++ pear/MDB2/MDB2/Driver/mysqli.php Sun Oct 16 17:00:42 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: mysqli.php,v 1.43 2005/10/16 14:34:01 lsmith Exp $ +// $Id: mysqli.php,v 1.44 2005/10/16 21:00:42 lsmith Exp $ // /** @@ -407,10 +407,11 @@ function disconnect($force = true) { if (is_object($this->connection)) { + if($this->in_transaction) { + $this->rollback(); + } if ($force) { @mysqli_close($this->connection); - } elseif($this->in_transaction) { - $this->rollback(); } $this->connection = 0; $this->in_transaction = false; http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/oci8.php?r1=1.96&r2=1.97&ty=u Index: pear/MDB2/MDB2/Driver/oci8.php diff -u pear/MDB2/MDB2/Driver/oci8.php:1.96 pear/MDB2/MDB2/Driver/oci8.php:1.97 --- pear/MDB2/MDB2/Driver/oci8.php:1.96 Sun Oct 16 10:34:01 2005 +++ pear/MDB2/MDB2/Driver/oci8.php Sun Oct 16 17:00:43 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ -// $Id: oci8.php,v 1.96 2005/10/16 14:34:01 lsmith Exp $ +// $Id: oci8.php,v 1.97 2005/10/16 21:00:43 lsmith Exp $ /** * MDB2 OCI8 driver @@ -353,14 +353,15 @@ function disconnect($force = true) { if (is_resource($this->connection)) { + if($this->in_transaction) { + $this->rollback(); + } if (!$this->opened_persistent || $force) { if (function_exists('oci_close')) { @oci_close($this->connection); } else { @OCILogOff($this->connection); } - } elseif($this->in_transaction) { - $this->rollback(); } $this->connection = 0; $this->in_transaction = false; http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/pgsql.php?r1=1.77&r2=1.78&ty=u Index: pear/MDB2/MDB2/Driver/pgsql.php diff -u pear/MDB2/MDB2/Driver/pgsql.php:1.77 pear/MDB2/MDB2/Driver/pgsql.php:1.78 --- pear/MDB2/MDB2/Driver/pgsql.php:1.77 Sun Oct 16 10:34:01 2005 +++ pear/MDB2/MDB2/Driver/pgsql.php Sun Oct 16 17:00:43 2005 @@ -43,7 +43,7 @@ // | Author: Paul Cooper <pgc@ucecom.com> | // +----------------------------------------------------------------------+ // -// $Id: pgsql.php,v 1.77 2005/10/16 14:34:01 lsmith Exp $ +// $Id: pgsql.php,v 1.78 2005/10/16 21:00:43 lsmith Exp $ /** * MDB2 PostGreSQL driver @@ -378,10 +378,11 @@ function disconnect($force = true) { if (is_resource($this->connection)) { + if($this->in_transaction) { + $this->rollback(); + } if (!$this->opened_persistent || $force) { @pg_close($this->connection); - } elseif($this->in_transaction) { - $this->rollback(); } $this->connection = 0; $this->in_transaction = false; http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/sqlite.php?r1=1.79&r2=1.80&ty=u Index: pear/MDB2/MDB2/Driver/sqlite.php diff -u pear/MDB2/MDB2/Driver/sqlite.php:1.79 pear/MDB2/MDB2/Driver/sqlite.php:1.80 --- pear/MDB2/MDB2/Driver/sqlite.php:1.79 Sun Oct 16 10:34:02 2005 +++ pear/MDB2/MDB2/Driver/sqlite.php Sun Oct 16 17:00:43 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: sqlite.php,v 1.79 2005/10/16 14:34:02 lsmith Exp $ +// $Id: sqlite.php,v 1.80 2005/10/16 21:00:43 lsmith Exp $ // /** @@ -335,10 +335,11 @@ function disconnect($force = true) { if (is_resource($this->connection)) { + if($this->in_transaction) { + $this->rollback(); + } if (!$this->opened_persistent || $force) { @sqlite_close($this->connection); - } elseif($this->in_transaction) { - $this->rollback(); } $this->connection = 0; $this->in_transaction = false;
« previous php.pear.cvs (#35612) next »