From: drh Date: Tue, 1 Sep 2015 18:01:16 +0000 (+0000) Subject: Merge the latest trunk enhancements. X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=f56af5ee2d9f40084cb52cff457911d233cbf00f;p=thirdparty%2Fsqlite.git Merge the latest trunk enhancements. FossilOrigin-Name: 3dea047465fa8e3031046a33016b6ed760336ddc --- f56af5ee2d9f40084cb52cff457911d233cbf00f diff --cc manifest index 9d924de776,cb2ed48858..c837c84960 --- a/manifest +++ b/manifest @@@ -1,9 -1,9 +1,9 @@@ - C Fixes\sso\sthat\sit\sbuilds\swithout\swarnings\sboth\swith\sand\swithout\nSQLITE_ENABLE_CONCURRENT. - D 2015-09-01T17:48:54.487 -C Enhance\sthe\sjson_extract()\sfunction\sso\sthat\sif\sgiven\smultiple\sPATH\sarguments\nit\swill\sreturn\sa\sJSON\sarray\swith\sall\sof\sthe\sanswers.\s\sAlso\supdate\scomments\nwithin\sthe\sjson1\sextension\sto\sreflect\sstricter\sinterpretation\sof\sJSON\sand\sPATH\narguments. -D 2015-08-29T19:41:45.279 ++C Merge\sthe\slatest\strunk\senhancements. ++D 2015-09-01T18:01:16.369 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f - F Makefile.in e2218eb228374422969de7b1680eda6864affcef + F Makefile.in f85066ce844a28b671aaeeff320921cd0ce36239 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 - F Makefile.msc 10af19cc089862481d49b347acd99c02635ddc49 + F Makefile.msc b268d8be2e800b9d35f074b1ed6b2f698deebdd6 F Makefile.vxworks e1b65dea203f054e71653415bd8f96dcaed47858 F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7 F VERSION ccfc4d1576dbfdeece0a4372a2e6a2e37d3e7975 @@@ -279,10 -279,10 +279,10 @@@ F src/auth.c b56c78ebe40a2110fd361379f7 F src/backup.c 4d9134dc988a87838c06056c89c0e8c4700a0452 F src/bitvec.c d1f21d7d91690747881f03940584f4cc548c9d3d F src/btmutex.c 45a968cc85afed9b5e6cf55bf1f42f8d18107f79 -F src/btree.c f48b3ef91676c06a90a8832987ecef6b94c931ee -F src/btree.h 969adc948e89e449220ff0ff724c94bb2a52e9f1 -F src/btreeInt.h 8177c9ab90d772d6d2c6c517e05bed774b7c92c0 -F src/build.c 511b02138eddc3cf68dab1016da4998260093e9f +F src/btree.c ca6c7e4bbbf91b6c91d0278942b917e81d3fc18d +F src/btree.h 00d4cdb747c4172a5566faf037116985dbbc377e +F src/btreeInt.h 171864bcd81635583dab7b8a04b19b454b18ef80 - F src/build.c bb9335e06a6f308c595e0507ce97daf791735a6e ++F src/build.c cbf7c81a63b5afd12d289ce5c6c2f62f893379a3 F src/callback.c 7b44ce59674338ad48b0e84e7b72f935ea4f68b0 F src/complete.c addcd8160b081131005d5bc2d34adf20c1c5c92f F src/ctime.c 5a0b735dc95604766f5dac73973658eef782ee8b @@@ -411,8 -411,8 +411,8 @@@ F src/vdbesort.c f5009e7a35e3065635d891 F src/vdbetrace.c 8befe829faff6d9e6f6e4dee5a7d3f85cc85f1a0 F src/vtab.c d31174e4c8f592febab3fa7f69e18320b4fd657a F src/vxworks.h c18586c8edc1bddbc15c004fa16aeb1e1342b4fb - F src/wal.c d632ee33340554888a7848a253a580167a031cdb -F src/wal.c 8cd07f1f99e1a81346db1c9da879bef6c6f97cf6 -F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4 ++F src/wal.c 00352cb9d23c5599f219496d4b22f30d4e30f8ac +F src/wal.h ec78c303882bc04b3d0b86f0ddbc87309401595a F src/walker.c 2e14d17f592d176b6dc879c33fbdec4fbccaa2ba F src/where.c 91e73ffc699c140a59baa03a6b7b060db02bed81 F src/whereInt.h 901c17c1e3c82745ad9b85b4471543fa59c980e9 @@@ -1383,7 -1380,7 +1383,7 @@@ F tool/vdbe_profile.tcl 67746953071a9f8 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f - P 57bc0194f41dbcd2c343e665e7af475cd4dd7328 - R 3e87a7400b2863c0ecf368784d9e77cc -P 2e8e239cec5a12ac81cf62c0fbe94fb5713c31b1 -R e2bf483acb1667e13821f8d776f13acb ++P 5ed2a445a164f0f0c2669c6681ea76618e639961 1da60c3dda4254620052a83c853c2d2b6dd5009f ++R 4fa469416c52b53416b7d4829f16cd6a U drh - Z 6775a99654ddab524e15a28b9025b05e -Z ec66207700973851a4a5019af1bd75d1 ++Z 948301ca23388fa4e198d2911e3605bb diff --cc manifest.uuid index 407c9dbaa4,17d2b0dd8c..953e5bbd33 --- a/manifest.uuid +++ b/manifest.uuid @@@ -1,1 -1,1 +1,1 @@@ - 5ed2a445a164f0f0c2669c6681ea76618e639961 -1da60c3dda4254620052a83c853c2d2b6dd5009f ++3dea047465fa8e3031046a33016b6ed760336ddc diff --cc src/wal.c index fbc92238bb,cf8f1d4e66..07f06293ac --- a/src/wal.c +++ b/src/wal.c @@@ -2373,19 -2373,39 +2389,20 @@@ void sqlite3WalEndReadTransaction(Wal * } /* -** Search the wal file for page pgno. If found, set *piRead to the frame that -** contains the page. Otherwise, if pgno is not in the wal file, set *piRead -** to zero. -** -** Return SQLITE_OK if successful, or an error code if an error occurs. If an -** error does occur, the final value of *piRead is undefined. -*/ -int sqlite3WalFindFrame( - Wal *pWal, /* WAL handle */ - Pgno pgno, /* Database page number to read data for */ - u32 *piRead /* OUT: Frame number (or zero) */ +** Search the hash tables for an entry matching page number pgno. Ignore +** any entries that lie after frame iLast within the wal file. +*/ +static int walFindFrame( + Wal *pWal, + Pgno pgno, + u32 iLast, + u32 *piRead ){ - u32 iRead = 0; /* If !=0, WAL frame to return data from */ - u32 iLast = pWal->hdr.mxFrame; /* Last page in WAL for this reader */ int iHash; /* Used to loop through N hash tables */ + u32 iRead = 0; + int iMinHash; - /* This routine is only be called from within a read transaction. */ - assert( pWal->readLock>=0 || pWal->lockError ); - - /* If the "last page" field of the wal-index header snapshot is 0, then - ** no data will be read from the wal under any circumstances. Return early - ** in this case as an optimization. Likewise, if pWal->readLock==0, - ** then the WAL is ignored by the reader so return early, as if the - ** WAL were empty. - */ - if( iLast==0 || pWal->readLock==0 ){ - *piRead = 0; - return SQLITE_OK; - } - - /* Search the hash table or tables for an entry matching page number - ** pgno. Each iteration of the following for() loop searches one + /* Each iteration of the following for() loop searches one ** hash table (each hash table indexes up to HASHTABLE_NPAGE frames). ** ** This code might run concurrently to the code in walIndexAppend()