cvs: pear /MDB2 package_sqlite.php /MDB2/MDB2/Driver sqlite.php
| From: | Lorenzo Alberton | Date: | Sun, 04 Mar 2007 23:57:29 +0000 |
| Subject: | cvs: pear /MDB2 package_sqlite.php /MDB2/MDB2/Driver sqlite.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-44967@lists.php.net to get a copy of this message | ||
quipo Sun Mar 4 23:57:29 2007 UTC
Modified files:
/pear/MDB2/MDB2/Driver sqlite.php
/pear/MDB2 package_sqlite.php
Log:
fixed bug #9693: execute statement again in case of a SQLITE_SCHEMA error (thanks to afz at php
dot net)
http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/sqlite.php?r1=1.145&r2=1.146&diff_format=u
Index: pear/MDB2/MDB2/Driver/sqlite.php
diff -u pear/MDB2/MDB2/Driver/sqlite.php:1.145 pear/MDB2/MDB2/Driver/sqlite.php:1.146
--- pear/MDB2/MDB2/Driver/sqlite.php:1.145 Sun Jan 21 08:48:13 2007
+++ pear/MDB2/MDB2/Driver/sqlite.php Sun Mar 4 23:57:28 2007
@@ -3,7 +3,7 @@
// +----------------------------------------------------------------------+
// | PHP versions 4 and 5 |
// +----------------------------------------------------------------------+
-// | Copyright (c) 1998-2006 Manuel Lemos, Tomas V.V.Cox, |
+// | Copyright (c) 1998-2007 Manuel Lemos, Tomas V.V.Cox, |
// | Stig. S. Bakken, Lukas Smith |
// | All rights reserved. |
// +----------------------------------------------------------------------+
@@ -43,7 +43,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
-// $Id: sqlite.php,v 1.145 2007/01/21 08:48:13 quipo Exp $
+// $Id: sqlite.php,v 1.146 2007/03/04 23:57:28 quipo Exp $
//
/**
@@ -519,10 +519,14 @@
$php_errormsg = '';
if (version_compare('5.1.0', PHP_VERSION, '>')) {
@ini_set('track_errors', true);
- $result = @$function($query.';', $connection);
+ do {
+ $result = @$function($query.';', $connection);
+ } while (sqlite_last_error($connection) == SQLITE_SCHEMA);
@ini_restore('track_errors');
} else {
- $result = @$function($query.';', $connection, SQLITE_BOTH, $php_errormsg);
+ do {
+ $result = @$function($query.';', $connection, SQLITE_BOTH,
$php_errormsg);
+ } while (sqlite_last_error($connection) == SQLITE_SCHEMA);
}
$this->_lasterror = $php_errormsg;
http://cvs.php.net/viewvc.cgi/pear/MDB2/package_sqlite.php?r1=1.82&r2=1.83&diff_format=u
Index: pear/MDB2/package_sqlite.php
diff -u pear/MDB2/package_sqlite.php:1.82 pear/MDB2/package_sqlite.php:1.83
--- pear/MDB2/package_sqlite.php:1.82 Sun Mar 4 23:50:02 2007
+++ pear/MDB2/package_sqlite.php Sun Mar 4 23:57:28 2007
@@ -14,6 +14,7 @@
an error
- added a 'nativetype_map_callback' option to map native data declarations back to
custom data types (thanks to Andrew Hill).
+- fixed bug #9693: execute statement again in case of a SQLITE_SCHEMA error
- fixed bug #10027: PHP4 compatibility in createConstraint() and dropConstraint()
- phpdoc fixes