]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Start a new branch for release 3.6.22 plus limited enhancements and fixes.
authordrh <drh@noemail.net>
Thu, 25 Feb 2010 01:47:15 +0000 (01:47 +0000)
committerdrh <drh@noemail.net>
Thu, 25 Feb 2010 01:47:15 +0000 (01:47 +0000)
This first check-in includes the performance enhancements of check-ins
[26cb1df735], [61a2c8d4d6], and [27dc5b1c52]

FossilOrigin-Name: 9588259882541e215813f48ccfa9180d8013a876

manifest
manifest.uuid
src/pager.c
src/pcache.c
src/vdbe.c

index 1314a6dc7916d2e011eb115928ed945166340197..d32d613ea50ad43120d51e61151b265dc7bd2397 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,8 +1,8 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-C Version\s3.6.22\sRelease\sCandidate\s2
-D 2010-01-05T15:30:36
+C Start\sa\snew\sbranch\sfor\srelease\s3.6.22\splus\slimited\senhancements\sand\sfixes.\nThis\sfirst\scheck-in\sincludes\sthe\sperformance\senhancements\sof\scheck-ins\n[26cb1df735],\s[61a2c8d4d6],\sand\s[27dc5b1c52]
+D 2010-02-25T01:47:15
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in c5827ead754ab32b9585487177c93bb00b9497b3
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -153,10 +153,10 @@ F src/os_common.h 240c88b163b02c21a9f21f87d49678a0aa21ff30
 F src/os_os2.c 75a8c7b9a00a2cf1a65f9fa4afbc27d46634bb2f
 F src/os_unix.c b24510792108ffee0c8175c1d2fc644913b241d2
 F src/os_win.c 5ffab20249a61e0625f869efe157fa009747039b
-F src/pager.c e5421d38470fe58faee71a5a66a778ada882394c
+F src/pager.c 4cf8da7cf454d09086400c3b2943b41e6e46e829
 F src/pager.h 1b32faf2e578ac3e7bcf9c9d11217128261c5c54
 F src/parse.y ace5c7a125d9f2a410e431ee3209034105045f7e
-F src/pcache.c 3b079306376e0e04c0d3df40c0a4b750a1839310
+F src/pcache.c 815bcb3cf0e14b23212efd3f4981f667a5fd633e
 F src/pcache.h c683390d50f856d4cd8e24342ae62027d1bb6050
 F src/pcache1.c 2bb2261190b42a348038f5b1c285c8cef415fcc8
 F src/pragma.c 6936d7df5e04b9f996f8f320d15e65b6944b2caa
@@ -212,7 +212,7 @@ F src/update.c c0dc6b75ad28b76b619042d934f337b02acee208
 F src/utf.c dad16adcc0c35ef2437dca125a4b07419d361052
 F src/util.c ad4f03079ba0fe83590d1cc9197e8e4844e38592
 F src/vacuum.c db6415fd0f1be191e16228457a6deb9f232e6ad6
-F src/vdbe.c e05765736504d9dbcbb3dfa8964932780002ec39
+F src/vdbe.c e65ccd13dce8843fe617884feab7e2c8422e4032
 F src/vdbe.h bea1f0cd530775bdb58a340265f3cf3ee920e9b2
 F src/vdbeInt.h d7ea821ac7813c9bea0fe87558c35e07b2c7c44d
 F src/vdbeapi.c fc3787eb2f5487d4cc3444de42d56f2e39d311f5
@@ -786,14 +786,19 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 4ecb4725b76042ac414caf90039d5d0a5f8f7068
-R 8c69565948e98c03e3dd1dcbed92c860
+P 28d0d7710761114a44a1a3a425a6883c661f06e7
+R e608221d1b513ecccc862a625a27a77f
+T *bgcolor * #bfd970
+T *branch * branch-3.6.22
+T *sym-branch-3.6.22 *
+T -sym-release *
+T -sym-trunk *
 U drh
-Z ced91d02ef4d59db7742a1c68eea0156
+Z 134c3f3d253c63c36ebbeda1827f6c9d
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.6 (GNU/Linux)
 
-iD8DBQFLQ1sfoxKgR168RlERAoMSAJ4oSysPgDgbT0TYZR0idPBdpGRnXACfQOVY
-SZcqrXAqkdego3RbALXEHK4=
-=UKAs
+iD8DBQFLhdanoxKgR168RlERAof5AJ9uQvTNx+3jUFJt/A5BxxpZ0rRqdACgijY7
+OFhF60IkoiKCXeuk36DDNL8=
+=XhXU
 -----END PGP SIGNATURE-----
index 90c07762068b1105be9edd9da68a8422299a43fc..caa8a728d56db78fb5ad68b969099e97a91c2037 100644 (file)
@@ -1 +1 @@
-28d0d7710761114a44a1a3a425a6883c661f06e7
\ No newline at end of file
+9588259882541e215813f48ccfa9180d8013a876
\ No newline at end of file
index a0576f36d6a25d690baa1de01c6391cc63d62c28..62d9775e1051050063e5376d6a42c9eff55da4cc 100644 (file)
@@ -4981,30 +4981,34 @@ int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint){
     ** operation. Store this value in nNew. Then free resources associated 
     ** with any savepoints that are destroyed by this operation.
     */
-    nNew = iSavepoint + (op==SAVEPOINT_ROLLBACK);
+    nNew = iSavepoint + (( op==SAVEPOINT_RELEASE ) ? 0 : 1);
     for(ii=nNew; ii<pPager->nSavepoint; ii++){
       sqlite3BitvecDestroy(pPager->aSavepoint[ii].pInSavepoint);
     }
     pPager->nSavepoint = nNew;
 
-    /* If this is a rollback operation, playback the specified savepoint.
+    /* If this is a release of the outermost savepoint, truncate 
+    ** the sub-journal to zero bytes in size. */
+    if( op==SAVEPOINT_RELEASE ){
+      if( nNew==0 && isOpen(pPager->sjfd) ){
+        /* Only truncate if it is an in-memory sub-journal. */
+        if( sqlite3IsMemJournal(pPager->sjfd) ){
+          rc = sqlite3OsTruncate(pPager->sjfd, 0);
+        }
+        pPager->nSubRec = 0;
+      }
+    }
+    /* Else this is a rollback operation, playback the specified savepoint.
     ** If this is a temp-file, it is possible that the journal file has
     ** not yet been opened. In this case there have been no changes to
     ** the database file, so the playback operation can be skipped.
     */
-    if( op==SAVEPOINT_ROLLBACK && isOpen(pPager->jfd) ){
+    else if( isOpen(pPager->jfd) ){
       PagerSavepoint *pSavepoint = (nNew==0)?0:&pPager->aSavepoint[nNew-1];
       rc = pagerPlaybackSavepoint(pPager, pSavepoint);
       assert(rc!=SQLITE_DONE);
     }
   
-    /* If this is a release of the outermost savepoint, truncate 
-    ** the sub-journal to zero bytes in size. */
-    if( nNew==0 && op==SAVEPOINT_RELEASE && isOpen(pPager->sjfd) ){
-      assert( rc==SQLITE_OK );
-      rc = sqlite3OsTruncate(pPager->sjfd, 0);
-      pPager->nSubRec = 0;
-    }
   }
   return rc;
 }
index bd46e54f8b5f10fd922890af679dc4cdb0d688e7..257134ab7be124a074e4c759113e8ec75df48caa 100644 (file)
@@ -242,6 +242,7 @@ int sqlite3PcacheFetch(
         pPg && (pPg->nRef || (pPg->flags&PGHDR_NEED_SYNC)); 
         pPg=pPg->pDirtyPrev
     );
+    pCache->pSynced = pPg;
     if( !pPg ){
       for(pPg=pCache->pDirtyTail; pPg && pPg->nRef; pPg=pPg->pDirtyPrev);
     }
index aef20c5926050914bb9e6f9ae9e63abcf890e14e..504d05593e517443e8c768182f34b1d75fb65d0d 100644 (file)
@@ -2059,7 +2059,7 @@ case OP_Column: {
   u8 *zIdx;          /* Index into header */
   u8 *zEndHdr;       /* Pointer to first byte after the header */
   u32 offset;        /* Offset into the data */
-  u64 offset64;      /* 64-bit offset.  64 bits needed to catch overflow */
+  u32 szField;       /* Number of bytes in the content of a field */
   int szHdr;         /* Size of the header size field at start of record */
   int avail;         /* Number of bytes of available data */
   Mem *pReg;         /* PseudoTable input register */
@@ -2234,12 +2234,16 @@ case OP_Column: {
     ** column and aOffset[i] will contain the offset from the beginning
     ** of the record to the start of the data for the i-th column
     */
-    offset64 = offset;
     for(i=0; i<nField; i++){
       if( zIdx<zEndHdr ){
-        aOffset[i] = (u32)offset64;
+        aOffset[i] = offset;
         zIdx += getVarint32(zIdx, aType[i]);
-        offset64 += sqlite3VdbeSerialTypeLen(aType[i]);
+        szField = sqlite3VdbeSerialTypeLen(aType[i]);
+        offset += szField;
+        if( offset<szField ){  /* True if offset overflows */
+          zIdx = &zEndHdr[1];  /* Forces SQLITE_CORRUPT return below */
+          break;
+        }
       }else{
         /* If i is less that nField, then there are less fields in this
         ** record than SetNumColumns indicated there are columns in the
@@ -2259,8 +2263,8 @@ case OP_Column: {
     ** of the record (when all fields present), then we must be dealing 
     ** with a corrupt database.
     */
-    if( (zIdx > zEndHdr)|| (offset64 > payloadSize)
-     || (zIdx==zEndHdr && offset64!=(u64)payloadSize) ){
+    if( (zIdx > zEndHdr) || (offset > payloadSize)
+         || (zIdx==zEndHdr && offset!=payloadSize) ){
       rc = SQLITE_CORRUPT_BKPT;
       goto op_column_out;
     }