From: <var...@us...> - 2020-04-21 10:48:16
|
Revision: 10168 http://sourceforge.net/p/phpwiki/code/10168 Author: vargenau Date: 2020-04-21 10:48:14 +0000 (Tue, 21 Apr 2020) Log Message: ----------- Upgrade PEAR DB to release 1.10.0 Modified Paths: -------------- trunk/lib/pear/DB/common.php trunk/lib/pear/DB/dbase.php trunk/lib/pear/DB/fbsql.php trunk/lib/pear/DB/ibase.php trunk/lib/pear/DB/ifx.php trunk/lib/pear/DB/msql.php trunk/lib/pear/DB/mssql.php trunk/lib/pear/DB/mysql.php trunk/lib/pear/DB/mysqli.php trunk/lib/pear/DB/oci8.php trunk/lib/pear/DB/odbc.php trunk/lib/pear/DB/pgsql.php trunk/lib/pear/DB/sqlite.php trunk/lib/pear/DB/storage.php trunk/lib/pear/DB/sybase.php trunk/lib/pear/DB.php Modified: trunk/lib/pear/DB/common.php =================================================================== --- trunk/lib/pear/DB/common.php 2020-03-29 20:43:54 UTC (rev 10167) +++ trunk/lib/pear/DB/common.php 2020-04-21 10:48:14 UTC (rev 10168) @@ -42,7 +42,7 @@ * @author Daniel Convissor <da...@ph...> * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.9.3 + * @version Release: 1.10.0 * @link http://pear.php.net/package/DB */ class DB_common extends PEAR @@ -262,7 +262,7 @@ function quoteString($string) { $string = $this->quoteSmart($string); - if ($string{0} == "'") { + if ($string[0] == "'") { return substr($string, 1, -1); } return $string; @@ -885,6 +885,9 @@ function autoExecute($table, $fields_values, $mode = DB_AUTOQUERY_INSERT, $where = false) { + if ($where) { + $where = strtr($where, array('?' => '\?', '!' => '\!', '&' => '\&',)); + } $sth = $this->autoPrepare($table, array_keys($fields_values), $mode, $where); if (DB::isError($sth)) { Modified: trunk/lib/pear/DB/dbase.php =================================================================== --- trunk/lib/pear/DB/dbase.php 2020-03-29 20:43:54 UTC (rev 10167) +++ trunk/lib/pear/DB/dbase.php 2020-04-21 10:48:14 UTC (rev 10168) @@ -41,7 +41,7 @@ * @author Daniel Convissor <da...@ph...> * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.9.3 + * @version Release: 1.10.0 * @link http://pear.php.net/package/DB */ class DB_dbase extends DB_common Modified: trunk/lib/pear/DB/fbsql.php =================================================================== --- trunk/lib/pear/DB/fbsql.php 2020-03-29 20:43:54 UTC (rev 10167) +++ trunk/lib/pear/DB/fbsql.php 2020-04-21 10:48:14 UTC (rev 10168) @@ -41,7 +41,7 @@ * @author Daniel Convissor <da...@ph...> * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.9.3 + * @version Release: 1.10.0 * @link http://pear.php.net/package/DB * @since Class functional since Release 1.7.0 */ Modified: trunk/lib/pear/DB/ibase.php =================================================================== --- trunk/lib/pear/DB/ibase.php 2020-03-29 20:43:54 UTC (rev 10167) +++ trunk/lib/pear/DB/ibase.php 2020-04-21 10:48:14 UTC (rev 10168) @@ -49,7 +49,7 @@ * @author Daniel Convissor <da...@ph...> * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.9.3 + * @version Release: 1.10.0 * @link http://pear.php.net/package/DB * @since Class became stable in Release 1.7.0 */ Modified: trunk/lib/pear/DB/ifx.php =================================================================== --- trunk/lib/pear/DB/ifx.php 2020-03-29 20:43:54 UTC (rev 10167) +++ trunk/lib/pear/DB/ifx.php 2020-04-21 10:48:14 UTC (rev 10168) @@ -48,7 +48,7 @@ * @author Daniel Convissor <da...@ph...> * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.9.3 + * @version Release: 1.10.0 * @link http://pear.php.net/package/DB */ class DB_ifx extends DB_common Modified: trunk/lib/pear/DB/msql.php =================================================================== --- trunk/lib/pear/DB/msql.php 2020-03-29 20:43:54 UTC (rev 10167) +++ trunk/lib/pear/DB/msql.php 2020-04-21 10:48:14 UTC (rev 10168) @@ -47,7 +47,7 @@ * @author Daniel Convissor <da...@ph...> * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.9.3 + * @version Release: 1.10.0 * @link http://pear.php.net/package/DB * @since Class not functional until Release 1.7.0 */ Modified: trunk/lib/pear/DB/mssql.php =================================================================== --- trunk/lib/pear/DB/mssql.php 2020-03-29 20:43:54 UTC (rev 10167) +++ trunk/lib/pear/DB/mssql.php 2020-04-21 10:48:14 UTC (rev 10168) @@ -49,7 +49,7 @@ * @author Daniel Convissor <da...@ph...> * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.9.3 + * @version Release: 1.10.0 * @link http://pear.php.net/package/DB */ class DB_mssql extends DB_common Modified: trunk/lib/pear/DB/mysql.php =================================================================== --- trunk/lib/pear/DB/mysql.php 2020-03-29 20:43:54 UTC (rev 10167) +++ trunk/lib/pear/DB/mysql.php 2020-04-21 10:48:14 UTC (rev 10168) @@ -41,7 +41,7 @@ * @author Daniel Convissor <da...@ph...> * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.9.3 + * @version Release: 1.10.0 * @link http://pear.php.net/package/DB */ class DB_mysql extends DB_common Modified: trunk/lib/pear/DB/mysqli.php =================================================================== --- trunk/lib/pear/DB/mysqli.php 2020-03-29 20:43:54 UTC (rev 10167) +++ trunk/lib/pear/DB/mysqli.php 2020-04-21 10:48:14 UTC (rev 10168) @@ -43,7 +43,7 @@ * @author Daniel Convissor <da...@ph...> * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.9.3 + * @version Release: 1.10.0 * @link http://pear.php.net/package/DB * @since Class functional since Release 1.6.3 */ Modified: trunk/lib/pear/DB/oci8.php =================================================================== --- trunk/lib/pear/DB/oci8.php 2020-03-29 20:43:54 UTC (rev 10167) +++ trunk/lib/pear/DB/oci8.php 2020-04-21 10:48:14 UTC (rev 10168) @@ -47,7 +47,7 @@ * @author Daniel Convissor <da...@ph...> * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.9.3 + * @version Release: 1.10.0 * @link http://pear.php.net/package/DB */ class DB_oci8 extends DB_common @@ -446,9 +446,6 @@ if (!is_resource($stmt)) { return false; } - if ($free_resource) { - @ocifreestatement($stmt); - } if (isset($this->prepare_types[(int)$stmt])) { unset($this->prepare_types[(int)$stmt]); unset($this->manip_query[(int)$stmt]); Modified: trunk/lib/pear/DB/odbc.php =================================================================== --- trunk/lib/pear/DB/odbc.php 2020-03-29 20:43:54 UTC (rev 10167) +++ trunk/lib/pear/DB/odbc.php 2020-04-21 10:48:14 UTC (rev 10168) @@ -44,7 +44,7 @@ * @author Daniel Convissor <da...@ph...> * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.9.3 + * @version Release: 1.10.0 * @link http://pear.php.net/package/DB */ class DB_odbc extends DB_common Modified: trunk/lib/pear/DB/pgsql.php =================================================================== --- trunk/lib/pear/DB/pgsql.php 2020-03-29 20:43:54 UTC (rev 10167) +++ trunk/lib/pear/DB/pgsql.php 2020-04-21 10:48:14 UTC (rev 10168) @@ -43,7 +43,7 @@ * @author Daniel Convissor <da...@ph...> * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.9.3 + * @version Release: 1.10.0 * @link http://pear.php.net/package/DB */ class DB_pgsql extends DB_common Modified: trunk/lib/pear/DB/sqlite.php =================================================================== --- trunk/lib/pear/DB/sqlite.php 2020-03-29 20:43:54 UTC (rev 10167) +++ trunk/lib/pear/DB/sqlite.php 2020-04-21 10:48:14 UTC (rev 10168) @@ -47,7 +47,7 @@ * @author Daniel Convissor <da...@ph...> * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 3.0 - * @version Release: 1.9.3 + * @version Release: 1.10.0 * @link http://pear.php.net/package/DB */ class DB_sqlite extends DB_common Modified: trunk/lib/pear/DB/storage.php =================================================================== --- trunk/lib/pear/DB/storage.php 2020-03-29 20:43:54 UTC (rev 10167) +++ trunk/lib/pear/DB/storage.php 2020-04-21 10:48:14 UTC (rev 10168) @@ -38,7 +38,7 @@ * @author Stig Bakken <st...@ph...> * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.9.3 + * @version Release: 1.10.0 * @link http://pear.php.net/package/DB */ class DB_storage extends PEAR Modified: trunk/lib/pear/DB/sybase.php =================================================================== --- trunk/lib/pear/DB/sybase.php 2020-03-29 20:43:54 UTC (rev 10167) +++ trunk/lib/pear/DB/sybase.php 2020-04-21 10:48:14 UTC (rev 10168) @@ -46,7 +46,7 @@ * @author Daniel Convissor <da...@ph...> * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.9.3 + * @version Release: 1.10.0 * @link http://pear.php.net/package/DB */ class DB_sybase extends DB_common Modified: trunk/lib/pear/DB.php =================================================================== --- trunk/lib/pear/DB.php 2020-03-29 20:43:54 UTC (rev 10167) +++ trunk/lib/pear/DB.php 2020-04-21 10:48:14 UTC (rev 10168) @@ -180,9 +180,18 @@ * Tried to insert a null value into a column that doesn't allow nulls */ define('DB_ERROR_CONSTRAINT_NOT_NULL',-29); + +/** + * Database lock timeout exceeded. + */ +define('DB_ERROR_LOCK_TIMEOUT', -30); + +/** + * Database deadlock encountered. + */ +define('DB_ERROR_DEADLOCK', -31); /**#@-*/ - // }}} // {{{ prepared statement-related @@ -426,7 +435,7 @@ * @author Daniel Convissor <da...@ph...> * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.9.3 + * @version Release: 1.10.0 * @link http://pear.php.net/package/DB */ class DB @@ -577,7 +586,7 @@ */ function apiVersion() { - return '1.9.3'; + return '1.10.0'; } // }}} @@ -683,6 +692,8 @@ DB_ERROR_TRUNCATED => 'truncated', DB_ERROR_VALUE_COUNT_ON_ROW => 'value count on row', DB_OK => 'no error', + DB_ERROR_DEADLOCK => 'deadlock', + DB_ERROR_LOCK_TIMEOUT => 'database lock timeout', ); } @@ -941,7 +952,7 @@ * @author Stig Bakken <ss...@ph...> * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.9.3 + * @version Release: 1.10.0 * @link http://pear.php.net/package/DB */ class DB_Error extends PEAR_Error @@ -1002,7 +1013,7 @@ * @author Stig Bakken <ss...@ph...> * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.9.3 + * @version Release: 1.10.0 * @link http://pear.php.net/package/DB */ class DB_result @@ -1467,7 +1478,7 @@ * @author Stig Bakken <ss...@ph...> * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.9.3 + * @version Release: 1.10.0 * @link http://pear.php.net/package/DB * @see DB_common::setFetchMode() */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |