iliaa Tue Dec 20 15:26:26 2005 EDT
Modified files: (Branch: PHP_5_1)
/php-src NEWS
/php-src/ext/sqlite/libsqlite VERSION
/php-src/ext/sqlite/libsqlite/src os.c pager.c sqlite.w32.h
sqliteInt.h util.c
/php-src/ext/sqlite/tests blankdb.inc blankdb_oo.inc
Log:
Updated libsqlite in ext/sqlite to 2.8.17.
Use in-memory database for tests.
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.306&r2=1.2027.2.307&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.306 php-src/NEWS:1.2027.2.307
--- php-src/NEWS:1.2027.2.306 Tue Dec 20 14:24:24 2005
+++ php-src/NEWS Tue Dec 20 15:26:26 2005
@@ -1,6 +1,7 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Jan 2006, PHP 5.1.2
+- Updated libsqlite in ext/sqlite to 2.8.17. (Ilia)
- Updated to libxml2-2.6.22 and libxslt-1.1.15 in the win32 bundle. (Rob)
- Added new extensions: (Ilia, Wez)
. XMLWriter
http://cvs.php.net/viewcvs.cgi/php-src/ext/sqlite/libsqlite/VERSION?r1=1.6.4.1&r2=1.6.4.2&diff_format=u
Index: php-src/ext/sqlite/libsqlite/VERSION
diff -u php-src/ext/sqlite/libsqlite/VERSION:1.6.4.1
php-src/ext/sqlite/libsqlite/VERSION:1.6.4.2
--- php-src/ext/sqlite/libsqlite/VERSION:1.6.4.1 Wed Sep 7 15:11:31 2005
+++ php-src/ext/sqlite/libsqlite/VERSION Tue Dec 20 15:26:26 2005
@@ -1 +1 @@
-2.8.16
+2.8.17
http://cvs.php.net/viewcvs.cgi/php-src/ext/sqlite/libsqlite/src/os.c?r1=1.7.4.1&r2=1.7.4.2&diff_format=u
Index: php-src/ext/sqlite/libsqlite/src/os.c
diff -u php-src/ext/sqlite/libsqlite/src/os.c:1.7.4.1
php-src/ext/sqlite/libsqlite/src/os.c:1.7.4.2
--- php-src/ext/sqlite/libsqlite/src/os.c:1.7.4.1 Wed Sep 7 15:11:32 2005
+++ php-src/ext/sqlite/libsqlite/src/os.c Tue Dec 20 15:26:26 2005
@@ -1778,6 +1778,7 @@
sqliteSetString(&zFull, zRelative, (char*)0);
}else{
char zBuf[5000];
+ zBuf[0] = 0;
sqliteSetString(&zFull, getcwd(zBuf, sizeof(zBuf)), "/", zRelative,
(char*)0);
}
http://cvs.php.net/viewcvs.cgi/php-src/ext/sqlite/libsqlite/src/pager.c?r1=1.6.4.1&r2=1.6.4.2&diff_format=u
Index: php-src/ext/sqlite/libsqlite/src/pager.c
diff -u php-src/ext/sqlite/libsqlite/src/pager.c:1.6.4.1
php-src/ext/sqlite/libsqlite/src/pager.c:1.6.4.2
--- php-src/ext/sqlite/libsqlite/src/pager.c:1.6.4.1 Wed Sep 7 15:11:32 2005
+++ php-src/ext/sqlite/libsqlite/src/pager.c Tue Dec 20 15:26:26 2005
@@ -18,7 +18,7 @@
** file simultaneously, or one process from reading the database while
** another is writing.
**
-** @(#) $Id: pager.c,v 1.6.4.1 2005/09/07 15:11:32 iliaa Exp $
+** @(#) $Id: pager.c,v 1.6.4.2 2005/12/20 15:26:26 iliaa Exp $
*/
#include "os.h" /* Must be first to enable large file support */
#include "sqliteInt.h"
@@ -1929,7 +1929,7 @@
pPg = pager_lookup(pPager, pgno);
pPg->alwaysRollback = 1;
- if( pPg && pPg->dirty ){
+ if( pPg && pPg->dirty && !pPager->ckptInUse ){
if( pPager->dbSize==(int)pPg->pgno && pPager->origDbSize<pPager->dbSize ){
/* If this pages is the last page in the file and the file has grown
** during the current transaction, then do NOT mark the page as clean.
http://cvs.php.net/viewcvs.cgi/php-src/ext/sqlite/libsqlite/src/sqlite.w32.h?r1=1.6.2.1&r2=1.6.2.2&diff_format=u
Index: php-src/ext/sqlite/libsqlite/src/sqlite.w32.h
diff -u php-src/ext/sqlite/libsqlite/src/sqlite.w32.h:1.6.2.1
php-src/ext/sqlite/libsqlite/src/sqlite.w32.h:1.6.2.2
--- php-src/ext/sqlite/libsqlite/src/sqlite.w32.h:1.6.2.1 Wed Sep 7
15:11:33 2005
+++ php-src/ext/sqlite/libsqlite/src/sqlite.w32.h Tue Dec 20 15:26:26 2005
@@ -12,7 +12,7 @@
** This header file defines the interface that the SQLite library
** presents to client programs.
**
-** @(#) $Id: sqlite.w32.h,v 1.6.2.1 2005/09/07 15:11:33 iliaa Exp $
+** @(#) $Id: sqlite.w32.h,v 1.6.2.2 2005/12/20 15:26:26 iliaa Exp $
*/
#ifndef _SQLITE_H_
#define _SQLITE_H_
@@ -28,7 +28,7 @@
/*
** The version of the SQLite library.
*/
-#define SQLITE_VERSION "2.8.16"
+#define SQLITE_VERSION "2.8.17"
/*
** The version string is also compiled into the library so that a program
http://cvs.php.net/viewcvs.cgi/php-src/ext/sqlite/libsqlite/src/sqliteInt.h?r1=1.6.4.1&r2=1.6.4.2&diff_format=u
Index: php-src/ext/sqlite/libsqlite/src/sqliteInt.h
diff -u php-src/ext/sqlite/libsqlite/src/sqliteInt.h:1.6.4.1
php-src/ext/sqlite/libsqlite/src/sqliteInt.h:1.6.4.2
--- php-src/ext/sqlite/libsqlite/src/sqliteInt.h:1.6.4.1 Wed Sep 7
15:11:33 2005
+++ php-src/ext/sqlite/libsqlite/src/sqliteInt.h Tue Dec 20 15:26:26 2005
@@ -11,7 +11,7 @@
*************************************************************************
** Internal interface definitions for SQLite.
**
-** @(#) $Id: sqliteInt.h,v 1.6.4.1 2005/09/07 15:11:33 iliaa Exp $
+** @(#) $Id: sqliteInt.h,v 1.6.4.2 2005/12/20 15:26:26 iliaa Exp $
*/
#include "config.h"
#include "sqlite.h"
@@ -1120,7 +1120,7 @@
#endif
char *sqliteMPrintf(const char*, ...);
char *sqliteVMPrintf(const char*, va_list);
-void sqliteSetString(char **, const char *, ...);
+void sqliteSetString(char **, ...);
void sqliteSetNString(char **, ...);
void sqliteErrorMsg(Parse*, const char*, ...);
void sqliteDequote(char*);
http://cvs.php.net/viewcvs.cgi/php-src/ext/sqlite/libsqlite/src/util.c?r1=1.6.4.1&r2=1.6.4.2&diff_format=u
Index: php-src/ext/sqlite/libsqlite/src/util.c
diff -u php-src/ext/sqlite/libsqlite/src/util.c:1.6.4.1
php-src/ext/sqlite/libsqlite/src/util.c:1.6.4.2
--- php-src/ext/sqlite/libsqlite/src/util.c:1.6.4.1 Wed Sep 7 15:11:33 2005
+++ php-src/ext/sqlite/libsqlite/src/util.c Tue Dec 20 15:26:26 2005
@@ -14,7 +14,7 @@
** This file contains functions for allocating memory, comparing
** strings, and stuff like that.
**
-** $Id: util.c,v 1.6.4.1 2005/09/07 15:11:33 iliaa Exp $
+** $Id: util.c,v 1.6.4.2 2005/12/20 15:26:26 iliaa Exp $
*/
#include "sqliteInt.h"
#include <stdarg.h>
@@ -330,15 +330,15 @@
** point to that string. The 1st argument must either be NULL or
** point to memory obtained from sqliteMalloc().
*/
-void sqliteSetString(char **pz, const char *zFirst, ...){
+void sqliteSetString(char **pz, ...){
va_list ap;
int nByte;
const char *z;
char *zResult;
if( pz==0 ) return;
- nByte = strlen(zFirst) + 1;
- va_start(ap, zFirst);
+ nByte = 1;
+ va_start(ap, pz);
while( (z = va_arg(ap, const char*))!=0 ){
nByte += strlen(z);
}
@@ -348,9 +348,8 @@
if( zResult==0 ){
return;
}
- strcpy(zResult, zFirst);
- zResult += strlen(zResult);
- va_start(ap, zFirst);
+ *zResult = 0;
+ va_start(ap, pz);
while( (z = va_arg(ap, const char*))!=0 ){
strcpy(zResult, z);
zResult += strlen(zResult);
http://cvs.php.net/viewcvs.cgi/php-src/ext/sqlite/tests/blankdb.inc?r1=1.4&r2=1.4.4.1&diff_format=u
Index: php-src/ext/sqlite/tests/blankdb.inc
diff -u php-src/ext/sqlite/tests/blankdb.inc:1.4
php-src/ext/sqlite/tests/blankdb.inc:1.4.4.1
--- php-src/ext/sqlite/tests/blankdb.inc:1.4 Thu Jan 8 16:55:37 2004
+++ php-src/ext/sqlite/tests/blankdb.inc Tue Dec 20 15:26:26 2005
@@ -1,17 +1,3 @@
<?php #vim:ft=php
-$dbname = tempnam(dirname(__FILE__), "phpsql");
-function cleanup() {
- $retry = 10;
-
- if (is_resource($GLOBALS['db'])) {
- @sqlite_close($GLOBALS['db']);
- }
- do {
- usleep(500000);
- if (@unlink($GLOBALS['dbname']))
- break;
- } while (file_exists($GLOBALS['dbname']) && --$retry);
-}
-register_shutdown_function("cleanup");
-$db = sqlite_open($dbname);
+$db = sqlite_open(":memory:");
?>
http://cvs.php.net/viewcvs.cgi/php-src/ext/sqlite/tests/blankdb_oo.inc?r1=1.4&r2=1.4.4.1&diff_format=u
Index: php-src/ext/sqlite/tests/blankdb_oo.inc
diff -u php-src/ext/sqlite/tests/blankdb_oo.inc:1.4
php-src/ext/sqlite/tests/blankdb_oo.inc:1.4.4.1
--- php-src/ext/sqlite/tests/blankdb_oo.inc:1.4 Mon Mar 29 19:49:17 2004
+++ php-src/ext/sqlite/tests/blankdb_oo.inc Tue Dec 20 15:26:26 2005
@@ -1,11 +1,3 @@
<?php #vim:ft=php
-$dbname = tempnam(dirname(__FILE__), "phpsql");
-function cleanup() {
- global $db, $dbname;
- $db = NULL;
- usleep(500000);
- @unlink($dbname);
-}
-register_shutdown_function("cleanup");
-$db = new SQLiteDatabase($dbname);
+$db = new SQLiteDatabase(":memory:");
?>
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php