aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifest24
-rw-r--r--manifest.uuid2
-rw-r--r--src/btree.c22
-rw-r--r--src/btreeInt.h2
-rw-r--r--src/vdbemem.c2
-rw-r--r--src/vtab.c1
-rw-r--r--test/lock5.test7
-rw-r--r--test/releasetest.tcl3
8 files changed, 39 insertions, 24 deletions
diff --git a/manifest b/manifest
index 5d12a420d..9b98ed7c5 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Merge\srecent\strunk\smicro-optimizations\sand\sthe\sDESC\sindex\sGROUP\sBY\sORDER\sBY\nbug\sfix\sinto\sthe\ssessions\sbranch.
-D 2014-10-14T13:41:32.002
+C Merge\slatest\strunk\schanges\swith\sthis\sbranch.
+D 2014-10-15T19:37:13.299
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in dd5f245aa8c741bc65845747203c8ce2f3fb6c83
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -188,9 +188,9 @@ F src/auth.c d8abcde53426275dab6243b441256fcd8ccbebb2
F src/backup.c a31809c65623cc41849b94d368917f8bb66e6a7e
F src/bitvec.c 19a4ba637bd85f8f63fc8c9bae5ade9fb05ec1cb
F src/btmutex.c 49ca66250c7dfa844a4d4cb8272b87420d27d3a5
-F src/btree.c c9fcae8145436f728c61272cba72b1469c07f30d
+F src/btree.c 1b1123cba0c65caa0baa51e71b8c089e3167c3ed
F src/btree.h a79aa6a71e7f1055f01052b7f821bd1c2dce95c8
-F src/btreeInt.h 1bd7957161a1346a914f1f09231610e777a8e58d
+F src/btreeInt.h 026d0129724e8f265fdc60d44ec240cf5a4e6179
F src/build.c 9dc2bd94347b878c89627000c92b0c8d97ec2919
F src/callback.c 7b44ce59674338ad48b0e84e7b72f935ea4f68b0
F src/complete.c 535183afb3c75628b78ce82612931ac7cdf26f14
@@ -311,10 +311,10 @@ F src/vdbeInt.h 7254c20b45033e1194601a02f3a386e39263c0ab
F src/vdbeapi.c 30a1c991147fdf4334900b5fed8a312ae7678707
F src/vdbeaux.c 191ea23e5adbe5b6adcb9d31860b9fb890834e24
F src/vdbeblob.c d65b01f439df63911ac3d7a9a85c15503965f2c3
-F src/vdbemem.c 1731e1db2b71e62243cf825b920d14adefaba3c7
+F src/vdbemem.c 96e41193b4affd9ebc0eea2fa628879dac88c744
F src/vdbesort.c 5c1bacf90578d22b630fbf6ed98ccf60d83435ef
F src/vdbetrace.c 7e4222955e07dd707a2f360c0eb73452be1cb010
-F src/vtab.c 019dbfd0406a7447c990e1f7bd1dfcdb8895697f
+F src/vtab.c cb0c194303fea276b48d7d4b6d970b5a96bde8de
F src/wal.c 10e7de7ce90865a68153f001a61f1d985cd17983
F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
F src/walker.c c253b95b4ee44b21c406e2a1052636c31ea27804
@@ -693,7 +693,7 @@ F test/lock.test 87af515b0c4cf928576d0f89946d67d7c265dfb4
F test/lock2.test 5242d8ac4e2d59c403aebff606af449b455aceff
F test/lock3.test f271375930711ae044080f4fe6d6eda930870d00
F test/lock4.test e175ae13865bc87680607563bafba21f31a26f12
-F test/lock5.test 5ad6a1f536036ff1be915cfdd41481aeafda3273
+F test/lock5.test c6c5e0ebcb21c61a572870cc86c0cb9f14cede38
F test/lock6.test ad5b387a3a8096afd3c68a55b9535056431b0cf5
F test/lock7.test 49f1eaff1cdc491cc5dee3669f3c671d9f172431
F test/lock_common.tcl 0c270b121d40959fa2f3add382200c27045b3d95
@@ -799,7 +799,7 @@ F test/rdonly.test dd30a4858d8e0fbad2304c2bd74a33d4df36412a
F test/regexp1.test 497ea812f264d12b6198d6e50a76be4a1973a9d8
F test/reindex.test 44edd3966b474468b823d481eafef0c305022254
F test/releasetest.mk 2eced2f9ae701fd0a29e714a241760503ccba25a
-F test/releasetest.tcl 4296b9adbc5992bcd0b0b2876b7651f57c1494f2
+F test/releasetest.tcl a4279c890698584feb2ffc86735857a4e4474180
F test/resolver01.test 33abf37ff8335e6bf98f2b45a0af3e06996ccd9a
F test/rollback.test e9504a009a202c3ed711da2e6879ff60c5a4669c
F test/rowhash.test 0bc1d31415e4575d10cacf31e1a66b5cc0f8be81
@@ -1221,7 +1221,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P abfef254721ca29b653f24bfe80e88adaa92dc6c 005e5b388a8a97bca6d1f0e06c40d68d92aa1212
-R 97eb4d72b7b8377fe0610a9bf4a72e27
-U drh
-Z 615445a8ed5827e2422bf5308f655db8
+P 83d4114f2aa404e670ced33511183baacd813a01 3c1e70f4d55bc009ed9ed4cf6d756d7061985851
+R 573bb7e03bcfc05e0f889e571f4f3aa7
+U dan
+Z d7531a3919881ed86fbddd665aff411c
diff --git a/manifest.uuid b/manifest.uuid
index 7ff55810b..1d5dadfa4 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-83d4114f2aa404e670ced33511183baacd813a01 \ No newline at end of file
+1b2824f1d11ac336779372e322aecfb36fb2a31d \ No newline at end of file
diff --git a/src/btree.c b/src/btree.c
index 3553924c0..758dfe633 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -2108,7 +2108,8 @@ static int removeFromSharingList(BtShared *pBt){
/*
** Make sure pBt->pTmpSpace points to an allocation of
-** MX_CELL_SIZE(pBt) bytes.
+** MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child
+** pointer.
*/
static void allocateTempSpace(BtShared *pBt){
if( !pBt->pTmpSpace ){
@@ -2123,8 +2124,16 @@ static void allocateTempSpace(BtShared *pBt){
** it into a database page. This is not actually a problem, but it
** does cause a valgrind error when the 1 or 2 bytes of unitialized
** data is passed to system call write(). So to avoid this error,
- ** zero the first 4 bytes of temp space here. */
- if( pBt->pTmpSpace ) memset(pBt->pTmpSpace, 0, 4);
+ ** zero the first 4 bytes of temp space here.
+ **
+ ** Also: Provide four bytes of initialized space before the
+ ** beginning of pTmpSpace as an area available to prepend the
+ ** left-child pointer to the beginning of a cell.
+ */
+ if( pBt->pTmpSpace ){
+ memset(pBt->pTmpSpace, 0, 8);
+ pBt->pTmpSpace += 4;
+ }
}
}
@@ -2132,8 +2141,11 @@ static void allocateTempSpace(BtShared *pBt){
** Free the pBt->pTmpSpace allocation
*/
static void freeTempSpace(BtShared *pBt){
- sqlite3PageFree( pBt->pTmpSpace);
- pBt->pTmpSpace = 0;
+ if( pBt->pTmpSpace ){
+ pBt->pTmpSpace -= 4;
+ sqlite3PageFree(pBt->pTmpSpace);
+ pBt->pTmpSpace = 0;
+ }
}
/*
diff --git a/src/btreeInt.h b/src/btreeInt.h
index 9f648fceb..2368e6c88 100644
--- a/src/btreeInt.h
+++ b/src/btreeInt.h
@@ -436,7 +436,7 @@ struct BtShared {
BtLock *pLock; /* List of locks held on this shared-btree struct */
Btree *pWriter; /* Btree with currently open write transaction */
#endif
- u8 *pTmpSpace; /* BtShared.pageSize bytes of space for tmp use */
+ u8 *pTmpSpace; /* Temp space sufficient to hold a single cell */
};
/*
diff --git a/src/vdbemem.c b/src/vdbemem.c
index 37d92aca1..db527327e 100644
--- a/src/vdbemem.c
+++ b/src/vdbemem.c
@@ -143,7 +143,7 @@ SQLITE_NOINLINE int sqlite3VdbeMemGrow(Mem *pMem, int n, int bPreserve){
}
}
- if( pMem->z && bPreserve && pMem->z!=pMem->zMalloc ){
+ if( bPreserve && pMem->z && pMem->z!=pMem->zMalloc ){
memcpy(pMem->zMalloc, pMem->z, pMem->n);
}
if( (pMem->flags&MEM_Dyn)!=0 ){
diff --git a/src/vtab.c b/src/vtab.c
index c7a8a5a33..faee4ae47 100644
--- a/src/vtab.c
+++ b/src/vtab.c
@@ -519,6 +519,7 @@ static int vtabCallConstructor(
}else if( ALWAYS(pVTable->pVtab) ){
/* Justification of ALWAYS(): A correct vtab constructor must allocate
** the sqlite3_vtab object if successful. */
+ memset(pVTable->pVtab, 0, sizeof(pVTable->pVtab[0]));
pVTable->pVtab->pModule = pMod->pModule;
pVTable->nRef = 1;
if( sCtx.pTab ){
diff --git a/test/lock5.test b/test/lock5.test
index f0d495508..99214afb1 100644
--- a/test/lock5.test
+++ b/test/lock5.test
@@ -154,6 +154,7 @@ do_test lock5-flock.8 {
do_test lock5-none.1 {
sqlite3 db test.db -vfs unix-none
sqlite3 db2 test.db -vfs unix-none
+ execsql { PRAGMA mmap_size = 0 } db2
execsql {
BEGIN;
INSERT INTO t1 VALUES(3, 4);
@@ -162,8 +163,8 @@ do_test lock5-none.1 {
do_test lock5-none.2 {
execsql { SELECT * FROM t1 }
} {1 2 3 4}
-do_test lock5-flock.3 {
- execsql { SELECT * FROM t1 } db2
+do_test lock5-none.3 {
+ execsql { SELECT * FROM t1; } db2
} {1 2}
do_test lock5-none.4 {
execsql {
@@ -183,7 +184,7 @@ ifcapable memorymanage {
} {1 2 3 4}
}
-do_test lock5-flock.X {
+do_test lock5-none.X {
db close
db2 close
} {}
diff --git a/test/releasetest.tcl b/test/releasetest.tcl
index 589319d68..d2a1bd2bb 100644
--- a/test/releasetest.tcl
+++ b/test/releasetest.tcl
@@ -196,7 +196,8 @@ array set ::Platforms {
"Device-Two" test
"Ftrapv" test
"No-lookaside" test
- "Default" "threadtest test"
+ "Devkit" test
+ "Default" "threadtest fulltest"
"Device-One" fulltest
}
Linux-i686 {