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

From: Date: Thu, 25 Nov 2004 22:18:13 +0000
Subject: cvs: pear /MDB2/MDB2/Driver fbsql.php ibase.php mssql.php mysql.php oci8.php pgsql.php sqlite.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-26495@lists.php.net to get a copy of this message
lsmith Thu Nov 25 17:18:13 2004 EDT Modified files: /pear/MDB2/MDB2/Driver fbsql.php ibase.php mssql.php mysql.php oci8.php pgsql.php sqlite.php Log: - lazy connect in _doQuery() http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/fbsql.php?r1=1.36&r2=1.37&ty=u Index: pear/MDB2/MDB2/Driver/fbsql.php diff -u pear/MDB2/MDB2/Driver/fbsql.php:1.36 pear/MDB2/MDB2/Driver/fbsql.php:1.37 --- pear/MDB2/MDB2/Driver/fbsql.php:1.36 Thu Nov 25 09:28:38 2004 +++ pear/MDB2/MDB2/Driver/fbsql.php Thu Nov 25 17:18:11 2004 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: fbsql.php,v 1.36 2004/11/25 14:28:38 lsmith Exp $ +// $Id: fbsql.php,v 1.37 2004/11/25 22:18:11 lsmith Exp $ // /** @@ -312,6 +312,12 @@ } if (is_null($connection)) { + if (!$this->connection) { + $error = $this->connect(); + if (MDB2::isError($error)) { + $error; + } + } $connection = $this->connection; } if (is_null($database_name)) { http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/ibase.php?r1=1.63&r2=1.64&ty=u Index: pear/MDB2/MDB2/Driver/ibase.php diff -u pear/MDB2/MDB2/Driver/ibase.php:1.63 pear/MDB2/MDB2/Driver/ibase.php:1.64 --- pear/MDB2/MDB2/Driver/ibase.php:1.63 Thu Nov 25 09:28:38 2004 +++ pear/MDB2/MDB2/Driver/ibase.php Thu Nov 25 17:18:11 2004 @@ -43,7 +43,7 @@ // | Author: Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.63 2004/11/25 14:28:38 lsmith Exp $ +// $Id: ibase.php,v 1.64 2004/11/25 22:18:11 lsmith Exp $ /** * MDB2 FireBird/InterBase driver @@ -431,9 +431,11 @@ if ($this->in_transaction) { $connection = $this->transaction_id; } else { - $err = $this->connect(); - if (MDB2::isError($err)) { - return $err; + if (!$this->connection) { + $error = $this->connect(); + if (MDB2::isError($error)) { + $error; + } } $connection = $this->connection; } http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mssql.php?r1=1.43&r2=1.44&ty=u Index: pear/MDB2/MDB2/Driver/mssql.php diff -u pear/MDB2/MDB2/Driver/mssql.php:1.43 pear/MDB2/MDB2/Driver/mssql.php:1.44 --- pear/MDB2/MDB2/Driver/mssql.php:1.43 Thu Nov 25 09:28:38 2004 +++ pear/MDB2/MDB2/Driver/mssql.php Thu Nov 25 17:18:11 2004 @@ -43,7 +43,7 @@ // | Author: Frank M. Kromann <frank@kromann.info> | // +----------------------------------------------------------------------+ // -// $Id: mssql.php,v 1.43 2004/11/25 14:28:38 lsmith Exp $ +// $Id: mssql.php,v 1.44 2004/11/25 22:18:11 lsmith Exp $ // /** @@ -336,6 +336,12 @@ } if (is_null($connection)) { + if (!$this->connection) { + $error = $this->connect(); + if (MDB2::isError($error)) { + $error; + } + } $connection = $this->connection; } if (is_null($database_name)) { http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mysql.php?r1=1.39&r2=1.40&ty=u Index: pear/MDB2/MDB2/Driver/mysql.php diff -u pear/MDB2/MDB2/Driver/mysql.php:1.39 pear/MDB2/MDB2/Driver/mysql.php:1.40 --- pear/MDB2/MDB2/Driver/mysql.php:1.39 Thu Nov 25 09:28:38 2004 +++ pear/MDB2/MDB2/Driver/mysql.php Thu Nov 25 17:18:11 2004 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.39 2004/11/25 14:28:38 lsmith Exp $ +// $Id: mysql.php,v 1.40 2004/11/25 22:18:11 lsmith Exp $ // /** @@ -400,6 +400,12 @@ } if (is_null($connection)) { + if (!$this->connection) { + $error = $this->connect(); + if (MDB2::isError($error)) { + $error; + } + } $connection = $this->connection; } if (is_null($database_name)) { http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/oci8.php?r1=1.47&r2=1.48&ty=u Index: pear/MDB2/MDB2/Driver/oci8.php diff -u pear/MDB2/MDB2/Driver/oci8.php:1.47 pear/MDB2/MDB2/Driver/oci8.php:1.48 --- pear/MDB2/MDB2/Driver/oci8.php:1.47 Thu Nov 25 09:28:38 2004 +++ pear/MDB2/MDB2/Driver/oci8.php Thu Nov 25 17:18:11 2004 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ -// $Id: oci8.php,v 1.47 2004/11/25 14:28:38 lsmith Exp $ +// $Id: oci8.php,v 1.48 2004/11/25 22:18:11 lsmith Exp $ /** * MDB2 OCI8 driver @@ -416,6 +416,12 @@ } if (is_null($connection)) { + if (!$this->connection) { + $error = $this->connect(); + if (MDB2::isError($error)) { + $error; + } + } $connection = $this->connection; } http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/pgsql.php?r1=1.41&r2=1.42&ty=u Index: pear/MDB2/MDB2/Driver/pgsql.php diff -u pear/MDB2/MDB2/Driver/pgsql.php:1.41 pear/MDB2/MDB2/Driver/pgsql.php:1.42 --- pear/MDB2/MDB2/Driver/pgsql.php:1.41 Thu Nov 25 09:28:38 2004 +++ pear/MDB2/MDB2/Driver/pgsql.php Thu Nov 25 17:18:11 2004 @@ -43,7 +43,7 @@ // | Author: Paul Cooper <pgc@ucecom.com> | // +----------------------------------------------------------------------+ // -// $Id: pgsql.php,v 1.41 2004/11/25 14:28:38 lsmith Exp $ +// $Id: pgsql.php,v 1.42 2004/11/25 22:18:11 lsmith Exp $ /** * MDB2 PostGreSQL driver @@ -399,6 +399,12 @@ } if (is_null($connection)) { + if (!$this->connection) { + $error = $this->connect(); + if (MDB2::isError($error)) { + $error; + } + } $connection = $this->connection; } http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/sqlite.php?r1=1.39&r2=1.40&ty=u Index: pear/MDB2/MDB2/Driver/sqlite.php diff -u pear/MDB2/MDB2/Driver/sqlite.php:1.39 pear/MDB2/MDB2/Driver/sqlite.php:1.40 --- pear/MDB2/MDB2/Driver/sqlite.php:1.39 Thu Nov 25 09:28:38 2004 +++ pear/MDB2/MDB2/Driver/sqlite.php Thu Nov 25 17:18:12 2004 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: sqlite.php,v 1.39 2004/11/25 14:28:38 lsmith Exp $ +// $Id: sqlite.php,v 1.40 2004/11/25 22:18:12 lsmith Exp $ // /** @@ -365,6 +365,12 @@ } if (is_null($connection)) { + if (!$this->connection) { + $error = $this->connect(); + if (MDB2::isError($error)) { + $error; + } + } $connection = $this->connection; } if (is_null($database_name)) {

« previous php.pear.cvs (#26495) next »