From 3c19bb60d108a48a6b9ddf7f84bf085edc7e8e17 Mon Sep 17 00:00:00 2001 From: drh Date: Fri, 1 Jan 2016 16:26:22 +0000 Subject: [PATCH 01/13] Avoid misaligned memory allocations on Sparc in sqlite3VdbeMakeReady(). FossilOrigin-Name: a304e34675404aee860fcc97fa4ffcc57c014812 --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/vdbeaux.c | 5 ++--- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/manifest b/manifest index b08341888c..7e83b58a5a 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\san\sassert()\sthat\smight\sbe\sfalse\sfor\sa\scorrupt\sdatabase. -D 2016-01-01T03:37:44.301 +C Avoid\smisaligned\smemory\sallocations\son\sSparc\sin\ssqlite3VdbeMakeReady(). +D 2016-01-01T16:26:22.999 F Makefile.in 28bcd6149e050dff35d4dcfd97e890cd387a499d F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 5fff077fcc46de7714ed6eebb6159a4c00eab751 @@ -402,7 +402,7 @@ F src/vdbe.c 39d7628bb8eed10a5378adcf97cca6dce7829a8f F src/vdbe.h efb7a8c1459e31f3ea4377824c6a7e4cb5068637 F src/vdbeInt.h 75c2e82ee3357e9210c06474f8d9bdf12c81105d F src/vdbeapi.c 020681b943e77766b32ae1cddf86d7831b7374ca -F src/vdbeaux.c ca523180c128dc6c64894efc61eb14374117c864 +F src/vdbeaux.c 2a25e57e140a3cdef14dc11912c174cf6eb9d5a6 F src/vdbeblob.c fdc4a81605ae7a35ae94a55bd768b66d6be16f15 F src/vdbemem.c fdd1578e47bea61390d472de53c565781d81e045 F src/vdbesort.c a7ec02da4494c59dfd071126dd3726be5a11459d @@ -1406,7 +1406,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 6e30f8c6c3af9b0df39783888a1479f88271f989 -R 6e164f424e8aa8f067cc3a49970e615a +P 68360cd2211b7ab25dd4ca55a2e82e31f51f2976 +R be44c4e5edec4a82a16bfbdbf7214b99 U drh -Z 284865b0f74f185e26863aa2df0b68aa +Z f1917e9fad1e2726446c5b64d14d6919 diff --git a/manifest.uuid b/manifest.uuid index 7d85a2b67d..940d1e52e4 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -68360cd2211b7ab25dd4ca55a2e82e31f51f2976 \ No newline at end of file +a304e34675404aee860fcc97fa4ffcc57c014812 \ No newline at end of file diff --git a/src/vdbeaux.c b/src/vdbeaux.c index 10353e839f..9c35fc12d9 100644 --- a/src/vdbeaux.c +++ b/src/vdbeaux.c @@ -1849,9 +1849,8 @@ void sqlite3VdbeMakeReady( /* Allocate space for memory registers, SQL variables, VDBE cursors and ** an array to marshal SQL function arguments in. */ - zCsr = (u8*)&p->aOp[p->nOp]; /* Memory avaliable for allocation */ - assert( pParse->nOpAlloc*sizeof(Op) <= 0x7fffff00 ); - nFree = (pParse->nOpAlloc - p->nOp)*sizeof(p->aOp[0]); /* Available space */ + zCsr = ((u8*)p->aOp) + ROUND8(sizeof(Op)*p->nOp); /* Available space */ + nFree = sqlite3_msize(p->aOp) - ROUND8(sizeof(Op)*p->nOp); /* Size of zCsr */ resolveP2Values(p, &nArg); p->usesStmtJournal = (u8)(pParse->isMultiWrite && pParse->mayAbort); From bd57308eef5dfaf99b0d242caaac0f69067b4e61 Mon Sep 17 00:00:00 2001 From: drh Date: Fri, 1 Jan 2016 16:42:09 +0000 Subject: [PATCH 02/13] Remember the size of the Vdbe.aOp[] array in bytes, to avoid unnecessary calls to sqlite3_msize(). FossilOrigin-Name: 3e852804c85a5c9f4c4ffafd55d03af6d19fe5cc --- manifest | 14 +++++++------- manifest.uuid | 2 +- src/sqliteInt.h | 1 + src/vdbeaux.c | 8 +++++--- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/manifest b/manifest index 7e83b58a5a..677f2d0a83 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Avoid\smisaligned\smemory\sallocations\son\sSparc\sin\ssqlite3VdbeMakeReady(). -D 2016-01-01T16:26:22.999 +C Remember\sthe\ssize\sof\sthe\sVdbe.aOp[]\sarray\sin\sbytes,\sto\savoid\sunnecessary\ncalls\sto\ssqlite3_msize(). +D 2016-01-01T16:42:09.017 F Makefile.in 28bcd6149e050dff35d4dcfd97e890cd387a499d F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 5fff077fcc46de7714ed6eebb6159a4c00eab751 @@ -338,7 +338,7 @@ F src/shell.c 8d152e833c3b79825978deb83175234749c5cdf3 F src/sqlite.h.in 7d87d71b9a4689c51fa092f48f16590ff71558e3 F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad F src/sqlite3ext.h dfbe62ffd95b99afe2140d8c35b180d11924072d -F src/sqliteInt.h 92f83ab4612141f95cdd663ea55fa4528f3f8c2a +F src/sqliteInt.h 30f7e8957ed7d244be027be72ded385154c635df F src/sqliteLimit.h 216557999cb45f2e3578ed53ebefe228d779cb46 F src/status.c 70912d7be68e9e2dbc4010c93d344af61d4c59ba F src/table.c 51b46b2a62d1b3a959633d593b89bab5e2c9155e @@ -402,7 +402,7 @@ F src/vdbe.c 39d7628bb8eed10a5378adcf97cca6dce7829a8f F src/vdbe.h efb7a8c1459e31f3ea4377824c6a7e4cb5068637 F src/vdbeInt.h 75c2e82ee3357e9210c06474f8d9bdf12c81105d F src/vdbeapi.c 020681b943e77766b32ae1cddf86d7831b7374ca -F src/vdbeaux.c 2a25e57e140a3cdef14dc11912c174cf6eb9d5a6 +F src/vdbeaux.c 66b546a1da82dfa6e67985ae0442ba5fd9efe0ff F src/vdbeblob.c fdc4a81605ae7a35ae94a55bd768b66d6be16f15 F src/vdbemem.c fdd1578e47bea61390d472de53c565781d81e045 F src/vdbesort.c a7ec02da4494c59dfd071126dd3726be5a11459d @@ -1406,7 +1406,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 68360cd2211b7ab25dd4ca55a2e82e31f51f2976 -R be44c4e5edec4a82a16bfbdbf7214b99 +P a304e34675404aee860fcc97fa4ffcc57c014812 +R 4471a4984cac341d5421a7094690c1b8 U drh -Z f1917e9fad1e2726446c5b64d14d6919 +Z 73de58c32dddcab1338ba5f059ee0a34 diff --git a/manifest.uuid b/manifest.uuid index 940d1e52e4..85183cd86a 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -a304e34675404aee860fcc97fa4ffcc57c014812 \ No newline at end of file +3e852804c85a5c9f4c4ffafd55d03af6d19fe5cc \ No newline at end of file diff --git a/src/sqliteInt.h b/src/sqliteInt.h index e1fe6dae79..53f0709645 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -2732,6 +2732,7 @@ struct Parse { int nSet; /* Number of sets used so far */ int nOnce; /* Number of OP_Once instructions so far */ int nOpAlloc; /* Number of slots allocated for Vdbe.aOp[] */ + int szOpAlloc; /* Bytes of memory space allocated for Vdbe.aOp[] */ int iFixedOp; /* Never back out opcodes iFixedOp-1 or earlier */ int ckBase; /* Base register of data during check constraints */ int iSelfTab; /* Table of an index whose exprs are being coded */ diff --git a/src/vdbeaux.c b/src/vdbeaux.c index 9c35fc12d9..7d547e5830 100644 --- a/src/vdbeaux.c +++ b/src/vdbeaux.c @@ -35,6 +35,7 @@ Vdbe *sqlite3VdbeCreate(Parse *pParse){ assert( pParse->aLabel==0 ); assert( pParse->nLabel==0 ); assert( pParse->nOpAlloc==0 ); + assert( pParse->szOpAlloc==0 ); return p; } @@ -124,7 +125,8 @@ static int growOpArray(Vdbe *v, int nOp){ assert( nNew>=(p->nOpAlloc+nOp) ); pNew = sqlite3DbRealloc(p->db, v->aOp, nNew*sizeof(Op)); if( pNew ){ - p->nOpAlloc = sqlite3DbMallocSize(p->db, pNew)/sizeof(Op); + p->szOpAlloc = sqlite3DbMallocSize(p->db, pNew); + p->nOpAlloc = p->szOpAlloc/sizeof(Op); v->aOp = pNew; } return (pNew ? SQLITE_OK : SQLITE_NOMEM); @@ -1849,8 +1851,8 @@ void sqlite3VdbeMakeReady( /* Allocate space for memory registers, SQL variables, VDBE cursors and ** an array to marshal SQL function arguments in. */ - zCsr = ((u8*)p->aOp) + ROUND8(sizeof(Op)*p->nOp); /* Available space */ - nFree = sqlite3_msize(p->aOp) - ROUND8(sizeof(Op)*p->nOp); /* Size of zCsr */ + zCsr = ((u8*)p->aOp) + ROUND8(sizeof(Op)*p->nOp); /* Available space */ + nFree = pParse->szOpAlloc - ROUND8(sizeof(Op)*p->nOp); /* Size of zCsr */ resolveP2Values(p, &nArg); p->usesStmtJournal = (u8)(pParse->isMultiWrite && pParse->mayAbort); From 9abe841e9e7cdd4736001ab45f2d7b879ba716be Mon Sep 17 00:00:00 2001 From: drh Date: Sat, 2 Jan 2016 05:00:31 +0000 Subject: [PATCH 03/13] Fix a (harmless) typo in an #ifdef for SQLITE_ENABLE_CURSOR_HINTS FossilOrigin-Name: 2047d2deabf2021ea05d620c3dd4919448027b11 --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/vdbe.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/manifest b/manifest index 677f2d0a83..517a481aea 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Remember\sthe\ssize\sof\sthe\sVdbe.aOp[]\sarray\sin\sbytes,\sto\savoid\sunnecessary\ncalls\sto\ssqlite3_msize(). -D 2016-01-01T16:42:09.017 +C Fix\sa\s(harmless)\stypo\sin\san\s#ifdef\sfor\sSQLITE_ENABLE_CURSOR_HINTS +D 2016-01-02T05:00:31.568 F Makefile.in 28bcd6149e050dff35d4dcfd97e890cd387a499d F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 5fff077fcc46de7714ed6eebb6159a4c00eab751 @@ -398,7 +398,7 @@ F src/update.c 17332f9fe818cbc0444c36a811800af8498af4c3 F src/utf.c 32d7f82aa921322f3e1c956f4b58f019ebd2c6b3 F src/util.c e802e8e311a0d6c48cd1b3e89db164f6f0248d70 F src/vacuum.c 2ddd5cad2a7b9cef7f9e431b8c7771634c6b1701 -F src/vdbe.c 39d7628bb8eed10a5378adcf97cca6dce7829a8f +F src/vdbe.c 638c20bae996d8037a114294016768b6bc8ebc14 F src/vdbe.h efb7a8c1459e31f3ea4377824c6a7e4cb5068637 F src/vdbeInt.h 75c2e82ee3357e9210c06474f8d9bdf12c81105d F src/vdbeapi.c 020681b943e77766b32ae1cddf86d7831b7374ca @@ -1406,7 +1406,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P a304e34675404aee860fcc97fa4ffcc57c014812 -R 4471a4984cac341d5421a7094690c1b8 +P 3e852804c85a5c9f4c4ffafd55d03af6d19fe5cc +R 5906d6b78129d8858a23ea4c57fad965 U drh -Z 73de58c32dddcab1338ba5f059ee0a34 +Z 4843af3fcc8c5413e769bb1983160a44 diff --git a/manifest.uuid b/manifest.uuid index 85183cd86a..2fbf3ac886 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -3e852804c85a5c9f4c4ffafd55d03af6d19fe5cc \ No newline at end of file +2047d2deabf2021ea05d620c3dd4919448027b11 \ No newline at end of file diff --git a/src/vdbe.c b/src/vdbe.c index 5021720c54..c8fc6ff45b 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -3402,7 +3402,7 @@ open_cursor_set_hints: assert( OPFLAG_BULKCSR==BTREE_BULKLOAD ); assert( OPFLAG_SEEKEQ==BTREE_SEEK_EQ ); testcase( pOp->p5 & OPFLAG_BULKCSR ); -#ifdef SQLITE_ENABLE_CURSOR_HINT +#ifdef SQLITE_ENABLE_CURSOR_HINTS testcase( pOp->p2 & OPFLAG_SEEKEQ ); #endif sqlite3BtreeCursorHintFlags(pCur->uc.pCursor, From 573d88e8ed091fd3ace6f6f87458d06dc45e9e6f Mon Sep 17 00:00:00 2001 From: drh Date: Sun, 3 Jan 2016 11:17:04 +0000 Subject: [PATCH 04/13] Add the number of cores used and the name of the host computer to the summary at the end of releasetest.tcl. FossilOrigin-Name: cd3ae0f14c6b28b328b208431d0effcb7b062ec6 --- manifest | 12 ++++++------ manifest.uuid | 2 +- test/releasetest.tcl | 6 ++++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/manifest b/manifest index 517a481aea..394319edbf 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\s(harmless)\stypo\sin\san\s#ifdef\sfor\sSQLITE_ENABLE_CURSOR_HINTS -D 2016-01-02T05:00:31.568 +C Add\sthe\snumber\sof\scores\sused\sand\sthe\sname\sof\sthe\shost\scomputer\sto\sthe\nsummary\sat\sthe\send\sof\sreleasetest.tcl. +D 2016-01-03T11:17:04.115 F Makefile.in 28bcd6149e050dff35d4dcfd97e890cd387a499d F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 5fff077fcc46de7714ed6eebb6159a4c00eab751 @@ -947,7 +947,7 @@ F test/rbu.test 168573d353cd0fd10196b87b0caa322c144ef736 F test/rdonly.test 64e2696c322e3538df0b1ed624e21f9a23ed9ff8 F test/regexp1.test 497ea812f264d12b6198d6e50a76be4a1973a9d8 F test/reindex.test 44edd3966b474468b823d481eafef0c305022254 -F test/releasetest.tcl 622f2381b217facdf429584a5c292cc1fc47e7c0 +F test/releasetest.tcl f84ff16fef79ee5d328eee7c48da084a775d101c F test/resolver01.test f4022acafda7f4d40eca94dbf16bc5fc4ac30ceb F test/rollback.test 458fe73eb3ffdfdf9f6ba3e9b7350a6220414dea F test/rollback2.test fc14cf6d1a2b250d2735ef16124b971bce152f14 @@ -1406,7 +1406,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 3e852804c85a5c9f4c4ffafd55d03af6d19fe5cc -R 5906d6b78129d8858a23ea4c57fad965 +P 2047d2deabf2021ea05d620c3dd4919448027b11 +R ea21a9ede315d15a7b1dfcf0bcd428e9 U drh -Z 4843af3fcc8c5413e769bb1983160a44 +Z a5cb2210a915d9603f738ab23bc99890 diff --git a/manifest.uuid b/manifest.uuid index 2fbf3ac886..72d55b1f12 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -2047d2deabf2021ea05d620c3dd4919448027b11 \ No newline at end of file +cd3ae0f14c6b28b328b208431d0effcb7b062ec6 \ No newline at end of file diff --git a/test/releasetest.tcl b/test/releasetest.tcl index 7f53fd1523..8cf7a76fb8 100644 --- a/test/releasetest.tcl +++ b/test/releasetest.tcl @@ -830,8 +830,8 @@ proc process_options {argv} { } default { - PUTSERR stderr "" - PUTSERR stderr [string trim $::USAGE_MESSAGE] + PUTSERR "" + PUTSERR [string trim $::USAGE_MESSAGE] exit -1 } } @@ -945,6 +945,8 @@ proc main {argv} { set min [expr {($elapsetime/60)%60}] set sec [expr {$elapsetime%60}] set etime [format (%02d:%02d:%02d) $hr $min $sec] + if {$::JOBS>1} {append etime " $::JOBS cores"} + if {[catch {exec hostname} HNAME]==0} {append etime " on $HNAME"} PUTS [string repeat * 79] incr ::NERRCASE $::NERR PUTS "$::NERRCASE failures out of $::NTESTCASE tests in $etime" From 41d0ba72aeb274578ea3f06437d363a0ae5377ce Mon Sep 17 00:00:00 2001 From: drh Date: Sun, 3 Jan 2016 11:27:47 +0000 Subject: [PATCH 05/13] Fix a premature reference to utf8_printf in shell.c. FossilOrigin-Name: 76f5efa68728d899a63a74f2528dfd0c497aa5f0 --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/shell.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/manifest b/manifest index 394319edbf..218d499932 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sthe\snumber\sof\scores\sused\sand\sthe\sname\sof\sthe\shost\scomputer\sto\sthe\nsummary\sat\sthe\send\sof\sreleasetest.tcl. -D 2016-01-03T11:17:04.115 +C Fix\sa\spremature\sreference\sto\sutf8_printf\sin\sshell.c. +D 2016-01-03T11:27:47.410 F Makefile.in 28bcd6149e050dff35d4dcfd97e890cd387a499d F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 5fff077fcc46de7714ed6eebb6159a4c00eab751 @@ -334,7 +334,7 @@ F src/random.c ba2679f80ec82c4190062d756f22d0c358180696 F src/resolve.c a83b41104e6ff69855d03cd0aaa09e93927ec39f F src/rowset.c eccf6af6d620aaa4579bd3b72c1b6395d9e9fa1e F src/select.c f8fded11fc443a9f5a73cc5db069d06b34460e2f -F src/shell.c 8d152e833c3b79825978deb83175234749c5cdf3 +F src/shell.c ed71dc7679e6f087a3f1ea3f9dae4b0fae7209c3 F src/sqlite.h.in 7d87d71b9a4689c51fa092f48f16590ff71558e3 F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad F src/sqlite3ext.h dfbe62ffd95b99afe2140d8c35b180d11924072d @@ -1406,7 +1406,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 2047d2deabf2021ea05d620c3dd4919448027b11 -R ea21a9ede315d15a7b1dfcf0bcd428e9 +P cd3ae0f14c6b28b328b208431d0effcb7b062ec6 +R 17c9e71fcd959bf7c676bff4a8176b10 U drh -Z a5cb2210a915d9603f738ab23bc99890 +Z cf0da92d1077e771f4727b72b37c0046 diff --git a/manifest.uuid b/manifest.uuid index 72d55b1f12..1130aa9c0e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -cd3ae0f14c6b28b328b208431d0effcb7b062ec6 \ No newline at end of file +76f5efa68728d899a63a74f2528dfd0c497aa5f0 \ No newline at end of file diff --git a/src/shell.c b/src/shell.c index ecb591a32a..b7a7abcd33 100644 --- a/src/shell.c +++ b/src/shell.c @@ -382,7 +382,7 @@ static void SQLITE_CDECL iotracePrintf(const char *zFormat, ...){ va_start(ap, zFormat); z = sqlite3_vmprintf(zFormat, ap); va_end(ap); - utf8_printf(iotrace, "%s", z); + fprintf(iotrace, "%s", z); sqlite3_free(z); } #endif From dc0b1f1c29e949a6145ed0e548846ba42b64d729 Mon Sep 17 00:00:00 2001 From: drh Date: Sun, 3 Jan 2016 18:07:57 +0000 Subject: [PATCH 06/13] Bug fix: the conflict resolution behavior for the implied NOT NULL constraint on the PRIMARY KEY of a WITHOUT ROWID table should be ABORT. FossilOrigin-Name: e30062e9f6cae980150dda7df440b36dfdcb7bbe --- manifest | 16 ++++++++-------- manifest.uuid | 2 +- src/build.c | 2 +- test/conflict2.test | 8 ++++---- test/without_rowid5.test | 6 +++++- 5 files changed, 19 insertions(+), 15 deletions(-) diff --git a/manifest b/manifest index 218d499932..584914720e 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\spremature\sreference\sto\sutf8_printf\sin\sshell.c. -D 2016-01-03T11:27:47.410 +C Bug\sfix:\sthe\sconflict\sresolution\sbehavior\sfor\sthe\simplied\sNOT\sNULL\sconstraint\non\sthe\sPRIMARY\sKEY\sof\sa\sWITHOUT\sROWID\stable\sshould\sbe\sABORT. +D 2016-01-03T18:07:57.631 F Makefile.in 28bcd6149e050dff35d4dcfd97e890cd387a499d F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 5fff077fcc46de7714ed6eebb6159a4c00eab751 @@ -279,7 +279,7 @@ F src/btmutex.c 45a968cc85afed9b5e6cf55bf1f42f8d18107f79 F src/btree.c 4d3452b2a3daf875490ac4f0a278da7f85fabe12 F src/btree.h 2d76dee44704c47eed323356a758662724b674a0 F src/btreeInt.h b5f2651b41808f038dee9282c5dc0232ce6532d3 -F src/build.c 1c9fb552148ee8f9234435a38833f8fca2081a71 +F src/build.c d8006e9030c61b9495d0b2f724edd3fcdae16930 F src/callback.c 7b44ce59674338ad48b0e84e7b72f935ea4f68b0 F src/complete.c addcd8160b081131005d5bc2d34adf20c1c5c92f F src/ctime.c 60e135af364d777a9ab41c97e5e89cd224da6198 @@ -524,7 +524,7 @@ F test/collateA.test b8218ab90d1fa5c59dcf156efabb1b2599c580d6 F test/colmeta.test 2c765ea61ee37bc43bbe6d6047f89004e6508eb1 F test/colname.test 08948a4809d22817e0e5de89c7c0a8bd90cb551b F test/conflict.test 841bcf7cabbfca39c577eb8411ea8601843b46a8 -F test/conflict2.test 0d3af4fb534fa1bd020c79960bb56e4d52655f09 +F test/conflict2.test 0f0e810aef6739650d7f442164975e932cf18afc F test/conflict3.test dec0634c0f31dec9a4b01c63063e939f0cd21b6b F test/contrib01.test 2a1cbc0f2f48955d7d073f725765da6fbceda6b4 F test/corrupt.test 141c39ea650c1365e85a49e402fa05cb9617fb97 @@ -1340,7 +1340,7 @@ F test/without_rowid1.test 1a7b9bd51b899928d327052df9741d2fe8dbe701 F test/without_rowid2.test af260339f79d13cb220288b67cd287fbcf81ad99 F test/without_rowid3.test aad4f9d383e199349b6c7e508a778f7dff5dff79 F test/without_rowid4.test 4e08bcbaee0399f35d58b5581881e7a6243d458a -F test/without_rowid5.test 61256715b686359df48ca1742db50cc7e3e7b862 +F test/without_rowid5.test 89b1c587bd92a0590e440da33e7666bf4891572a F test/without_rowid6.test 1f99644e6508447fb050f73697350c7ceca3392e F test/wordcount.c 2a0a6c0d0e8e8bbbac1f06d72a6791828c37c0cf F test/zeroblob.test 3857870fe681b8185654414a9bccfde80b62a0fa @@ -1406,7 +1406,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P cd3ae0f14c6b28b328b208431d0effcb7b062ec6 -R 17c9e71fcd959bf7c676bff4a8176b10 +P 76f5efa68728d899a63a74f2528dfd0c497aa5f0 +R 478df71a9631f4b73fcefbae5de2f355 U drh -Z cf0da92d1077e771f4727b72b37c0046 +Z 2ce3cb02ff6782c368c437352328d0d1 diff --git a/manifest.uuid b/manifest.uuid index 1130aa9c0e..c0ad5b411d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -76f5efa68728d899a63a74f2528dfd0c497aa5f0 \ No newline at end of file +e30062e9f6cae980150dda7df440b36dfdcb7bbe \ No newline at end of file diff --git a/src/build.c b/src/build.c index ffefead9db..63e3004657 100644 --- a/src/build.c +++ b/src/build.c @@ -1774,7 +1774,7 @@ static void convertToWithoutRowidTable(Parse *pParse, Table *pTab){ ** do not enforce this for imposter tables.) */ if( !db->init.imposterTable ){ for(i=0; iaCol[pPk->aiColumn[i]].notNull = 1; + pTab->aCol[pPk->aiColumn[i]].notNull = OE_Abort; } pPk->uniqNotNull = 1; } diff --git a/test/conflict2.test b/test/conflict2.test index 8419f1a3ff..e8880635f1 100644 --- a/test/conflict2.test +++ b/test/conflict2.test @@ -289,11 +289,11 @@ do_test conflict2-6.0 { # foreach {i conf1 cmd t0 t1 t2 t3 t4} { 1 {} UPDATE 1 {6 7 8 9} 1 0 1 - 2 REPLACE UPDATE 0 {7 6 9} 1 0 0 - 3 IGNORE UPDATE 0 {6 7 3 9} 1 0 0 - 4 FAIL UPDATE 1 {6 7 3 4} 1 0 0 + 2 REPLACE UPDATE 0 {7 6 9} 1 1 0 + 3 IGNORE UPDATE 0 {6 7 3 9} 1 1 0 + 4 FAIL UPDATE 1 {6 7 3 4} 1 1 0 5 ABORT UPDATE 1 {1 2 3 4} 1 0 1 - 6 ROLLBACK UPDATE 1 {1 2 3 4} 0 0 0 + 6 ROLLBACK UPDATE 1 {1 2 3 4} 0 1 0 7 REPLACE {UPDATE OR IGNORE} 0 {6 7 3 9} 1 0 0 8 IGNORE {UPDATE OR REPLACE} 0 {7 6 9} 1 0 1 9 FAIL {UPDATE OR IGNORE} 0 {6 7 3 9} 1 0 0 diff --git a/test/without_rowid5.test b/test/without_rowid5.test index d163d9c1bc..31a440ad87 100644 --- a/test/without_rowid5.test +++ b/test/without_rowid5.test @@ -132,9 +132,13 @@ do_execsql_test without_rowid5-5.1 { INSERT INTO ipk VALUES('rival','bonus'); -- ok to insert non-integer key SELECT * FROM ipk; } {rival bonus} -do_catchsql_test without_rowid5-5.2 { +do_catchsql_test without_rowid5-5.2a { + BEGIN; INSERT INTO ipk VALUES(NULL,'sample'); -- no automatic generation of keys } {1 {NOT NULL constraint failed: ipk.key}} +do_execsql_test without_rowid5-5.2b { + ROLLBACK; +} {} # EVIDENCE-OF: R-33142-02092 AUTOINCREMENT does not work on WITHOUT # ROWID tables. From 7f10579a82a158b71ca3fd05c241c5ebb9cb3fee Mon Sep 17 00:00:00 2001 From: drh Date: Mon, 4 Jan 2016 01:08:50 +0000 Subject: [PATCH 07/13] Add releasetest.tcl cases for SQLITE_LIKE_DOESNT_MATCH_BLOB and for SQLITE_ENABLE_CURSOR_HINTS. FossilOrigin-Name: f300c35efa5f7383b2a74b1c9466c243c17815e4 --- manifest | 14 +++++++------- manifest.uuid | 2 +- test/cursorhint.test | 12 ++++++------ test/releasetest.tcl | 2 ++ 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/manifest b/manifest index 584914720e..00ec784d9b 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Bug\sfix:\sthe\sconflict\sresolution\sbehavior\sfor\sthe\simplied\sNOT\sNULL\sconstraint\non\sthe\sPRIMARY\sKEY\sof\sa\sWITHOUT\sROWID\stable\sshould\sbe\sABORT. -D 2016-01-03T18:07:57.631 +C Add\sreleasetest.tcl\scases\sfor\sSQLITE_LIKE_DOESNT_MATCH_BLOB\sand\nfor\sSQLITE_ENABLE_CURSOR_HINTS. +D 2016-01-04T01:08:50.342 F Makefile.in 28bcd6149e050dff35d4dcfd97e890cd387a499d F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 5fff077fcc46de7714ed6eebb6159a4c00eab751 @@ -562,7 +562,7 @@ F test/crashtest1.c 09c1c7d728ccf4feb9e481671e29dda5669bbcc2 F test/createtab.test b5de160630b209c4b8925bdcbbaf48cc90b67fe8 F test/cse.test 277350a26264495e86b1785f34d2d0c8600e021c F test/ctime.test 7bd009071e242aac4f18521581536b652b789a47 -F test/cursorhint.test 432811b62bd5ffb812729f49bba3b9ad687550bb +F test/cursorhint.test 7bc346788390475e77a345da2b92270d04d35856 F test/date.test 984ac1e3e5e031386866f034006148d3972b4a65 F test/dbstatus.test 8de104bb5606f19537d23cd553b41349b5ab1204 F test/dbstatus2.test 10418e62b3db5dca070f0c3eef3ea13946f339c2 @@ -947,7 +947,7 @@ F test/rbu.test 168573d353cd0fd10196b87b0caa322c144ef736 F test/rdonly.test 64e2696c322e3538df0b1ed624e21f9a23ed9ff8 F test/regexp1.test 497ea812f264d12b6198d6e50a76be4a1973a9d8 F test/reindex.test 44edd3966b474468b823d481eafef0c305022254 -F test/releasetest.tcl f84ff16fef79ee5d328eee7c48da084a775d101c +F test/releasetest.tcl 975449bf742b8bb9025208292208af816a1fcb58 F test/resolver01.test f4022acafda7f4d40eca94dbf16bc5fc4ac30ceb F test/rollback.test 458fe73eb3ffdfdf9f6ba3e9b7350a6220414dea F test/rollback2.test fc14cf6d1a2b250d2735ef16124b971bce152f14 @@ -1406,7 +1406,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 76f5efa68728d899a63a74f2528dfd0c497aa5f0 -R 478df71a9631f4b73fcefbae5de2f355 +P e30062e9f6cae980150dda7df440b36dfdcb7bbe +R 60c0d617eaaaa3eb60de4d61ace77f3f U drh -Z 2ce3cb02ff6782c368c437352328d0d1 +Z bf759b86247c24cfa4d33f391ba06db6 diff --git a/manifest.uuid b/manifest.uuid index c0ad5b411d..6624b9ab92 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -e30062e9f6cae980150dda7df440b36dfdcb7bbe \ No newline at end of file +f300c35efa5f7383b2a74b1c9466c243c17815e4 \ No newline at end of file diff --git a/test/cursorhint.test b/test/cursorhint.test index 69bc248cd7..ae86120fa8 100644 --- a/test/cursorhint.test +++ b/test/cursorhint.test @@ -46,10 +46,10 @@ proc p4_of_opcode {db opcode sql} { # Run EXPLAIN on $sql. Return a list of P5 values for all $opcode # opcodes that contain regexp $comment in their comment # -proc p5_of_opcode {db opcode comment sql} { +proc p5_of_opcode {db opcode sql} { set res {} $db eval "EXPLAIN $sql" x { - if {$x(opcode)==$opcode && [regexp $comment $x(comment)]} { + if {$x(opcode)==$opcode} { lappend res $x(p5) } } @@ -66,7 +66,7 @@ do_test 1.1 { } } {{EQ(r[1],c0)}} do_test 1.2 { - p5_of_opcode db OpenRead . { + p5_of_opcode db OpenRead { SELECT * FROM t1 CROSS JOIN t2 WHERE a=x } } {00 00} @@ -79,7 +79,7 @@ do_test 2.1 { } } {{EQ(c0,r[1])}} do_test 2.2 { - p5_of_opcode db OpenRead . { + p5_of_opcode db OpenRead { SELECT * FROM t2 CROSS JOIN t1 WHERE a=x } } {00 00} @@ -114,7 +114,7 @@ do_test 4.1desc { } } {GT(c0,11)} do_test 4.2 { - p5_of_opcode db OpenRead . { + p5_of_opcode db OpenRead { SELECT * FROM t1 WHERE b>11; } } {02 00} @@ -129,7 +129,7 @@ do_test 4.3desc { } } {} do_test 4.4 { - p5_of_opcode db OpenRead . { + p5_of_opcode db OpenRead { SELECT c FROM t1 WHERE b<11; } } {00} diff --git a/test/releasetest.tcl b/test/releasetest.tcl index 8cf7a76fb8..bb902eec3e 100644 --- a/test/releasetest.tcl +++ b/test/releasetest.tcl @@ -86,6 +86,8 @@ array set ::Configs [strip_comments { -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 -DSQLITE_ENABLE_STMT_SCANSTATUS + -DSQLITE_LIKE_DOESNT_MATCH_BLOBS + -DSQLITE_ENABLE_CURSOR_HINTS --enable-json1 } "Check-Symbols" { From 9fbc885afcbf09b90322bab8f0daf613df2fa26b Mon Sep 17 00:00:00 2001 From: drh Date: Mon, 4 Jan 2016 03:48:46 +0000 Subject: [PATCH 08/13] Fix a harmless compiler warning. FossilOrigin-Name: 4b404a99aa9bfa6cfe8998f5dc1f84f8be20b840 --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/vdbe.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/manifest b/manifest index 00ec784d9b..39fe0a1326 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sreleasetest.tcl\scases\sfor\sSQLITE_LIKE_DOESNT_MATCH_BLOB\sand\nfor\sSQLITE_ENABLE_CURSOR_HINTS. -D 2016-01-04T01:08:50.342 +C Fix\sa\sharmless\scompiler\swarning. +D 2016-01-04T03:48:46.399 F Makefile.in 28bcd6149e050dff35d4dcfd97e890cd387a499d F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 5fff077fcc46de7714ed6eebb6159a4c00eab751 @@ -398,7 +398,7 @@ F src/update.c 17332f9fe818cbc0444c36a811800af8498af4c3 F src/utf.c 32d7f82aa921322f3e1c956f4b58f019ebd2c6b3 F src/util.c e802e8e311a0d6c48cd1b3e89db164f6f0248d70 F src/vacuum.c 2ddd5cad2a7b9cef7f9e431b8c7771634c6b1701 -F src/vdbe.c 638c20bae996d8037a114294016768b6bc8ebc14 +F src/vdbe.c 6ac8e5d808d48afc369316e147c191102f0584c1 F src/vdbe.h efb7a8c1459e31f3ea4377824c6a7e4cb5068637 F src/vdbeInt.h 75c2e82ee3357e9210c06474f8d9bdf12c81105d F src/vdbeapi.c 020681b943e77766b32ae1cddf86d7831b7374ca @@ -1406,7 +1406,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P e30062e9f6cae980150dda7df440b36dfdcb7bbe -R 60c0d617eaaaa3eb60de4d61ace77f3f +P f300c35efa5f7383b2a74b1c9466c243c17815e4 +R a3643a709add89c526ff9d85846c177f U drh -Z bf759b86247c24cfa4d33f391ba06db6 +Z 723a886ae851aa4686263a1002cc64d8 diff --git a/manifest.uuid b/manifest.uuid index 6624b9ab92..44b7d4d4a2 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -f300c35efa5f7383b2a74b1c9466c243c17815e4 \ No newline at end of file +4b404a99aa9bfa6cfe8998f5dc1f84f8be20b840 \ No newline at end of file diff --git a/src/vdbe.c b/src/vdbe.c index c8fc6ff45b..5acb3b3137 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -2524,7 +2524,7 @@ case OP_Column: { goto op_column_error; } }else{ - VVA_ONLY( t = 0; ) /* Only needed by assert() statements */ + t = 0; } /* If after trying to extract new entries from the header, nHdrParsed is From 6044bf8bf3c5cada8e985a6fefa3aededbc19dea Mon Sep 17 00:00:00 2001 From: drh Date: Mon, 4 Jan 2016 04:28:11 +0000 Subject: [PATCH 09/13] Limit the length of sqlite3_mprintf() output to 2^30 bytes, even if SQLITE_MAX_LENGTH is set larger at compile-time. FossilOrigin-Name: d655a665acfae676d30e90e3731f483bee6acc63 --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/printf.c | 5 +++++ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/manifest b/manifest index 39fe0a1326..6b8109daa6 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\sharmless\scompiler\swarning. -D 2016-01-04T03:48:46.399 +C Limit\sthe\slength\sof\ssqlite3_mprintf()\soutput\sto\s2^30\sbytes,\seven\sif\nSQLITE_MAX_LENGTH\sis\sset\slarger\sat\scompile-time. +D 2016-01-04T04:28:11.861 F Makefile.in 28bcd6149e050dff35d4dcfd97e890cd387a499d F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 5fff077fcc46de7714ed6eebb6159a4c00eab751 @@ -329,7 +329,7 @@ F src/pcache1.c 72f644dc9e1468c72922eff5904048427b817051 F src/pragma.c f3e7147299ca05ef4304a36f1fd6e002729c72c6 F src/pragma.h 64c78a648751b9f4f297276c4eb7507b14b4628c F src/prepare.c 82e5db1013846a819f198336fed72c44c974e7b1 -F src/printf.c af589a27b7d40f6f4f704e9eea99f02f18ad6d32 +F src/printf.c 79265c0b36bca9b8582592a4f3fa73a1cc1cfa2f F src/random.c ba2679f80ec82c4190062d756f22d0c358180696 F src/resolve.c a83b41104e6ff69855d03cd0aaa09e93927ec39f F src/rowset.c eccf6af6d620aaa4579bd3b72c1b6395d9e9fa1e @@ -1406,7 +1406,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P f300c35efa5f7383b2a74b1c9466c243c17815e4 -R a3643a709add89c526ff9d85846c177f +P 4b404a99aa9bfa6cfe8998f5dc1f84f8be20b840 +R 3d16cb95a338f71bf305a9aee47b6af1 U drh -Z 723a886ae851aa4686263a1002cc64d8 +Z b5d1ace2d67c86c8eec357e62ba7f839 diff --git a/manifest.uuid b/manifest.uuid index 44b7d4d4a2..7a3a9597af 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -4b404a99aa9bfa6cfe8998f5dc1f84f8be20b840 \ No newline at end of file +d655a665acfae676d30e90e3731f483bee6acc63 \ No newline at end of file diff --git a/src/printf.c b/src/printf.c index 969950c154..fed9acd736 100644 --- a/src/printf.c +++ b/src/printf.c @@ -965,7 +965,12 @@ char *sqlite3_vmprintf(const char *zFormat, va_list ap){ #ifndef SQLITE_OMIT_AUTOINIT if( sqlite3_initialize() ) return 0; #endif +#if SQLITE_MAX_LENGTH<0x40000000 sqlite3StrAccumInit(&acc, 0, zBase, sizeof(zBase), SQLITE_MAX_LENGTH); +#else + sqlite3StrAccumInit(&acc, 0, zBase, sizeof(zBase), 0x3fffffff); +#endif + sqlite3VXPrintf(&acc, 0, zFormat, ap); z = sqlite3StrAccumFinish(&acc); return z; From 5a60c7d1428ab0540b888228dc86f566519cbe67 Mon Sep 17 00:00:00 2001 From: drh Date: Mon, 4 Jan 2016 04:41:13 +0000 Subject: [PATCH 10/13] Adjust the vtabH.test module to ignore files in the root directory of Windows machines that contain the "$" character. FossilOrigin-Name: 73e3355004b8b7ce2e1bb937725f429795528a4f --- manifest | 12 ++++++------ manifest.uuid | 2 +- test/vtabH.test | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/manifest b/manifest index 6b8109daa6..d08d409a94 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Limit\sthe\slength\sof\ssqlite3_mprintf()\soutput\sto\s2^30\sbytes,\seven\sif\nSQLITE_MAX_LENGTH\sis\sset\slarger\sat\scompile-time. -D 2016-01-04T04:28:11.861 +C Adjust\sthe\svtabH.test\smodule\sto\signore\sfiles\sin\sthe\sroot\sdirectory\sof\sWindows\nmachines\sthat\scontain\sthe\s"$"\scharacter. +D 2016-01-04T04:41:13.895 F Makefile.in 28bcd6149e050dff35d4dcfd97e890cd387a499d F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 5fff077fcc46de7714ed6eebb6159a4c00eab751 @@ -1274,7 +1274,7 @@ F test/vtabC.test 4528f459a13136f982e75614d120aef165f17292 F test/vtabD.test 05b3f1d77117271671089e48719524b676842e96 F test/vtabE.test d5024aa42754962f6bb0afd261681686488e7afe F test/vtabF.test fd5ad376f5a34fe0891df1f3cddb4fe7c3eb077e -F test/vtabH.test f77296bbf55675b72817cc10fbbcb236ac986abf +F test/vtabH.test 0def52cbcf8d68793d982329a72d70cef8308e35 F test/vtabI.test 751b07636700dbdea328e4265b6077ccd6811a3f F test/vtab_alter.test 9e374885248f69e251bdaacf480b04a197f125e5 F test/vtab_err.test 0d4d8eb4def1d053ac7c5050df3024fd47a3fbd8 @@ -1406,7 +1406,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 4b404a99aa9bfa6cfe8998f5dc1f84f8be20b840 -R 3d16cb95a338f71bf305a9aee47b6af1 +P d655a665acfae676d30e90e3731f483bee6acc63 +R 0d20e16c42f612598f302d493261df54 U drh -Z b5d1ace2d67c86c8eec357e62ba7f839 +Z 4891b25ab1f0ba8193051c36d1d029ea diff --git a/manifest.uuid b/manifest.uuid index 7a3a9597af..7e2cd0ba52 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -d655a665acfae676d30e90e3731f483bee6acc63 \ No newline at end of file +73e3355004b8b7ce2e1bb937725f429795528a4f \ No newline at end of file diff --git a/test/vtabH.test b/test/vtabH.test index 7973819bd1..606c8f1da1 100644 --- a/test/vtabH.test +++ b/test/vtabH.test @@ -147,13 +147,13 @@ if {1} { set res [list] foreach p [lrange [list_root_files] 0 4] { if {$::tcl_platform(platform) eq "windows"} { - lappend res $p + if {![regexp {\$} $p]} {lappend res $p} } else { lappend res "/$p" } } do_execsql_test 3.1 { - SELECT path FROM fstree LIMIT 5; + SELECT path FROM fstree WHERE path NOT GLOB '*$*' LIMIT 5; } $res # Read all entries in the current directory. From cc54f43442076f01ccda13db4fc576cd468817f6 Mon Sep 17 00:00:00 2001 From: drh Date: Mon, 4 Jan 2016 04:44:31 +0000 Subject: [PATCH 11/13] Improved comment on the vtabH-3.1 test. FossilOrigin-Name: 22abe08038cc7b66cbc25e733246d210197c9215 --- manifest | 12 ++++++------ manifest.uuid | 2 +- test/vtabH.test | 4 +++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/manifest b/manifest index d08d409a94..7763520f01 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Adjust\sthe\svtabH.test\smodule\sto\signore\sfiles\sin\sthe\sroot\sdirectory\sof\sWindows\nmachines\sthat\scontain\sthe\s"$"\scharacter. -D 2016-01-04T04:41:13.895 +C Improved\scomment\son\sthe\svtabH-3.1\stest. +D 2016-01-04T04:44:31.090 F Makefile.in 28bcd6149e050dff35d4dcfd97e890cd387a499d F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 5fff077fcc46de7714ed6eebb6159a4c00eab751 @@ -1274,7 +1274,7 @@ F test/vtabC.test 4528f459a13136f982e75614d120aef165f17292 F test/vtabD.test 05b3f1d77117271671089e48719524b676842e96 F test/vtabE.test d5024aa42754962f6bb0afd261681686488e7afe F test/vtabF.test fd5ad376f5a34fe0891df1f3cddb4fe7c3eb077e -F test/vtabH.test 0def52cbcf8d68793d982329a72d70cef8308e35 +F test/vtabH.test 7a21f18546cb9ab38df009e718300c40b552bb2b F test/vtabI.test 751b07636700dbdea328e4265b6077ccd6811a3f F test/vtab_alter.test 9e374885248f69e251bdaacf480b04a197f125e5 F test/vtab_err.test 0d4d8eb4def1d053ac7c5050df3024fd47a3fbd8 @@ -1406,7 +1406,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P d655a665acfae676d30e90e3731f483bee6acc63 -R 0d20e16c42f612598f302d493261df54 +P 73e3355004b8b7ce2e1bb937725f429795528a4f +R add896a0a928f0a416eb15bec81a6801 U drh -Z 4891b25ab1f0ba8193051c36d1d029ea +Z 9b39ca76b9261d7edc0d476f6827134f diff --git a/manifest.uuid b/manifest.uuid index 7e2cd0ba52..3bbab58916 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -73e3355004b8b7ce2e1bb937725f429795528a4f \ No newline at end of file +22abe08038cc7b66cbc25e733246d210197c9215 \ No newline at end of file diff --git a/test/vtabH.test b/test/vtabH.test index 606c8f1da1..c15ab87de8 100644 --- a/test/vtabH.test +++ b/test/vtabH.test @@ -142,7 +142,9 @@ if {1} { } } - # Read the first 5 entries from the root directory. + # Read the first 5 entries from the root directory. Except, ignore + # files that contain the "$" character in their names as these are + # special files on some Windows platforms. # set res [list] foreach p [lrange [list_root_files] 0 4] { From fa385edff34587e544690236dc9bf47114c3d333 Mon Sep 17 00:00:00 2001 From: drh Date: Mon, 4 Jan 2016 12:07:27 +0000 Subject: [PATCH 12/13] A new approach to very large sqlite3_mprintf() strings: Back out the [d655a665] check-in and instead make the size fields in StrAccum unsigned. Strings generated by sqlite3_mprintf() can now be as large as 2^31-1 bytes. FossilOrigin-Name: 7adb789f45698e5569b840d23f3f9488db3ed109 --- manifest | 16 ++++++++-------- manifest.uuid | 2 +- src/printf.c | 5 ----- src/sqliteInt.h | 6 +++--- test/analyzeF.test | 5 +---- 5 files changed, 13 insertions(+), 21 deletions(-) diff --git a/manifest b/manifest index 7763520f01..5d4a5d2f79 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Improved\scomment\son\sthe\svtabH-3.1\stest. -D 2016-01-04T04:44:31.090 +C A\snew\sapproach\sto\svery\slarge\ssqlite3_mprintf()\sstrings:\s\sBack\sout\sthe\n[d655a665]\scheck-in\sand\sinstead\smake\sthe\ssize\sfields\sin\sStrAccum\sunsigned.\nStrings\sgenerated\sby\ssqlite3_mprintf()\scan\snow\sbe\sas\slarge\sas\s2^31-1\sbytes. +D 2016-01-04T12:07:27.503 F Makefile.in 28bcd6149e050dff35d4dcfd97e890cd387a499d F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 5fff077fcc46de7714ed6eebb6159a4c00eab751 @@ -329,7 +329,7 @@ F src/pcache1.c 72f644dc9e1468c72922eff5904048427b817051 F src/pragma.c f3e7147299ca05ef4304a36f1fd6e002729c72c6 F src/pragma.h 64c78a648751b9f4f297276c4eb7507b14b4628c F src/prepare.c 82e5db1013846a819f198336fed72c44c974e7b1 -F src/printf.c 79265c0b36bca9b8582592a4f3fa73a1cc1cfa2f +F src/printf.c af589a27b7d40f6f4f704e9eea99f02f18ad6d32 F src/random.c ba2679f80ec82c4190062d756f22d0c358180696 F src/resolve.c a83b41104e6ff69855d03cd0aaa09e93927ec39f F src/rowset.c eccf6af6d620aaa4579bd3b72c1b6395d9e9fa1e @@ -338,7 +338,7 @@ F src/shell.c ed71dc7679e6f087a3f1ea3f9dae4b0fae7209c3 F src/sqlite.h.in 7d87d71b9a4689c51fa092f48f16590ff71558e3 F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad F src/sqlite3ext.h dfbe62ffd95b99afe2140d8c35b180d11924072d -F src/sqliteInt.h 30f7e8957ed7d244be027be72ded385154c635df +F src/sqliteInt.h f97614d43833bae0ed6c51ac8e550f0099a1d0ba F src/sqliteLimit.h 216557999cb45f2e3578ed53ebefe228d779cb46 F src/status.c 70912d7be68e9e2dbc4010c93d344af61d4c59ba F src/table.c 51b46b2a62d1b3a959633d593b89bab5e2c9155e @@ -441,7 +441,7 @@ F test/analyzeB.test 8bf35ee0a548aea831bf56762cb8e7fdb1db083d F test/analyzeC.test 555a6cc388b9818b6eda6df816f01ce0a75d3a93 F test/analyzeD.test 08f9d0bee4e118a66fff3a32d02dbe0ee0a2b594 F test/analyzeE.test 8684e8ac5722fb97c251887ad97e5d496a98af1d -F test/analyzeF.test 7ccd7a04f7d3061bde1a8a4dacc4792edccf6bf2 +F test/analyzeF.test 5d1fe1024ba2dfea3c18bede8c1ccef8aba1ab34 F test/analyzer1.test 498e2ff4b62740c2751c3a2f8b744fe26689fae9 F test/async.test 1d0e056ba1bb9729283a0f22718d3a25e82c277b F test/async2.test c0a9bd20816d7d6a2ceca7b8c03d3d69c28ffb8b @@ -1406,7 +1406,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 73e3355004b8b7ce2e1bb937725f429795528a4f -R add896a0a928f0a416eb15bec81a6801 +P 22abe08038cc7b66cbc25e733246d210197c9215 +R 50b92b9e9c9cae33b4950afbfcff914c U drh -Z 9b39ca76b9261d7edc0d476f6827134f +Z 208fc2f95f59628c3ac39711f08181ab diff --git a/manifest.uuid b/manifest.uuid index 3bbab58916..982d15ab22 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -22abe08038cc7b66cbc25e733246d210197c9215 \ No newline at end of file +7adb789f45698e5569b840d23f3f9488db3ed109 \ No newline at end of file diff --git a/src/printf.c b/src/printf.c index fed9acd736..969950c154 100644 --- a/src/printf.c +++ b/src/printf.c @@ -965,12 +965,7 @@ char *sqlite3_vmprintf(const char *zFormat, va_list ap){ #ifndef SQLITE_OMIT_AUTOINIT if( sqlite3_initialize() ) return 0; #endif -#if SQLITE_MAX_LENGTH<0x40000000 sqlite3StrAccumInit(&acc, 0, zBase, sizeof(zBase), SQLITE_MAX_LENGTH); -#else - sqlite3StrAccumInit(&acc, 0, zBase, sizeof(zBase), 0x3fffffff); -#endif - sqlite3VXPrintf(&acc, 0, zFormat, ap); z = sqlite3StrAccumFinish(&acc); return z; diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 53f0709645..c01bbc7869 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -2964,9 +2964,9 @@ struct StrAccum { sqlite3 *db; /* Optional database for lookaside. Can be NULL */ char *zBase; /* A base allocation. Not from malloc. */ char *zText; /* The string collected so far */ - int nChar; /* Length of the string so far */ - int nAlloc; /* Amount of space allocated in zText */ - int mxAlloc; /* Maximum allowed allocation. 0 for no malloc usage */ + u32 nChar; /* Length of the string so far */ + u32 nAlloc; /* Amount of space allocated in zText */ + u32 mxAlloc; /* Maximum allowed allocation. 0 for no malloc usage */ u8 accError; /* STRACCUM_NOMEM or STRACCUM_TOOBIG */ u8 bMalloced; /* zText points to allocated space */ }; diff --git a/test/analyzeF.test b/test/analyzeF.test index 670d178a81..3cbc5f47be 100644 --- a/test/analyzeF.test +++ b/test/analyzeF.test @@ -106,7 +106,7 @@ do_catchsql_test 4.1 { } {1 {error one}} do_catchsql_test 4.2 { - SELECT * FROM t1 WHERE x = zeroblob(2000000000) AND y = 4; + SELECT * FROM t1 WHERE x = zeroblob(2200000000) AND y = 4; } {1 {string or blob too big}} sqlite3_limit db SQLITE_LIMIT_LENGTH 1000000 @@ -122,6 +122,3 @@ do_catchsql_test 4.4 { finish_test - - - From 4b4da16344ccb0235df07a5e686d5baf4a888eff Mon Sep 17 00:00:00 2001 From: drh Date: Mon, 4 Jan 2016 13:06:53 +0000 Subject: [PATCH 13/13] Fix the conflict2.test module which was broken by check-in [e30062e9f6c]. FossilOrigin-Name: b779ca8a7580e2a0bb1176316c4540867b635229 --- manifest | 12 ++++++------ manifest.uuid | 2 +- test/conflict2.test | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/manifest b/manifest index 5d4a5d2f79..1628852800 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C A\snew\sapproach\sto\svery\slarge\ssqlite3_mprintf()\sstrings:\s\sBack\sout\sthe\n[d655a665]\scheck-in\sand\sinstead\smake\sthe\ssize\sfields\sin\sStrAccum\sunsigned.\nStrings\sgenerated\sby\ssqlite3_mprintf()\scan\snow\sbe\sas\slarge\sas\s2^31-1\sbytes. -D 2016-01-04T12:07:27.503 +C Fix\sthe\sconflict2.test\smodule\swhich\swas\sbroken\sby\scheck-in\s[e30062e9f6c]. +D 2016-01-04T13:06:53.893 F Makefile.in 28bcd6149e050dff35d4dcfd97e890cd387a499d F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 5fff077fcc46de7714ed6eebb6159a4c00eab751 @@ -524,7 +524,7 @@ F test/collateA.test b8218ab90d1fa5c59dcf156efabb1b2599c580d6 F test/colmeta.test 2c765ea61ee37bc43bbe6d6047f89004e6508eb1 F test/colname.test 08948a4809d22817e0e5de89c7c0a8bd90cb551b F test/conflict.test 841bcf7cabbfca39c577eb8411ea8601843b46a8 -F test/conflict2.test 0f0e810aef6739650d7f442164975e932cf18afc +F test/conflict2.test a82dd3b9b41fceb5dd6ff0707c5c7ffba208d538 F test/conflict3.test dec0634c0f31dec9a4b01c63063e939f0cd21b6b F test/contrib01.test 2a1cbc0f2f48955d7d073f725765da6fbceda6b4 F test/corrupt.test 141c39ea650c1365e85a49e402fa05cb9617fb97 @@ -1406,7 +1406,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 22abe08038cc7b66cbc25e733246d210197c9215 -R 50b92b9e9c9cae33b4950afbfcff914c +P 7adb789f45698e5569b840d23f3f9488db3ed109 +R 16019d64036d1aa36ba8b50ba392c4e8 U drh -Z 208fc2f95f59628c3ac39711f08181ab +Z 8bde812e449e210a56672af13ac69445 diff --git a/manifest.uuid b/manifest.uuid index 982d15ab22..fa6d00eef8 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -7adb789f45698e5569b840d23f3f9488db3ed109 \ No newline at end of file +b779ca8a7580e2a0bb1176316c4540867b635229 \ No newline at end of file diff --git a/test/conflict2.test b/test/conflict2.test index e8880635f1..6496913849 100644 --- a/test/conflict2.test +++ b/test/conflict2.test @@ -289,11 +289,11 @@ do_test conflict2-6.0 { # foreach {i conf1 cmd t0 t1 t2 t3 t4} { 1 {} UPDATE 1 {6 7 8 9} 1 0 1 - 2 REPLACE UPDATE 0 {7 6 9} 1 1 0 - 3 IGNORE UPDATE 0 {6 7 3 9} 1 1 0 - 4 FAIL UPDATE 1 {6 7 3 4} 1 1 0 + 2 REPLACE UPDATE 0 {7 6 9} 1 0 1 + 3 IGNORE UPDATE 0 {6 7 3 9} 1 0 1 + 4 FAIL UPDATE 1 {6 7 3 4} 1 0 1 5 ABORT UPDATE 1 {1 2 3 4} 1 0 1 - 6 ROLLBACK UPDATE 1 {1 2 3 4} 0 1 0 + 6 ROLLBACK UPDATE 1 {1 2 3 4} 0 0 1 7 REPLACE {UPDATE OR IGNORE} 0 {6 7 3 9} 1 0 0 8 IGNORE {UPDATE OR REPLACE} 0 {7 6 9} 1 0 1 9 FAIL {UPDATE OR IGNORE} 0 {6 7 3 9} 1 0 0