diff --git a/Makefile.msc b/Makefile.msc index 43c91e92e2..02a5cacf26 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -19,6 +19,12 @@ USE_ICU = 0 # USE_CRT_DLL = 0 +# Set this non-0 to attempt setting the native compiler automatically +# for cross-compiling the command line tools needed during the compilation +# process. +# +XCOMPILE = 0 + # Set this non-0 to use the native libraries paths for cross-compiling # the command line tools needed during the compilation process. # @@ -85,11 +91,21 @@ LD = link.exe # line similar to the following could be used (all on one line): # # nmake /f Makefile.msc sqlite3.dll +# XCOMPILE=1 USE_NATIVE_LIBPATHS=1 +# +# Alternatively, the full path and file name to the compiler binary for the +# platform the compilation process is taking place may be specified (all on +# one line): +# +# nmake /f Makefile.msc sqlite3.dll # "NCC=""%VCINSTALLDIR%\bin\cl.exe""" # USE_NATIVE_LIBPATHS=1 # !IFDEF NCC NCC = $(NCC:\\=\) +!ELSEIF $(XCOMPILE)!=0 +NCC = "$(VCINSTALLDIR)\bin\cl.exe" +NCC = $(NCC:\\=\) !ELSE NCC = $(CC) !ENDIF diff --git a/doc/lemon.html b/doc/lemon.html index 2c65555972..b16e35960e 100644 --- a/doc/lemon.html +++ b/doc/lemon.html @@ -481,7 +481,7 @@ as follows:
  • If the precedences are the same and the shift token is right-associative, then resolve in favor of the shift. No parsing conflict is reported. -
  • If the precedences are the same the the shift token is +
  • If the precedences are the same the shift token is left-associative, then resolve in favor of the reduce. No parsing conflict is reported.
  • Otherwise, resolve the conflict by doing the shift and diff --git a/doc/pager-invariants.txt b/doc/pager-invariants.txt index c6deda7a69..44444dad54 100644 --- a/doc/pager-invariants.txt +++ b/doc/pager-invariants.txt @@ -44,7 +44,7 @@ *** Definition: Two databases (or the same database at two points it time) are said to be "logically equivalent" if they give the same answer to - all queries. Note in particular the the content of freelist leaf + all queries. Note in particular the content of freelist leaf pages can be changed arbitarily without effecting the logical equivalence of the database. diff --git a/ext/fts2/fts2.c b/ext/fts2/fts2.c index 74c2890d23..93e03cd557 100644 --- a/ext/fts2/fts2.c +++ b/ext/fts2/fts2.c @@ -5051,7 +5051,7 @@ static int leavesReaderAtEnd(LeavesReader *pReader){ ** modification to control flow all over the place, though, so for now ** just punt. ** -** Note the the current system assumes that segment merges will run to +** Note the current system assumes that segment merges will run to ** completion, which is why this particular probably hasn't arisen in ** this case. Probably a brittle assumption. */ diff --git a/ext/fts3/fts3_write.c b/ext/fts3/fts3_write.c index 5b54cf4a03..c9f1743210 100644 --- a/ext/fts3/fts3_write.c +++ b/ext/fts3/fts3_write.c @@ -2969,7 +2969,7 @@ static int fts3SegmentMerge( if( iLevel==FTS3_SEGCURSOR_ALL ){ /* This call is to merge all segments in the database to a single - ** segment. The level of the new segment is equal to the the numerically + ** segment. The level of the new segment is equal to the numerically ** greatest segment level currently present in the database for this ** index. The idx of the new segment is always 0. */ if( csr.nSegment==1 ){ @@ -3599,7 +3599,7 @@ static int fts3IncrmergePush( pNode->key.n = nTerm; } }else{ - /* Otherwise, flush the the current node of layer iLayer to disk. + /* Otherwise, flush the current node of layer iLayer to disk. ** Then allocate a new, empty sibling node. The key will be written ** into the parent of this node. */ rc = fts3WriteSegment(p, pNode->iBlock, pNode->block.a, pNode->block.n); diff --git a/manifest b/manifest index ca278dc6fe..e332fe6cdf 100644 --- a/manifest +++ b/manifest @@ -1,9 +1,9 @@ -C Merge\sthe\slatest\strunk\schanges\sinto\sthe\ssessions\sbranch. -D 2012-08-25T01:21:36.221 +C Update\swith\slatest\strunk\schanges. +D 2012-08-31T14:23:16.346 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in abd5c10d21d1395f140d9e50ea999df8fa4d6376 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 -F Makefile.msc 938096d88105a3d102a04186cd5470a4e34a021d +F Makefile.msc f153aec9a398d04df7a6dbd4ec092bf3f8edcad3 F Makefile.vxworks 879f034a64062a364b21000266bbd5bc6e0c19b9 F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6 F VERSION a71848df48082f1d6585d4b0819d530fc455485d @@ -18,8 +18,8 @@ F config.sub 9ebe4c3b3dab6431ece34f16828b594fb420da55 F configure 4dd7d5fa033f649d7372e9ebd4aff68db6026da4 x F configure.ac 6e909664785b8184db2179013cd9d574f96ca3a3 F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad -F doc/lemon.html 3091574143dd3415669b6745843ff8d011d33549 -F doc/pager-invariants.txt 870107036470d7c419e93768676fae2f8749cf9e +F doc/lemon.html 334dbf6621b8fb8790297ec1abf3cfa4621709d1 +F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710 F doc/vfs-shm.txt e101f27ea02a8387ce46a05be2b1a902a021d37a F ext/README.txt 913a7bd3f4837ab14d7e063304181787658b14e1 F ext/async/README.txt 0c541f418b14b415212264cbaaf51c924ec62e5b @@ -41,7 +41,7 @@ F ext/fts1/simple_tokenizer.c 1844d72f7194c3fd3d7e4173053911bf0661b70d F ext/fts1/tokenizer.h 0c53421b832366d20d720d21ea3e1f6e66a36ef9 F ext/fts2/README.tokenizers 21e3684ea5a095b55d70f6878b4ce6af5932dfb7 F ext/fts2/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d -F ext/fts2/fts2.c 238e9e19158ef75fb4155613a870443394fbf7da +F ext/fts2/fts2.c 4ef7d7ecf590da0dd416ac54612c53a7d4175790 F ext/fts2/fts2.h da5f76c65163301d1068a971fd32f4119e3c95fa F ext/fts2/fts2_hash.c 2689e42e1107ea67207f725cf69cf8972d00cf93 F ext/fts2/fts2_hash.h 9a5b1be94664139f93217a0770d7144425cffb3a @@ -72,7 +72,7 @@ F ext/fts3/fts3_tokenizer.h 66dec98e365854b6cd2d54f1a96bb6d428fc5a68 F ext/fts3/fts3_tokenizer1.c 5c98225a53705e5ee34824087478cf477bdb7004 F ext/fts3/fts3_unicode.c 49e36e6ba59f79e6bd6a8bfe434570fe48d20559 F ext/fts3/fts3_unicode2.c a863f05f758af36777dffc2facc898bc73fec896 -F ext/fts3/fts3_write.c f40042ba5602c58bdd94bd1b9e00205fb73d37cd +F ext/fts3/fts3_write.c c30c49f3debb9497a07f15cc4c042815e35474ef F ext/fts3/fts3speed.tcl b54caf6a18d38174f1a6e84219950d85e98bb1e9 F ext/fts3/mkfts3amal.tcl 252ecb7fe6467854f2aa237bf2c390b74e71f100 F ext/fts3/tool/fts3view.c 6cfc5b67a5f0e09c0d698f9fd012c784bfaa9197 @@ -135,10 +135,10 @@ F src/auth.c 523da7fb4979469955d822ff9298352d6b31de34 F src/backup.c 5b31b24d6814b11de763debf342c8cd0a15a4910 F src/bitvec.c 26675fe8e431dc555e6f2d0e11e651d172234aa1 F src/btmutex.c 976f45a12e37293e32cae0281b15a21d48a8aaa7 -F src/btree.c 32dc63ef18c6a8d448c37c030ced70cf23ccad75 +F src/btree.c 9cf6de113d23d47967df24b8d8ce6501c879d7e6 F src/btree.h 4aee02e879211bfcfd3f551769578d2e940ab6c2 F src/btreeInt.h 4e5c2bd0f9b36b2a815a6d84f771a61a65830621 -F src/build.c 196734374128023e414a818f2051d836badb3526 +F src/build.c a3b700afd475e6387da59be6f2e86161e80d6d87 F src/callback.c 0cb4228cdcd827dcc5def98fb099edcc9142dbcd F src/complete.c dc1d136c0feee03c2f7550bafc0d29075e36deac F src/ctime.c 500d019da966631ad957c37705642be87524463b @@ -152,7 +152,7 @@ F src/global.c 4cfdca5cb0edd33c4d021baec4ede958cb2c793b F src/hash.c a4031441741932da9e7a65bee2b36b5d0e81c073 F src/hash.h 2894c932d84d9f892d4b4023a75e501f83050970 F src/hwtime.h d32741c8f4df852c7d959236615444e2b1063b08 -F src/insert.c 49dd0445a92aece7dea9f9b3018e479892b77a68 +F src/insert.c 8c5a3aba0e97c39679de3b33f95e7795d336fc87 F src/journal.c 552839e54d1bf76fb8f7abe51868b66acacf6a0e F src/legacy.c a199d7683d60cef73089e892409113e69c23a99f F src/lempar.c 0ee69fca0be54cd93939df98d2aca4ca46f44416 @@ -174,9 +174,9 @@ F src/notify.c 976dd0f6171d4588e89e874fcc765e92914b6d30 F src/os.c e1acdc09ff3ac2412945cca9766e2dcf4675f31c F src/os.h 027491c77d2404c0a678bb3fb06286f331eb9b57 F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04 -F src/os_unix.c b5149a3343a6acd6c9df4e3acf5085a6501c1f68 -F src/os_win.c 88f8cc4ffdbb47e0f8f8b60110fcf90e461c5fb4 -F src/pager.c e381c118b77dc22021a1a59d3fec24815e91df78 +F src/os_unix.c 69b2fe66316524eebf5f1ce85c1fdfe2952307e9 +F src/os_win.c 5dec8fe85ee547152075c020db72aec4382f0d0a +F src/pager.c 5665fa9ecec51f11dabdfd8eefefa89391856007 F src/pager.h 8b8c9bc065a3c66769df8724dfdf492ee1aab3c5 F src/parse.y f29df90bd3adc64b33114ab1de9fb7768fcf2099 F src/pcache.c f8043b433a57aba85384a531e3937a804432a346 @@ -187,12 +187,12 @@ F src/prepare.c 33291b83cca285718048d219c67b8298501fa3a5 F src/printf.c 4a9f882f1c1787a8b494a2987765acf9d97ac21f F src/random.c cd4a67b3953b88019f8cd4ccd81394a8ddfaba50 F src/resolve.c 9e28280ec98035f31900fdd1db01f86f68ca6c32 -F src/rowset.c f6a49f3e9579428024662f6e2931832511f831a1 -F src/select.c a9d68e04f07348038ac279f3316ee8f8e146f59a -F src/shell.c 076e1c90d594644f36027c8ecff9a392cf2d3a06 -F src/sqlite.h.in 6bd48b850e66652823e0f0bdac857a3a3afbfb16 +F src/rowset.c 64655f1a627c9c212d9ab497899e7424a34222e0 +F src/select.c f843c872a97baa1594c2cc3d4c003409a7bd03af +F src/shell.c 87953c5d9c73d9494db97d1607e2e2280418f261 +F src/sqlite.h.in 930b719ce295058817aa58e7b65c43dc668cc098 F src/sqlite3ext.h 6904f4aadf976f95241311fbffb00823075d9477 -F src/sqliteInt.h 15ae668e04d1f39aa40a45a14a33084435d984d7 +F src/sqliteInt.h 569cb02b6555db22dbe38566ed904f40f0ae5eb8 F src/sqliteLimit.h 164b0e6749d31e0daa1a4589a169d31c0dec7b3d F src/status.c 35939e7e03abf1b7577ce311f48f682c40de3208 F src/table.c 2cd62736f845d82200acfa1287e33feb3c15d62e @@ -200,7 +200,7 @@ F src/tclsqlite.c e4feb5698ee09f8b32ee40baa1d3577871125042 F src/test1.c 3d70f7c5987f186884cfebbfa7151a7d3d67d86e F src/test2.c 4178056dd1e7d70f954ad8a1e3edb71a2a784daf F src/test3.c 3c3c2407fa6ec7a19e24ae23f7cb439d0275a60d -F src/test4.c d1e5a5e904d4b444cf572391fdcb017638e36ff7 +F src/test4.c bf9fa9bece01de08e6f5e02314e4af5c13590dfa F src/test5.c a6d1ac55ac054d0b2b8f37b5e655b6c92645a013 F src/test6.c 417e1e214734393c24a8ee80b41485a9c4169123 F src/test7.c 2e0781754905c8adc3268d8f0967e7633af58843 @@ -233,36 +233,36 @@ F src/test_quota.h 8761e463b25e75ebc078bd67d70e39b9c817a0cb F src/test_rtree.c aba603c949766c4193f1068b91c787f57274e0d9 F src/test_schema.c 8c06ef9ddb240c7a0fcd31bc221a6a2aade58bf0 F src/test_server.c 2f99eb2837dfa06a4aacf24af24c6affdf66a84f -F src/test_spellfix.c fa83c9b4c4bdd1d41be4ad1e9241bf5a4fc9190f +F src/test_spellfix.c 0a5b5b27fc48b00f9e6fd6700f9535de538a964f F src/test_stat.c d1569c7a4839f13e80187e2c26b2ab4da2d03935 F src/test_superlock.c 2b97936ca127d13962c3605dbc9a4ef269c424cd F src/test_syscall.c a992d8c80ea91fbf21fb2dd570db40e77dd7e6ae F src/test_tclvar.c f4dc67d5f780707210d6bb0eb6016a431c04c7fa F src/test_thread.c e286f2173563f2a1747c24bcda6b9d030bf4f4e4 F src/test_vfs.c c6260ef238c1142c8f8bd402db02216afd182ae3 -F src/test_vfstrace.c 6b28adb2a0e8ecd0f2e3581482e1f658b11b4067 +F src/test_vfstrace.c f60e12754e65c05386aab59db8d2ae086314138d F src/test_wholenumber.c 3d2b9ed1505c40ad5c5ca2ad16ae7a289d6cc251 F src/test_wsd.c 41cadfd9d97fe8e3e4e44f61a4a8ccd6f7ca8fe9 F src/tokenize.c 1e86210d3976717a19238ea7b047fac481fe8c12 -F src/trigger.c ee7e178fb9188f44b532cebd449a7c1df90fb684 +F src/trigger.c 3f258307040173aff383eb23fb74c44fe829078c F src/update.c abb0fcabe551dae0a133fd2a4370b5a8c23b1831 F src/utf.c 890c67dcfcc7a74623c95baac7535aadfe265e84 F src/util.c 0af2e515dc0dabacec931bca39525f6c3f1c5455 F src/vacuum.c 587a52bb8833d7ac15af8916f25437e2575028bd -F src/vdbe.c 9a1c2f78ae8baba248c0369a2f7717a288c22205 +F src/vdbe.c b01b505ced376ee6a9310300c9cb1a0980731f94 F src/vdbe.h 87b8ff40de3f55dbcdc33029416862f517c37a2f F src/vdbeInt.h 3f5d994703b6d61032d48f3086329c960b1697e9 F src/vdbeapi.c 7d23764ea26c1fff2959e6a0984dd96de0fa8f75 -F src/vdbeaux.c 91923b781aa3db404fea7c7567617bf61a9a32d0 +F src/vdbeaux.c 797201e170a8bcc746d62aa82e2a280419b3839b F src/vdbeblob.c 11248c6362389569764682eb0f59ce910f3cc381 F src/vdbemem.c cb55e84b8e2c15704968ee05f0fae25883299b74 F src/vdbesort.c 0dc1b274dcb4d4c8e71b0b2b15261f286caba39b F src/vdbetrace.c 8bd5da325fc90f28464335e4cc4ad1407fe30835 -F src/vtab.c bb8ea3a26608bb1357538a5d2fc72beba6638998 -F src/wal.c 9294df6f96aae5909ae1a9b733fd1e1b4736978b +F src/vtab.c d2c54fd22aa83eb34fc6f7cd9b097f2fc2b1e9de +F src/wal.c 5acb3e7bbd31f10ba39acad9ce6b399055337a9d F src/wal.h 29c197540b19044e6cd73487017e5e47a1d3dac6 F src/walker.c 3d75ba73de15e0f8cd0737643badbeb0e002f07b -F src/where.c 9a28820fb0ead5674d5b45dfdb32aef913fe40c3 +F src/where.c 22783f4275f6fc09b663115a6091837cb5c510e0 F test/8_3_names.test 631ea964a3edb091cf73c3b540f6bcfdb36ce823 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2 F test/aggnested.test 0be144b453e0622a085fae8665c32f5676708e00 @@ -363,7 +363,7 @@ F test/corruptD.test 99b1999dbfa7cc04aaeac9d695a2445d4e7c7458 F test/corruptE.test 1b9eb20a8711251ce57b44a257e241085b39b52d F test/corruptF.test 984b1706c9c0e4248141b056c21124612628d12e F test/count.test 454e1ce985c94d13efeac405ce54439f49336163 -F test/crash.test 519dc29f6fea151f015a23236e555239353946eb +F test/crash.test fb9dc4a02dcba30d4aa5c2c226f98b220b2b959f F test/crash2.test 5b14d4eb58b880e231361d3b609b216acda86651 F test/crash3.test 8f5de9d32ab9ab95475a9efe7f47a940aa889418 F test/crash4.test fe2821baf37168dc59dd733dcf7dba2a401487bc @@ -568,7 +568,7 @@ F test/join3.test 6f0c774ff1ba0489e6c88a3e77b9d3528fb4fda0 F test/join4.test 1a352e4e267114444c29266ce79e941af5885916 F test/join5.test 86675fc2919269aa923c84dd00ee4249b97990fe F test/join6.test cfe6503791ceb0cbb509966740286ec423cbf10b -F test/journal1.test 8b71ef1ed5798bdc0e6eb616d8694e2c2c188d4d +F test/journal1.test 69abc726c51b4a0409189f9a85191205297c0577 F test/journal2.test ae06f566c28552c313ded3fee79a6c69e6d049b1 F test/journal3.test ff8af941f9e06161d3db1b46bb9f965ff0e7f307 F test/jrnlmode.test 9ee3a78f53d52cca737db69293d15dc41c0cbd36 @@ -655,7 +655,7 @@ F test/pageropt.test 9191867ed19a2b3db6c42d1b36b6fbc657cd1ab0 F test/pagesize.test 1dd51367e752e742f58e861e65ed7390603827a0 F test/pcache.test 065aa286e722ab24f2e51792c1f093bf60656b16 F test/pcache2.test a83efe2dec0d392f814bfc998def1d1833942025 -F test/permutations.test b4f49af522304134d32966ccef8b00d2c4765664 +F test/permutations.test 02dd9f7fd2fc874d25572b9ae431181bd69a174f F test/pragma.test a62f73293b0f0d79b0c87f8dd32d46fe53b0bd17 F test/pragma2.test 3a55f82b954242c642f8342b17dffc8b47472947 F test/printf.test ec9870c4dce8686a37818e0bf1aba6e6a1863552 @@ -674,7 +674,7 @@ F test/releasetest.mk 2eced2f9ae701fd0a29e714a241760503ccba25a F test/releasetest.tcl e48fd8e0e8abad89f30e08620790533ae4e02010 F test/rollback.test a1b4784b864331eae8b2a98c189efa2a8b11ff07 F test/rowhash.test 0bc1d31415e4575d10cacf31e1a66b5cc0f8be81 -F test/rowid.test e58e0acef38b527ed1b0b70d3ada588f804af287 +F test/rowid.test f777404492adb0e00868fd706a3721328fd3af48 F test/rtree.test 0c8d9dd458d6824e59683c19ab2ffa9ef946f798 F test/savepoint.test f5acd87d0c7a5f4ad6c547b47fd18c0e1aeaf048 F test/savepoint2.test 9b8543940572a2f01a18298c3135ad0c9f4f67d7 @@ -695,7 +695,7 @@ F test/select2.test 352480e0e9c66eda9c3044e412abdf5be0215b56 F test/select3.test 2ce595f8fb8e2ac10071d3b4e424cadd4634a054 F test/select4.test 00179be44e531fe04c1c3f15df216439dff2519d F test/select5.test e758b8ef94f69b111df4cb819008856655dcd535 -F test/select6.test cc25a8650cf9a4d4f74e586c45a75f9836516b18 +F test/select6.test e76bd10a56988f15726c097a5d5a7966fe82d3b2 F test/select7.test dad6f00f0d49728a879d6eb6451d4752db0b0abe F test/select8.test 391de11bdd52339c30580dabbbbe97e3e9a3c79d F test/select9.test c0ca3cd87a8ebb04de2cb1402c77df55d911a0ea @@ -942,7 +942,7 @@ F test/vtab_alter.test 9e374885248f69e251bdaacf480b04a197f125e5 F test/vtab_err.test 0d4d8eb4def1d053ac7c5050df3024fd47a3fbd8 F test/vtab_shared.test 82f463886e18d7f8395a4b6167c91815efe54839 F test/wal.test a040047d7f2b9f34bc4d597964e5e7c09609c635 -F test/wal2.test 7ca814723c487de87d945cdc85c9a0fa45fa8de8 +F test/wal2.test d4b470f13c87f6d8268b004380afa04c3c67cb90 F test/wal3.test b22eb662bcbc148c5f6d956eaf94b047f7afe9c0 F test/wal4.test 4744e155cd6299c6bd99d3eab1c82f77db9cdb3c F test/wal5.test f58ed4b8b542f71c7441da12fbd769d99b362437 @@ -1026,7 +1026,7 @@ F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/win/sqlite.vsix 67d8a99aceb56384a81b3f30d6c71743146d2cc9 -P fc07a4795e027108674d1d41eb4350df629ddc8b 62678be3df35cdcb09172ba8c860f7b73517f1ea -R 664d1e095b40f8d8d9f8fe9cfeed9474 -U drh -Z 3f5ea055e7eaa711939d3a78f8dfab8c +P aa62d6881b5aae64e15dbae70ce8e77bcc2a9f0b 527340abff18aedbcb0f82ac1296a9f548e24ac4 +R ce445dd99f7d73f4997bfaaffd71f58e +U dan +Z b7fa6fd6ef1ab9dd566a694a77a1f165 diff --git a/manifest.uuid b/manifest.uuid index ea071dbcff..56b257152a 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -aa62d6881b5aae64e15dbae70ce8e77bcc2a9f0b \ No newline at end of file +87995dc9409482f0a7a367bfc51d78ac0f63b8c3 \ No newline at end of file diff --git a/src/btree.c b/src/btree.c index 1c2e26ff79..47dd7db99d 100644 --- a/src/btree.c +++ b/src/btree.c @@ -6083,7 +6083,7 @@ static int balance_nonroot( /* ** Load pointers to all cells on sibling pages and the divider cells ** into the local apCell[] array. Make copies of the divider cells - ** into space obtained from aSpace1[] and remove the the divider Cells + ** into space obtained from aSpace1[] and remove the divider cells ** from pParent. ** ** If the siblings are on leaf pages, then the child pointers of the diff --git a/src/build.c b/src/build.c index c7ad2d1e70..25e474031f 100644 --- a/src/build.c +++ b/src/build.c @@ -2536,7 +2536,7 @@ Index *sqlite3CreateIndex( assert( pName && pName->z ); #ifndef SQLITE_OMIT_TEMPDB - /* If the index name was unqualified, check if the the table + /* If the index name was unqualified, check if the table ** is a temp table. If so, set the database to 1. Do not do this ** if initialising a database schema. */ diff --git a/src/insert.c b/src/insert.c index 9357c657e8..a2da0259ff 100644 --- a/src/insert.c +++ b/src/insert.c @@ -1271,7 +1271,7 @@ void sqlite3GenerateConstraintChecks( case OE_Replace: { /* If there are DELETE triggers on this table and the ** recursive-triggers flag is set, call GenerateRowDelete() to - ** remove the conflicting row from the the table. This will fire + ** remove the conflicting row from the table. This will fire ** the triggers and remove both the table and index b-tree entries. ** ** Otherwise, if there are no triggers or the recursive-triggers diff --git a/src/os_unix.c b/src/os_unix.c index a0326c963e..c0df66e8e0 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -1052,7 +1052,7 @@ static unixInodeInfo *inodeList = 0; ** The first argument passed to the macro should be the error code that ** will be returned to SQLite (e.g. SQLITE_IOERR_DELETE, SQLITE_CANTOPEN). ** The two subsequent arguments should be the name of the OS function that -** failed (e.g. "unlink", "open") and the the associated file-system path, +** failed (e.g. "unlink", "open") and the associated file-system path, ** if any. */ #define unixLogError(a,b,c) unixLogErrorAtLine(a,b,c,__LINE__) @@ -1075,7 +1075,7 @@ static int unixLogErrorAtLine( zErr = aErr; /* If STRERROR_R_CHAR_P (set by autoconf scripts) or __USE_GNU is defined, - ** assume that the system provides the the GNU version of strerror_r() that + ** assume that the system provides the GNU version of strerror_r() that ** returns a pointer to a buffer containing the error message. That pointer ** may point to aErr[], or it may point to some static storage somewhere. ** Otherwise, assume that the system provides the POSIX version of diff --git a/src/os_win.c b/src/os_win.c index 1beb40b0ce..cbf17b1517 100644 --- a/src/os_win.c +++ b/src/os_win.c @@ -1464,7 +1464,7 @@ static int getLastErrorMsg(DWORD lastErrno, int nBuf, char *zBuf){ ** The first argument passed to the macro should be the error code that ** will be returned to SQLite (e.g. SQLITE_IOERR_DELETE, SQLITE_CANTOPEN). ** The two subsequent arguments should be the name of the OS function that -** failed and the the associated file-system path, if any. +** failed and the associated file-system path, if any. */ #define winLogError(a,b,c,d) winLogErrorAtLine(a,b,c,d,__LINE__) static int winLogErrorAtLine( @@ -3590,6 +3590,13 @@ static int winOpen( assert( id!=0 ); UNUSED_PARAMETER(pVfs); +#if SQLITE_OS_WINRT + if( !sqlite3_temp_directory ){ + sqlite3_log(SQLITE_ERROR, + "sqlite3_temp_directory variable should be set for WinRT"); + } +#endif + pFile->h = INVALID_HANDLE_VALUE; /* If the second argument to this function is NULL, generate a @@ -3903,7 +3910,7 @@ static int winAccess( } }else{ logIoerr(cnt); - if( lastErrno!=ERROR_FILE_NOT_FOUND ){ + if( lastErrno!=ERROR_FILE_NOT_FOUND && lastErrno!=ERROR_PATH_NOT_FOUND ){ winLogError(SQLITE_IOERR_ACCESS, lastErrno, "winAccess", zFilename); sqlite3_free(zConverted); return SQLITE_IOERR_ACCESS; diff --git a/src/pager.c b/src/pager.c index a3f5d6ec2e..09c2a5f90d 100644 --- a/src/pager.c +++ b/src/pager.c @@ -75,7 +75,7 @@ ** ** Definition: Two databases (or the same database at two points it time) ** are said to be "logically equivalent" if they give the same answer to -** all queries. Note in particular the the content of freelist leaf +** all queries. Note in particular the content of freelist leaf ** pages can be changed arbitarily without effecting the logical equivalence ** of the database. ** @@ -3849,7 +3849,7 @@ void sqlite3PagerRef(DbPage *pPg){ ** ** If the Pager.noSync flag is set, then this function is a no-op. ** Otherwise, the actions required depend on the journal-mode and the -** device characteristics of the the file-system, as follows: +** device characteristics of the file-system, as follows: ** ** * If the journal file is an in-memory journal file, no action need ** be taken. diff --git a/src/rowset.c b/src/rowset.c index 58c18b78db..5761f98550 100644 --- a/src/rowset.c +++ b/src/rowset.c @@ -440,7 +440,7 @@ int sqlite3RowSetNext(RowSet *p, i64 *pRowid){ } /* -** Check to see if element iRowid was inserted into the the rowset as +** Check to see if element iRowid was inserted into the rowset as ** part of any insert batch prior to iBatch. Return 1 or 0. ** ** If this is the first test of a new batch and if there exist entires diff --git a/src/select.c b/src/select.c index b3860b0e38..6ec9da39a1 100644 --- a/src/select.c +++ b/src/select.c @@ -1970,7 +1970,7 @@ static int generateOutputSubroutine( } if( pParse->db->mallocFailed ) return 0; - /* Suppress the the first OFFSET entries if there is an OFFSET clause + /* Suppress the first OFFSET entries if there is an OFFSET clause */ codeOffset(v, p, iContinue); @@ -2689,6 +2689,12 @@ static void substSelect( ** operators have an implied DISTINCT which is disallowed by ** restriction (4). ** +** Also, each component of the sub-query must return the same number +** of result columns. This is actually a requirement for any compound +** SELECT statement, but all the code here does is make sure that no +** such (illegal) sub-query is flattened. The caller will detect the +** syntax error and return a detailed message. +** ** (18) If the sub-query is a compound select, then all terms of the ** ORDER by clause of the parent must be simple references to ** columns of the sub-query. @@ -2832,6 +2838,7 @@ static int flattenSubquery( if( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))!=0 || (pSub1->pPrior && pSub1->op!=TK_ALL) || pSub1->pSrc->nSrc<1 + || pSub->pEList->nExpr!=pSub1->pEList->nExpr ){ return 0; } diff --git a/src/shell.c b/src/shell.c index baedcceb59..a17d966245 100644 --- a/src/shell.c +++ b/src/shell.c @@ -64,7 +64,9 @@ # include #define isatty(h) _isatty(h) #define access(f,m) _access((f),(m)) +#undef popen #define popen(a,b) _popen((a),(b)) +#undef pclose #define pclose(x) _pclose(x) #else /* Make sure isatty() has a prototype. diff --git a/src/sqlite.h.in b/src/sqlite.h.in index f30a39b043..31547c6671 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -512,7 +512,7 @@ int sqlite3_exec( ** CAPI3REF: Device Characteristics ** ** The xDeviceCharacteristics method of the [sqlite3_io_methods] -** object returns an integer which is a vector of the these +** object returns an integer which is a vector of these ** bit values expressing I/O characteristics of the mass storage ** device that holds the file that the [sqlite3_io_methods] ** refers to. @@ -2662,6 +2662,12 @@ void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); ** codepage is currently defined. Filenames containing international ** characters must be converted to UTF-8 prior to passing them into ** sqlite3_open() or sqlite3_open_v2(). +** +** Note to Windows Runtime users: The temporary directory must be set +** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various +** features that require the use of temporary files may fail. +** +** See also: [sqlite3_temp_directory] */ int sqlite3_open( const char *filename, /* Database filename (UTF-8) */ @@ -4466,6 +4472,21 @@ int sqlite3_sleep(int); ** Hence, if this variable is modified directly, either it should be ** made NULL or made to point to memory obtained from [sqlite3_malloc] ** or else the use of the [temp_store_directory pragma] should be avoided. +** +** Note to Windows Runtime users: The temporary directory must be set +** prior to calling [sqlite3_open] or [sqlite3_open_v2]. Otherwise, various +** features that require the use of temporary files may fail. Here is an +** example of how to do this using C++ with the Windows Runtime: +** +**
    +** LPCWSTR zPath = Windows::Storage::ApplicationData::Current->
    +**       TemporaryFolder->Path->Data();
    +** char zPathBuf[MAX_PATH + 1];
    +** memset(zPathBuf, 0, sizeof(zPathBuf));
    +** WideCharToMultiByte(CP_UTF8, 0, zPath, -1, zPathBuf, sizeof(zPathBuf),
    +**       NULL, NULL);
    +** sqlite3_temp_directory = sqlite3_mprintf("%s", zPathBuf);
    +** 
    */ SQLITE_EXTERN char *sqlite3_temp_directory; diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 18a5088628..c7280b03c5 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -1925,7 +1925,7 @@ struct WherePlan { /* ** For each nested loop in a WHERE clause implementation, the WhereInfo ** structure contains a single instance of this structure. This structure -** is intended to be private the the where.c module and should not be +** is intended to be private to the where.c module and should not be ** access or modified by other modules. ** ** The pIdxInfo field is used to help pick the best index on a diff --git a/src/test4.c b/src/test4.c index 5c94370a3d..5b4c5a1c17 100644 --- a/src/test4.c +++ b/src/test4.c @@ -9,7 +9,7 @@ ** May you share freely, never taking more than you give. ** ************************************************************************* -** Code for testing the the SQLite library in a multithreaded environment. +** Code for testing the SQLite library in a multithreaded environment. */ #include "sqliteInt.h" #include "tcl.h" diff --git a/src/test_spellfix.c b/src/test_spellfix.c index 68247fed0f..e5fdac42bc 100644 --- a/src/test_spellfix.c +++ b/src/test_spellfix.c @@ -222,7 +222,8 @@ static unsigned char *phoneticHash(const unsigned char *zIn, int nIn){ if( c==CCLASS_SILENT ) continue; cPrevX = c; c = className[c]; - if( c!=zOut[nOut-1] ) zOut[nOut++] = c; + assert( nOut>=0 ); + if( nOut==0 || c!=zOut[nOut-1] ) zOut[nOut++] = c; } zOut[nOut] = 0; return zOut; diff --git a/src/test_vfstrace.c b/src/test_vfstrace.c index 3a0e2cf03e..d2f7455e3d 100644 --- a/src/test_vfstrace.c +++ b/src/test_vfstrace.c @@ -45,7 +45,7 @@ ** interprets VFS calls before passing them off to another VFS which does ** the actual work. In this case the other VFS - the one that does the ** real work - is identified by the second parameter, zOldVfsName. If -** the the 2nd parameter is NULL then the default VFS is used. The common +** the 2nd parameter is NULL then the default VFS is used. The common ** case is for the 2nd parameter to be NULL. ** ** The third and fourth parameters are the pointer to the output function diff --git a/src/trigger.c b/src/trigger.c index 3c4bf62a18..8985ec6eb8 100644 --- a/src/trigger.c +++ b/src/trigger.c @@ -111,7 +111,7 @@ void sqlite3BeginTrigger( iDb = 1; pName = pName1; }else{ - /* Figure out the db that the the trigger will be created in */ + /* Figure out the db that the trigger will be created in */ iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pName); if( iDb<0 ){ goto trigger_cleanup; diff --git a/src/vdbe.c b/src/vdbe.c index 2407984400..2f42ae2600 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -666,7 +666,7 @@ int sqlite3VdbeExec( } #endif - /* On any opcode with the "out2-prerelase" tag, free any + /* On any opcode with the "out2-prerelease" tag, free any ** external allocations out of mem[p2] and set mem[p2] to be ** an undefined integer. Opcodes will either fill in the integer ** value or convert mem[p2] to a different type. diff --git a/src/vdbeaux.c b/src/vdbeaux.c index 79ec08ee40..e722056644 100644 --- a/src/vdbeaux.c +++ b/src/vdbeaux.c @@ -775,7 +775,7 @@ void sqlite3VdbeChangeP4(Vdbe *p, int addr, const char *zP4, int n){ #ifndef NDEBUG /* -** Change the comment on the the most recently coded instruction. Or +** Change the comment on the most recently coded instruction. Or ** insert a No-op and add the comment to that new instruction. This ** makes the code easier to read during debugging. None of this happens ** in a production build. diff --git a/src/vtab.c b/src/vtab.c index 0e082a05d9..50d576fc38 100644 --- a/src/vtab.c +++ b/src/vtab.c @@ -131,7 +131,7 @@ void sqlite3VtabUnlock(VTable *pVTab){ assert( db ); assert( pVTab->nRef>0 ); - assert( sqlite3SafetyCheckOk(db) ); + assert( db->magic==SQLITE_MAGIC_OPEN || db->magic==SQLITE_MAGIC_ZOMBIE ); pVTab->nRef--; if( pVTab->nRef==0 ){ diff --git a/src/wal.c b/src/wal.c index 28749fd31e..cc166ba430 100644 --- a/src/wal.c +++ b/src/wal.c @@ -150,7 +150,7 @@ ** more index blocks. ** ** The wal-index header contains the total number of frames within the WAL -** in the the mxFrame field. +** in the mxFrame field. ** ** Each index block except for the first contains information on ** HASHTABLE_NPAGE frames. The first index block contains information on diff --git a/src/where.c b/src/where.c index a460abc2d7..9bbbd43d10 100644 --- a/src/where.c +++ b/src/where.c @@ -5093,10 +5093,10 @@ WhereInfo *sqlite3WhereBegin( if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 ){ Index *pIx = pLevel->plan.u.pIdx; KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIx); - int iIdxCur = pLevel->iIdxCur; + int iIndexCur = pLevel->iIdxCur; assert( pIx->pSchema==pTab->pSchema ); - assert( iIdxCur>=0 ); - sqlite3VdbeAddOp4(v, OP_OpenRead, iIdxCur, pIx->tnum, iDb, + assert( iIndexCur>=0 ); + sqlite3VdbeAddOp4(v, OP_OpenRead, iIndexCur, pIx->tnum, iDb, (char*)pKey, P4_KEYINFO_HANDOFF); VdbeComment((v, "%s", pIx->zName)); } diff --git a/test/crash.test b/test/crash.test index f644dcaf73..c1901daec6 100644 --- a/test/crash.test +++ b/test/crash.test @@ -119,7 +119,7 @@ do_test crash-1.11 { } {0 {}} #-------------------------------------------------------------------------- -# The following tests test recovery when both the database file and the the +# The following tests test recovery when both the database file and the # journal file contain corrupt data. This can happen after pages are # written to the database file before a transaction is committed due to # cache-pressure. diff --git a/test/journal1.test b/test/journal1.test index 2fdadfd68c..c89dd2b4c9 100644 --- a/test/journal1.test +++ b/test/journal1.test @@ -41,7 +41,7 @@ do_test journal1-1.1 { } 8 # Make changes to the database and save the journal file. -# Then delete the database. Replace the the journal file +# Then delete the database. Replace the journal file # and try to create a new database with the same name. The # old journal should not attempt to rollback into the new # database. diff --git a/test/permutations.test b/test/permutations.test index c59eb29cdb..6bbdd9b83f 100644 --- a/test/permutations.test +++ b/test/permutations.test @@ -145,7 +145,7 @@ test_suite "valgrind" -prefix "" -description { Run the "veryquick" test suite with a couple of multi-process tests (that fail under valgrind) omitted. } -files [ - test_set $allquicktests -exclude *malloc* *ioerr* *fault* wal.test + test_set $allquicktests -exclude *malloc* *ioerr* *fault* wal.test atof1.test ] -initialize { set ::G(valgrind) 1 } -shutdown { diff --git a/test/rowid.test b/test/rowid.test index 4a9404defb..5daf581ea6 100644 --- a/test/rowid.test +++ b/test/rowid.test @@ -657,7 +657,7 @@ do_test rowid-11.4 { # Test the automatic generation of rowids when the table already contains # a rowid with the maximum value. # -# Once the the maximum rowid is taken, rowids are normally chosen at +# Once the maximum rowid is taken, rowids are normally chosen at # random. By by reseting the random number generator, we can cause # the rowid guessing loop to collide with prior rowids, and test the # loop out to its limit of 100 iterations. After 100 collisions, the diff --git a/test/select6.test b/test/select6.test index e0ff165c55..64a8519d89 100644 --- a/test/select6.test +++ b/test/select6.test @@ -22,6 +22,7 @@ ifcapable !subquery { finish_test return } +set ::testprefix select6 do_test select6-1.0 { execsql { @@ -513,5 +514,48 @@ do_test select6-9.11 { } {2 12 3 13 4 14} +#------------------------------------------------------------------------- +# Test that if a UNION ALL sub-query that would otherwise be eligible for +# flattening consists of two or more SELECT statements that do not all +# return the same number of result columns, the error is detected. +# +do_execsql_test 10.1 { + CREATE TABLE t(i,j,k); + CREATE TABLE j(l,m); + CREATE TABLE k(o); +} + +set err [list 1 {SELECTs to the left and right of UNION ALL do not have the same number of result columns}] + +do_execsql_test 10.2 { + SELECT * FROM (SELECT * FROM t), j; +} +do_catchsql_test 10.3 { + SELECT * FROM t UNION ALL SELECT * FROM j +} $err +do_catchsql_test 10.4 { + SELECT * FROM (SELECT i FROM t UNION ALL SELECT l, m FROM j) +} $err +do_catchsql_test 10.5 { + SELECT * FROM (SELECT j FROM t UNION ALL SELECT * FROM j) +} $err +do_catchsql_test 10.6 { + SELECT * FROM (SELECT * FROM t UNION ALL SELECT * FROM j) +} $err +do_catchsql_test 10.7 { + SELECT * FROM ( + SELECT * FROM t UNION ALL + SELECT l,m,l FROM j UNION ALL + SELECT * FROM k + ) +} $err +do_catchsql_test 10.8 { + SELECT * FROM ( + SELECT * FROM k UNION ALL + SELECT * FROM t UNION ALL + SELECT l,m,l FROM j + ) +} $err + finish_test diff --git a/test/wal2.test b/test/wal2.test index 22db67991f..4371e988b2 100644 --- a/test/wal2.test +++ b/test/wal2.test @@ -86,7 +86,7 @@ proc incr_tvfs_hdr {file idx incrval} { # # 2. Attempt to read the database using the reader. Before the reader # has a chance to snapshot the wal-index header, increment one -# of the the integer fields (so that the reader ends up with a corrupted +# of the integer fields (so that the reader ends up with a corrupted # header). # # 3. Check that the reader recovers the wal-index and reads the correct