iliaa           Tue Dec 20 15:26:46 2005 EDT

  Modified files:              
    /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:
  MFB51: 
  Updated libsqlite in ext/sqlite to 2.8.17.
  Use in-memory database for tests.
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/sqlite/libsqlite/VERSION?r1=1.7&r2=1.8&diff_format=u
Index: php-src/ext/sqlite/libsqlite/VERSION
diff -u php-src/ext/sqlite/libsqlite/VERSION:1.7 
php-src/ext/sqlite/libsqlite/VERSION:1.8
--- php-src/ext/sqlite/libsqlite/VERSION:1.7    Wed Sep  7 15:10:07 2005
+++ php-src/ext/sqlite/libsqlite/VERSION        Tue Dec 20 15:26:45 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.8&r2=1.9&diff_format=u
Index: php-src/ext/sqlite/libsqlite/src/os.c
diff -u php-src/ext/sqlite/libsqlite/src/os.c:1.8 
php-src/ext/sqlite/libsqlite/src/os.c:1.9
--- php-src/ext/sqlite/libsqlite/src/os.c:1.8   Wed Sep  7 15:10:10 2005
+++ php-src/ext/sqlite/libsqlite/src/os.c       Tue Dec 20 15:26:45 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.7&r2=1.8&diff_format=u
Index: php-src/ext/sqlite/libsqlite/src/pager.c
diff -u php-src/ext/sqlite/libsqlite/src/pager.c:1.7 
php-src/ext/sqlite/libsqlite/src/pager.c:1.8
--- php-src/ext/sqlite/libsqlite/src/pager.c:1.7        Wed Sep  7 15:10:10 2005
+++ php-src/ext/sqlite/libsqlite/src/pager.c    Tue Dec 20 15:26:45 2005
@@ -18,7 +18,7 @@
 ** file simultaneously, or one process from reading the database while
 ** another is writing.
 **
-** @(#) $Id: pager.c,v 1.7 2005/09/07 15:10:10 iliaa Exp $
+** @(#) $Id: pager.c,v 1.8 2005/12/20 15:26:45 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.7&r2=1.8&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.7 
php-src/ext/sqlite/libsqlite/src/sqlite.w32.h:1.8
--- php-src/ext/sqlite/libsqlite/src/sqlite.w32.h:1.7   Wed Sep  7 15:10:12 2005
+++ php-src/ext/sqlite/libsqlite/src/sqlite.w32.h       Tue Dec 20 15:26:45 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.7 2005/09/07 15:10:12 iliaa Exp $
+** @(#) $Id: sqlite.w32.h,v 1.8 2005/12/20 15:26:45 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.7&r2=1.8&diff_format=u
Index: php-src/ext/sqlite/libsqlite/src/sqliteInt.h
diff -u php-src/ext/sqlite/libsqlite/src/sqliteInt.h:1.7 
php-src/ext/sqlite/libsqlite/src/sqliteInt.h:1.8
--- php-src/ext/sqlite/libsqlite/src/sqliteInt.h:1.7    Wed Sep  7 15:10:12 2005
+++ php-src/ext/sqlite/libsqlite/src/sqliteInt.h        Tue Dec 20 15:26:45 2005
@@ -11,7 +11,7 @@
 *************************************************************************
 ** Internal interface definitions for SQLite.
 **
-** @(#) $Id: sqliteInt.h,v 1.7 2005/09/07 15:10:12 iliaa Exp $
+** @(#) $Id: sqliteInt.h,v 1.8 2005/12/20 15:26:45 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.7&r2=1.8&diff_format=u
Index: php-src/ext/sqlite/libsqlite/src/util.c
diff -u php-src/ext/sqlite/libsqlite/src/util.c:1.7 
php-src/ext/sqlite/libsqlite/src/util.c:1.8
--- php-src/ext/sqlite/libsqlite/src/util.c:1.7 Wed Sep  7 15:10:14 2005
+++ php-src/ext/sqlite/libsqlite/src/util.c     Tue Dec 20 15:26:45 2005
@@ -14,7 +14,7 @@
 ** This file contains functions for allocating memory, comparing
 ** strings, and stuff like that.
 **
-** $Id: util.c,v 1.7 2005/09/07 15:10:14 iliaa Exp $
+** $Id: util.c,v 1.8 2005/12/20 15:26:45 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.5&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.5
--- 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:45 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.5&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.5
--- 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:45 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

Reply via email to