diff --git a/manifest b/manifest index af4e2e21c8..9ffb7e1a70 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Merge\sthe\slatest\senhancements\sfrom\strunk. -D 2016-01-01T13:25:06.194 +C Merge\sin\slast-minute\spatches\sfor\sthe\s3.10.0\sbeta. +D 2016-01-04T19:02:47.665 F Makefile.in 321a54f5a2843b6752b21f7bd66ce5f96444d1ab F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 6fd10748c3f955ca56ac1bc3a45e7c48876c32a3 @@ -299,7 +299,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 @@ -354,11 +354,11 @@ F src/random.c ba2679f80ec82c4190062d756f22d0c358180696 F src/resolve.c a83b41104e6ff69855d03cd0aaa09e93927ec39f F src/rowset.c eccf6af6d620aaa4579bd3b72c1b6395d9e9fa1e F src/select.c f8fded11fc443a9f5a73cc5db069d06b34460e2f -F src/shell.c 4f133a91df78d4664fd0a37cf0a8f51cbd361fda +F src/shell.c 40ded7e3ade5f2cc89ab1180994f6a6975ebc6f3 F src/sqlite.h.in 686be87fcbaea46b1aa8197a17b7a437d39764fc F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad F src/sqlite3ext.h dfbe62ffd95b99afe2140d8c35b180d11924072d -F src/sqliteInt.h 583ec5b50524c5560f92c065962438a7ab0feea9 +F src/sqliteInt.h 961c445154db6d8240ddc0900aa48c5745c23e80 F src/sqliteLimit.h 216557999cb45f2e3578ed53ebefe228d779cb46 F src/status.c 70912d7be68e9e2dbc4010c93d344af61d4c59ba F src/table.c 51b46b2a62d1b3a959633d593b89bab5e2c9155e @@ -418,11 +418,11 @@ F src/update.c d8d675aa299336ac086ad2039d7e812cd6237db0 F src/utf.c 32d7f82aa921322f3e1c956f4b58f019ebd2c6b3 F src/util.c e802e8e311a0d6c48cd1b3e89db164f6f0248d70 F src/vacuum.c 2ddd5cad2a7b9cef7f9e431b8c7771634c6b1701 -F src/vdbe.c a415f7844ba3f67226f49c6e078ce4622dbb6040 +F src/vdbe.c a479a4bd02b6b77b7ff3ff84825fccc0b967fe6a F src/vdbe.h bfe3f80dba435377cdb64fd917f2529f0f48ab77 F src/vdbeInt.h 4f3b46806b93faa92f0511c7ce30ed31aaec65be F src/vdbeapi.c ab2cb8fe23fb9f3195f1311eaa800495d83b6118 -F src/vdbeaux.c e312c85b1215ac101e25edeee421ea2dedb6e8bd +F src/vdbeaux.c 035470b59cae5af17bda4d2e64197ed0e265fc30 F src/vdbeblob.c cc13eca96b8ec51b6248de785a1aec5df11f5805 F src/vdbemem.c 25b6cfd665b5073480452426e84136edd94140c0 F src/vdbesort.c a7ec02da4494c59dfd071126dd3726be5a11459d @@ -461,7 +461,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 @@ -544,7 +544,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 a82dd3b9b41fceb5dd6ff0707c5c7ffba208d538 F test/conflict3.test dec0634c0f31dec9a4b01c63063e939f0cd21b6b F test/contrib01.test 2a1cbc0f2f48955d7d073f725765da6fbceda6b4 F test/corrupt.test 141c39ea650c1365e85a49e402fa05cb9617fb97 @@ -582,7 +582,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 @@ -967,7 +967,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 975449bf742b8bb9025208292208af816a1fcb58 F test/resolver01.test f4022acafda7f4d40eca94dbf16bc5fc4ac30ceb F test/rollback.test 458fe73eb3ffdfdf9f6ba3e9b7350a6220414dea F test/rollback2.test fc14cf6d1a2b250d2735ef16124b971bce152f14 @@ -1295,7 +1295,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 7a21f18546cb9ab38df009e718300c40b552bb2b F test/vtabI.test 751b07636700dbdea328e4265b6077ccd6811a3f F test/vtab_alter.test 9e374885248f69e251bdaacf480b04a197f125e5 F test/vtab_err.test 0d4d8eb4def1d053ac7c5050df3024fd47a3fbd8 @@ -1361,7 +1361,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 @@ -1427,7 +1427,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 f6c9273cab877b8b6b327250195f3392393d060a 68360cd2211b7ab25dd4ca55a2e82e31f51f2976 -R 3ae5ccf611905fe16a11d6f29d09eba8 +P c0be246a740c8f33a7c07e1414688364dee56ece b779ca8a7580e2a0bb1176316c4540867b635229 +R 667c4c909fff87de213039b9831ec880 U drh -Z 208af03429fdf73aeff6e169175e1b1b +Z afff2890aa9dfb1c4b31df554e7505ad diff --git a/manifest.uuid b/manifest.uuid index 551ecda50e..0c7d483566 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -c0be246a740c8f33a7c07e1414688364dee56ece \ No newline at end of file +c785cd7813e4ef6d6f2cb362a0f822713db6bcea \ 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/src/shell.c b/src/shell.c index e01e443b47..74b3990705 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 diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 2bb73ec7cd..9b368e9c1e 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -2740,6 +2740,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 */ @@ -2975,9 +2976,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/src/vdbe.c b/src/vdbe.c index d4821700f7..88a8836f14 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -2534,7 +2534,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 @@ -3412,7 +3412,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, diff --git a/src/vdbeaux.c b/src/vdbeaux.c index 5a23062ade..1d12a3d187 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; } @@ -125,7 +126,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); @@ -1850,9 +1852,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 = pParse->szOpAlloc - ROUND8(sizeof(Op)*p->nOp); /* Size of zCsr */ resolveP2Values(p, &nArg); p->usesStmtJournal = (u8)(pParse->isMultiWrite && pParse->mayAbort); 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 - - - diff --git a/test/conflict2.test b/test/conflict2.test index 8419f1a3ff..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 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 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 0 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 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 7f53fd1523..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" { @@ -830,8 +832,8 @@ proc process_options {argv} { } default { - PUTSERR stderr "" - PUTSERR stderr [string trim $::USAGE_MESSAGE] + PUTSERR "" + PUTSERR [string trim $::USAGE_MESSAGE] exit -1 } } @@ -945,6 +947,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" diff --git a/test/vtabH.test b/test/vtabH.test index 7973819bd1..c15ab87de8 100644 --- a/test/vtabH.test +++ b/test/vtabH.test @@ -142,18 +142,20 @@ 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] { 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. 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.