iliaa           Tue May 19 18:33:02 2009 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src    NEWS 
    /php-src/ext/sqlite3/libsqlite      sqlite3.c sqlite3.h sqlite3ext.h 
  Log:
  Upgraded to 3.6.14.1
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.607&r2=1.2027.2.547.2.965.2.608&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.607 
php-src/NEWS:1.2027.2.547.2.965.2.608
--- php-src/NEWS:1.2027.2.547.2.965.2.607       Tue May 19 09:41:34 2009
+++ php-src/NEWS        Tue May 19 18:32:25 2009
@@ -1,7 +1,7 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2009, PHP 5.3.0 RC 3
-- Upgraded bundled sqlite to version 3.6.14. (Scott)
+- Upgraded bundled sqlite to version 3.6.14.1. (Ilia)
 - Upgraded bundled libmagic to 5.03 in the fileinfo extension. (Scott)
 
 - Removed all zend_extension_* php.ini directives. Zend extensions are now
http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/libsqlite/sqlite3.c?r1=1.1.2.21&r2=1.1.2.22&diff_format=u
Index: php-src/ext/sqlite3/libsqlite/sqlite3.c
diff -u php-src/ext/sqlite3/libsqlite/sqlite3.c:1.1.2.21 
php-src/ext/sqlite3/libsqlite/sqlite3.c:1.1.2.22
--- php-src/ext/sqlite3/libsqlite/sqlite3.c:1.1.2.21    Thu May  7 12:39:26 2009
+++ php-src/ext/sqlite3/libsqlite/sqlite3.c     Tue May 19 18:32:25 2009
@@ -4,7 +4,7 @@
 
 /******************************************************************************
 ** This file is an amalgamation of many separate C source files from SQLite
-** version 3.6.14.  By combining all the individual C code files into this 
+** version 3.6.14.1.  By combining all the individual C code files into this 
 ** single large file, the entire code can be compiled as a one translation
 ** unit.  This allows many compilers to do optimizations that would not be
 ** possible if the files were compiled separately.  Performance improvements
@@ -21,7 +21,7 @@
 ** is also in a separate file.  This file contains only code for the core
 ** SQLite library.
 **
-** This amalgamation was generated on 2009-05-07 01:56:00 UTC.
+** This amalgamation was generated on 2009-05-18 18:33:54 UTC.
 */
 #define SQLITE_CORE 1
 #define SQLITE_AMALGAMATION 1
@@ -45,7 +45,7 @@
 *************************************************************************
 ** Internal interface definitions for SQLite.
 **
-** @(#) $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** @(#) $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #ifndef _SQLITEINT_H_
 #define _SQLITEINT_H_
@@ -74,7 +74,7 @@
 ** 
 ** This file defines various limits of what SQLite can process.
 **
-** @(#) $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** @(#) $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -532,7 +532,7 @@
 ** the version number) and changes its name to "sqlite3.h" as
 ** part of the build process.
 **
-** @(#) $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** @(#) $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #ifndef _SQLITE3_H_
 #define _SQLITE3_H_
@@ -601,7 +601,7 @@
 **
 ** Requirements: [H10011] [H10014]
 */
-#define SQLITE_VERSION         "3.6.14"
+#define SQLITE_VERSION         "3.6.14.1"
 #define SQLITE_VERSION_NUMBER  3006014
 
 /*
@@ -6052,7 +6052,7 @@
 ** This is the header file for the generic hash-table implemenation
 ** used in SQLite.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #ifndef _SQLITE_HASH_H_
 #define _SQLITE_HASH_H_
@@ -6635,7 +6635,7 @@
 ** subsystem.  See comments in the source code for a detailed description
 ** of what each interface routine does.
 **
-** @(#) $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** @(#) $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #ifndef _BTREE_H_
 #define _BTREE_H_
@@ -6867,7 +6867,7 @@
 ** or VDBE.  The VDBE implements an abstract machine that runs a
 ** simple program to access and modify the underlying database.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #ifndef _SQLITE_VDBE_H_
 #define _SQLITE_VDBE_H_
@@ -7259,7 +7259,7 @@
 ** subsystem.  The page cache subsystem reads and writes a file a page
 ** at a time and provides a journal for rollback.
 **
-** @(#) $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** @(#) $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 #ifndef _PAGER_H_
@@ -7427,7 +7427,7 @@
 ** This header file defines the interface that the sqlite page cache
 ** subsystem. 
 **
-** @(#) $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** @(#) $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 #ifndef _PCACHE_H_
@@ -7595,7 +7595,7 @@
 ** This header file is #include-ed by sqliteInt.h and thus ends up
 ** being included by every source file.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #ifndef _SQLITE_OS_H_
 #define _SQLITE_OS_H_
@@ -7655,7 +7655,6 @@
 # define SQLITE_OS_WINCE 0
 #endif
 
-#include <ctype.h>
 
 /*
 ** Define the maximum size of a temporary filename
@@ -7871,7 +7870,7 @@
 ** Source files should #include the sqliteInt.h file and let that file
 ** include this one indirectly.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 
@@ -10185,7 +10184,7 @@
 **
 ** This file contains definitions of global variables and contants.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 
@@ -10378,7 +10377,7 @@
 ** This module implements the sqlite3_status() interface and related
 ** functionality.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -10505,7 +10504,7 @@
 ** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
 ** All other code has file scope.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 **
 ** SQLite processes all times and dates as Julian Day numbers.  The
 ** dates and times are stored as the number of days since noon
@@ -11610,7 +11609,7 @@
 ** This file contains OS interface code that is common to all
 ** architectures.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #define _SQLITE_OS_C_ 1
 #undef _SQLITE_OS_C_
@@ -11890,7 +11889,7 @@
 **
 *************************************************************************
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -11989,7 +11988,7 @@
 ** are merely placeholders.  Real drivers must be substituted using
 ** sqlite3_config() before SQLite will operate.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -12053,7 +12052,7 @@
 ** This file contains implementations of the low-level memory allocation
 ** routines specified in the sqlite3_mem_methods object.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -12202,7 +12201,7 @@
 ** This file contains implementations of the low-level memory allocation
 ** routines specified in the sqlite3_mem_methods object.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -12651,7 +12650,7 @@
 ** This version of the memory allocation subsystem is included
 ** in the build only if SQLITE_ENABLE_MEMSYS3 is defined.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -13341,7 +13340,7 @@
 ** This version of the memory allocation subsystem is included
 ** in the build only if SQLITE_ENABLE_MEMSYS5 is defined.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -13822,7 +13821,7 @@
 ** This file contains code that is common across all mutex implementations.
 
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 #ifndef SQLITE_MUTEX_OMIT
@@ -13984,7 +13983,7 @@
 ** that does error checking on mutexes to make sure they are being
 ** called correctly.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 
@@ -14158,7 +14157,7 @@
 *************************************************************************
 ** This file contains the C functions that implement mutexes for OS/2
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -14433,7 +14432,7 @@
 *************************************************************************
 ** This file contains the C functions that implement mutexes for pthreads
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -14763,7 +14762,7 @@
 *************************************************************************
 ** This file contains the C functions that implement mutexes for win32
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -15022,7 +15021,7 @@
 **
 ** Memory allocation functions used throughout sqlite.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -15734,7 +15733,7 @@
 ** an historical reference.  Most of the "enhancements" have been backed
 ** out so that the functionality is now the same as standard printf().
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 **
 **************************************************************************
 **
@@ -16701,7 +16700,7 @@
 ** Random numbers are used by some of the database backends in order
 ** to generate random integer keys for tables or random filenames.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 
@@ -16847,7 +16846,7 @@
 ** This file contains routines used to translate between UTF-8, 
 ** UTF-16, UTF-16BE, and UTF-16LE.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 **
 ** Notes on UTF-8:
 **
@@ -16889,7 +16888,7 @@
 ** 6000 lines long) it was split up into several smaller files and
 ** this header information was factored out.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #ifndef _VDBEINT_H_
 #define _VDBEINT_H_
@@ -17801,7 +17800,7 @@
 ** This file contains functions for allocating memory, comparing
 ** strings, and stuff like that.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #ifdef SQLITE_HAVE_ISNAN
 # include <math.h>
@@ -18851,7 +18850,7 @@
 ** This is the implementation of generic hash-tables
 ** used in SQLite.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /* Turn bulk memory into a hash table object by initializing the
@@ -19287,7 +19286,7 @@
 **
 ** This file contains code that is specific to OS/2.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 
@@ -19350,7 +19349,7 @@
 ** This file should be #included by the os_*.c files only.  It is not a
 ** general purpose header file.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #ifndef _OS_COMMON_H_
 #define _OS_COMMON_H_
@@ -19412,7 +19411,7 @@
 ** This file contains inline asm code for retrieving "high-performance"
 ** counters for x86 class CPUs.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #ifndef _HWTIME_H_
 #define _HWTIME_H_
@@ -20670,7 +20669,7 @@
 **   *  Definitions of sqlite3_vfs objects for all locking methods
 **      plus implementations of sqlite3_os_init() and sqlite3_os_end().
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #if SQLITE_OS_UNIX              /* This file is used on unix only */
 
@@ -20866,7 +20865,7 @@
 ** This file should be #included by the os_*.c files only.  It is not a
 ** general purpose header file.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #ifndef _OS_COMMON_H_
 #define _OS_COMMON_H_
@@ -20928,7 +20927,7 @@
 ** This file contains inline asm code for retrieving "high-performance"
 ** counters for x86 class CPUs.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #ifndef _HWTIME_H_
 #define _HWTIME_H_
@@ -26005,7 +26004,7 @@
 **
 ** This file contains code that is specific to windows.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #if SQLITE_OS_WIN               /* This file is used for windows only */
 
@@ -26073,7 +26072,7 @@
 ** This file should be #included by the os_*.c files only.  It is not a
 ** general purpose header file.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #ifndef _OS_COMMON_H_
 #define _OS_COMMON_H_
@@ -26135,7 +26134,7 @@
 ** This file contains inline asm code for retrieving "high-performance"
 ** counters for x86 class CPUs.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #ifndef _HWTIME_H_
 #define _HWTIME_H_
@@ -28130,7 +28129,7 @@
 ** start of a transaction, and is thus usually less than a few thousand,
 ** but can be as large as 2 billion for a really big database.
 **
-** @(#) $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** @(#) $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /* Size of the Bitvec structure in bytes. */
@@ -28505,7 +28504,7 @@
 *************************************************************************
 ** This file implements that page cache.
 **
-** @(#) $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** @(#) $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -29094,7 +29093,7 @@
 ** If the default page cache implementation is overriden, then neither of
 ** these two features are available.
 **
-** @(#) $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** @(#) $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 
@@ -29437,6 +29436,7 @@
   PCache1 *pCache, 
   unsigned int iLimit 
 ){
+  TESTONLY( int nPage = 0; )      /* Used to assert pCache->nPage is correct */
   unsigned int h;
   assert( sqlite3_mutex_held(pcache1.mutex) );
   for(h=0; h<pCache->nHash; h++){
@@ -29444,14 +29444,17 @@
     PgHdr1 *pPage;
     while( (pPage = *pp)!=0 ){
       if( pPage->iKey>=iLimit ){
-        pcache1PinPage(pPage);
+        pCache->nPage--;
         *pp = pPage->pNext;
+        pcache1PinPage(pPage);
         pcache1FreePage(pPage);
       }else{
         pp = &pPage->pNext;
+        TESTONLY( nPage++ );
       }
     }
   }
+  assert( pCache->nPage==nPage );
 }
 
 
/******************************************************************************/
@@ -29892,7 +29895,7 @@
 ** There is an added cost of O(N) when switching between TEST and
 ** SMALLEST primitives.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 
@@ -30276,7 +30279,7 @@
 ** file simultaneously, or one process from reading the database while
 ** another is writing.
 **
-** @(#) $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** @(#) $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #ifndef SQLITE_OMIT_DISKIO
 
@@ -33879,7 +33882,7 @@
       );
     }
 
-    if( sqlite3PcachePagecount(pPager->pPCache)>0 ){
+    if( pPager->pBackup || sqlite3PcachePagecount(pPager->pPCache)>0 ){
       /* The shared-lock has just been acquired on the database file
       ** and there are already pages in the cache (from a previous
       ** read or write transaction).  Check to see if the database
@@ -35540,7 +35543,7 @@
 **
 *************************************************************************
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 **
 ** This file contains code used to implement mutexes on Btree objects.
 ** This code really belongs in btree.c.  But btree.c is getting too
@@ -35560,7 +35563,7 @@
 **    May you share freely, never taking more than you give.
 **
 *************************************************************************
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 **
 ** This file implements a external (disk-based) database using BTrees.
 ** For a detailed discussion of BTrees, refer to
@@ -36540,7 +36543,7 @@
 **    May you share freely, never taking more than you give.
 **
 *************************************************************************
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 **
 ** This file implements a external (disk-based) database using BTrees.
 ** See the header comment on "btreeInt.h" for additional information.
@@ -44241,7 +44244,7 @@
 ** This file contains the implementation of the sqlite3_backup_XXX() 
 ** API functions and the related features.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /* Macro to find the minimum of two numeric values.
@@ -44271,6 +44274,7 @@
   Pgno nRemaining;         /* Number of pages left to copy */
   Pgno nPagecount;         /* Total number of pages to copy */
 
+  int isAttached;          /* True once backup has been registered with pager 
*/
   sqlite3_backup *pNext;   /* Next backup associated with source pager */
 };
 
@@ -44384,6 +44388,7 @@
     p->pDestDb = pDestDb;
     p->pSrcDb = pSrcDb;
     p->iNext = 1;
+    p->isAttached = 0;
 
     if( 0==p->pSrc || 0==p->pDest ){
       /* One (or both) of the named databases did not exist. An error has
@@ -44394,18 +44399,7 @@
       p = 0;
     }
   }
-
-  /* If everything has gone as planned, attach the backup object to the
-  ** source pager. The source pager calls BackupUpdate() and BackupRestart()
-  ** to notify this module if the source file is modified mid-backup.
-  */
   if( p ){
-    sqlite3_backup **pp;             /* Pointer to head of pagers backup list 
*/
-    sqlite3BtreeEnter(p->pSrc);
-    pp = sqlite3PagerBackupPtr(sqlite3BtreePager(p->pSrc));
-    p->pNext = *pp;
-    *pp = p;
-    sqlite3BtreeLeave(p->pSrc);
     p->pSrc->nBackup++;
   }
 
@@ -44499,6 +44493,19 @@
 }
 
 /*
+** Register this backup object with the associated source pager for
+** callbacks when pages are changed or the cache invalidated.
+*/
+static void attachBackupObject(sqlite3_backup *p){
+  sqlite3_backup **pp;
+  assert( sqlite3BtreeHoldsMutex(p->pSrc) );
+  pp = sqlite3PagerBackupPtr(sqlite3BtreePager(p->pSrc));
+  p->pNext = *pp;
+  *pp = p;
+  p->isAttached = 1;
+}
+
+/*
 ** Copy nPage pages from the source b-tree to the destination.
 */
 SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage){
@@ -44567,6 +44574,8 @@
       p->nRemaining = nSrcPage+1-p->iNext;
       if( p->iNext>(Pgno)nSrcPage ){
         rc = SQLITE_DONE;
+      }else if( !p->isAttached ){
+        attachBackupObject(p);
       }
     }
   
@@ -44699,12 +44708,14 @@
 
   /* Detach this backup from the source pager. */
   if( p->pDestDb ){
+    p->pSrc->nBackup--;
+  }
+  if( p->isAttached ){
     pp = sqlite3PagerBackupPtr(sqlite3BtreePager(p->pSrc));
     while( *pp!=p ){
       pp = &(*pp)->pNext;
     }
     *pp = p->pNext;
-    p->pSrc->nBackup--;
   }
 
   /* If a transaction is still open on the Btree, roll it back. */
@@ -44856,7 +44867,7 @@
 ** only within the VDBE.  Interface routines refer to a Mem using the
 ** name sqlite_value
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -45915,7 +45926,7 @@
 ** to version 2.8.7, all this code was combined into the vdbe.c source file.
 ** But that file was getting too big so this subroutines were split out.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 
@@ -48608,7 +48619,7 @@
 ** This file contains code use to implement APIs that are part of the
 ** VDBE.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 #if 0 && defined(SQLITE_ENABLE_MEMORY_MANAGEMENT)
@@ -49987,7 +49998,7 @@
 ** in this file for details.  If in doubt, do not deviate from existing
 ** commenting and indentation practices when changing or adding code.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -50416,7 +50427,7 @@
 ** This file contains inline asm code for retrieving "high-performance"
 ** counters for x86 class CPUs.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #ifndef _HWTIME_H_
 #define _HWTIME_H_
@@ -50709,6 +50720,7 @@
       pOut = &p->aMem[pOp->p2];
       sqlite3VdbeMemReleaseExternal(pOut);
       pOut->flags = MEM_Null;
+      pOut->n = 0;
     }else
  
     /* Do common setup for opcodes marked with one of the following
@@ -55502,7 +55514,7 @@
 **
 ** This file contains code used to implement incremental BLOB I/O.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 
@@ -55851,7 +55863,7 @@
 **
 *************************************************************************
 **
-** @(#) $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** @(#) $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 #ifdef SQLITE_ENABLE_ATOMIC_WRITE
@@ -56097,7 +56109,7 @@
 ** The in-memory rollback journal is used to journal transactions for
 ** ":memory:" databases and when the journal_mode=MEMORY pragma is used.
 **
-** @(#) $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** @(#) $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /* Forward references to internal structures */
@@ -56356,7 +56368,7 @@
 ** This file contains routines used for walking the parser tree for
 ** an SQL statement.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 
@@ -56497,7 +56509,7 @@
 ** resolve all identifiers by associating them with a particular
 ** table and column.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -57671,7 +57683,7 @@
 ** This file contains routines used for analyzing expressions and
 ** for generating VDBE code that evaluates expressions in SQLite.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -61065,7 +61077,7 @@
 ** This file contains C code routines that used to generate VDBE code
 ** that implements the ALTER TABLE command.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -61695,7 +61707,7 @@
 *************************************************************************
 ** This file contains code associated with the ANALYZE command.
 **
-** @(#) $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** @(#) $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #ifndef SQLITE_OMIT_ANALYZE
 
@@ -62129,7 +62141,7 @@
 *************************************************************************
 ** This file contains code used to implement the ATTACH and DETACH commands.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 #ifndef SQLITE_OMIT_ATTACH
@@ -62672,7 +62684,7 @@
 ** systems that do not need this facility may omit it by recompiling
 ** the library with -DSQLITE_OMIT_AUTHORIZATION=1
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -62917,7 +62929,7 @@
 **     COMMIT
 **     ROLLBACK
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -66564,7 +66576,7 @@
 ** This file contains functions used to access the internal hash tables
 ** of user defined functions and collation sequences.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 
@@ -67018,7 +67030,7 @@
 ** This file contains C code routines that are called by the parser
 ** in order to generate code for DELETE FROM statements.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -67636,7 +67648,7 @@
 ** sqliteRegisterBuildinFunctions() found at the bottom of the file.
 ** All other code has file scope.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -69109,7 +69121,7 @@
 ** This file contains C code routines that are called by the parser
 ** to handle INSERT statements in SQLite.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -70873,7 +70885,7 @@
 ** other files are for internal use by SQLite and should not be
 ** accessed by users of the library.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 
@@ -71016,7 +71028,7 @@
 ** This file contains code used to dynamically load extensions into
 ** the SQLite library.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 #ifndef SQLITE_CORE
@@ -71041,7 +71053,7 @@
 ** as extensions by SQLite should #include this file instead of 
 ** sqlite3.h.
 **
-** @(#) $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** @(#) $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #ifndef _SQLITE3EXT_H_
 #define _SQLITE3EXT_H_
@@ -72002,7 +72014,7 @@
 *************************************************************************
 ** This file contains code used to implement the PRAGMA command.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /* Ignore this whole file if pragmas are disabled
@@ -73436,7 +73448,7 @@
 ** interface, and routines that contribute to loading the database schema
 ** from disk.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -74268,7 +74280,7 @@
 ** This file contains C code routines that are called by the parser
 ** to handle SELECT statements in SQLite.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 
@@ -78545,7 +78557,7 @@
 ** These routines are in a separate files so that they will not be linked
 ** if they are not used.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 #ifndef SQLITE_OMIT_GET_TABLE
@@ -78738,7 +78750,7 @@
 *************************************************************************
 **
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 #ifndef SQLITE_OMIT_TRIGGER
@@ -79616,7 +79628,7 @@
 ** This file contains C code routines that are called by the parser
 ** to handle UPDATE statements.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 #ifndef SQLITE_OMIT_VIRTUALTABLE
@@ -80305,7 +80317,7 @@
 ** Most of the code in this file may be omitted by defining the
 ** SQLITE_OMIT_VACUUM macro.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 #if !defined(SQLITE_OMIT_VACUUM) && !defined(SQLITE_OMIT_ATTACH)
@@ -80605,7 +80617,7 @@
 *************************************************************************
 ** This file contains code used to help implement virtual tables.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #ifndef SQLITE_OMIT_VIRTUALTABLE
 
@@ -81464,7 +81476,7 @@
 ** so is applicable.  Because this module is responsible for selecting
 ** indices, you might also think of this module as the "query optimizer".
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -88311,7 +88323,7 @@
 ** individual tokens and sends those tokens one-by-one over to the
 ** parser for analysis.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /*
@@ -88364,7 +88376,7 @@
 **
 ** The code in this file has been automatically generated by
 **
-**     $Header: /repository/php-src/ext/sqlite3/libsqlite/sqlite3.c,v 1.1.2.21 
2009/05/07 12:39:26 iliaa Exp $
+**     $Header: /repository/php-src/ext/sqlite3/libsqlite/sqlite3.c,v 1.1.2.22 
2009/05/19 18:32:25 iliaa Exp $
 **
 ** The code in this file implements a function that determines whether
 ** or not a given identifier is really an SQL keyword.  The same thing
@@ -89106,7 +89118,7 @@
 ** separating it out, the code will be automatically omitted from
 ** static links that do not use it.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 #ifndef SQLITE_OMIT_COMPLETE
 
@@ -89383,7 +89395,7 @@
 ** other files are for internal use by SQLite and should not be
 ** accessed by users of the library.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 #ifdef SQLITE_ENABLE_FTS3
@@ -91673,7 +91685,7 @@
 ** This file contains the implementation of the sqlite3_unlock_notify()
 ** API method and its associated functionality.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 /* Omit this entire file if SQLITE_ENABLE_UNLOCK_NOTIFY is not defined. */
@@ -101885,7 +101897,7 @@
 ** This file contains code for implementations of the r-tree and r*-tree
 ** algorithms packaged as an SQLite virtual table module.
 **
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RTREE)
@@ -104740,7 +104752,7 @@
 **    May you share freely, never taking more than you give.
 **
 *************************************************************************
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 **
 ** This file implements an integration between the ICU library 
 ** ("International Components for Unicode", an open-source library 
@@ -105241,7 +105253,7 @@
 *************************************************************************
 ** This file implements a tokenizer for fts3 based on the ICU library.
 ** 
-** $Id: sqlite3.c,v 1.1.2.21 2009/05/07 12:39:26 iliaa Exp $
+** $Id: sqlite3.c,v 1.1.2.22 2009/05/19 18:32:25 iliaa Exp $
 */
 
 #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/libsqlite/sqlite3.h?r1=1.1.2.17&r2=1.1.2.18&diff_format=u
Index: php-src/ext/sqlite3/libsqlite/sqlite3.h
diff -u php-src/ext/sqlite3/libsqlite/sqlite3.h:1.1.2.17 
php-src/ext/sqlite3/libsqlite/sqlite3.h:1.1.2.18
--- php-src/ext/sqlite3/libsqlite/sqlite3.h:1.1.2.17    Thu May  7 11:27:45 2009
+++ php-src/ext/sqlite3/libsqlite/sqlite3.h     Tue May 19 18:32:45 2009
@@ -30,7 +30,7 @@
 ** the version number) and changes its name to "sqlite3.h" as
 ** part of the build process.
 **
-** @(#) $Id: sqlite3.h,v 1.1.2.17 2009/05/07 11:27:45 scottmac Exp $
+** @(#) $Id: sqlite3.h,v 1.1.2.18 2009/05/19 18:32:45 iliaa Exp $
 */
 #ifndef _SQLITE3_H_
 #define _SQLITE3_H_
@@ -99,7 +99,7 @@
 **
 ** Requirements: [H10011] [H10014]
 */
-#define SQLITE_VERSION         "3.6.14"
+#define SQLITE_VERSION         "3.6.14.1"
 #define SQLITE_VERSION_NUMBER  3006014
 
 /*
http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/libsqlite/sqlite3ext.h?r1=1.1.2.16&r2=1.1.2.17&diff_format=u
Index: php-src/ext/sqlite3/libsqlite/sqlite3ext.h
diff -u php-src/ext/sqlite3/libsqlite/sqlite3ext.h:1.1.2.16 
php-src/ext/sqlite3/libsqlite/sqlite3ext.h:1.1.2.17
--- php-src/ext/sqlite3/libsqlite/sqlite3ext.h:1.1.2.16 Thu May  7 11:27:45 2009
+++ php-src/ext/sqlite3/libsqlite/sqlite3ext.h  Tue May 19 18:32:46 2009
@@ -15,7 +15,7 @@
 ** as extensions by SQLite should #include this file instead of 
 ** sqlite3.h.
 **
-** @(#) $Id: sqlite3ext.h,v 1.1.2.16 2009/05/07 11:27:45 scottmac Exp $
+** @(#) $Id: sqlite3ext.h,v 1.1.2.17 2009/05/19 18:32:46 iliaa Exp $
 */
 #ifndef _SQLITE3EXT_H_
 #define _SQLITE3EXT_H_

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to