From: drh Date: Wed, 3 May 2017 15:54:53 +0000 (+0000) Subject: Always enable URI filenames when compiling with SQLITE_HAS_CODEC. Also allow X-Git-Tag: version-3.19.0~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ad012d09dc3ef80fb041bcbe1afa7d85ae72daee;p=thirdparty%2Fsqlite.git Always enable URI filenames when compiling with SQLITE_HAS_CODEC. Also allow plaintext keys using the key= query parameter. FossilOrigin-Name: 31a51b4d168065fa59cc0e52ba798bd87ac82160c675bd531442b65133edb401 --- diff --git a/manifest b/manifest index 84aba2e596..834674808b 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sthe\sfts3EvalAverageDocsize()\sroutine\sso\sthat\sit\sreturns\serrors\sfrom\nsqlite3_reset()\srather\sthan\salways\sreturning\sSQLITE_OK. -D 2017-05-02T18:00:31.645 +C Always\senable\sURI\sfilenames\swhen\scompiling\swith\sSQLITE_HAS_CODEC.\s\sAlso\sallow\nplaintext\skeys\susing\sthe\skey=\squery\sparameter. +D 2017-05-03T15:54:53.280 F Makefile.in 1cc758ce3374a32425e4d130c2fe7b026b20de5b8843243de75f087c0a2661fb F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 6a8c838220f7c00820e1fc0ac1bccaaa8e5676067e1dbfa1bafa7a4ffecf8ae6 @@ -359,7 +359,7 @@ F src/expr.c 965f5e6074ee61cf933be079c6a443c88414490c13ec270b5baaacaa920280fa F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007 F src/fkey.c db65492ae549c3b548c9ef1f279ce1684f1c473b116e1c56a90878cd5dcf968d F src/func.c 9d52522cc8ae7f5cdadfe14594262f1618bc1f86083c4cd6da861b4cf5af6174 -F src/global.c 4a34512d82fc5aa13c802db06bcfff5e1d3de955 +F src/global.c 8a6ab6b4d91effb96ffa81b39f0d70c862abca157f8aaa194600a4a8b7923344 F src/hash.c 63d0ee752a3b92d4695b2b1f5259c4621b2cfebd F src/hash.h ab34c5c54a9e9de2e790b24349ba5aab3dbb4fd4 F src/hwtime.h 747c1bbe9df21a92e9c50f3bbec1de841dc5e5da @@ -367,7 +367,7 @@ F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71 F src/insert.c d4bb3a135948553d18cf992f76f7ed7b18aa0327f250607b5a6671e55d9947d5 F src/legacy.c e88ed13c2d531decde75d42c2e35623fb9ce3cb0 F src/loadext.c a72909474dadce771d3669bf84bf689424f6f87d471fee898589c3ef9b2acfd9 -F src/main.c 158326243c5ddc8b98a1e983fa488650cf76d760 +F src/main.c 1e448d204045c1dcd604853639d9d8fe253aa9ec302a2f1ffd2e22752fd6b708 F src/malloc.c e20bb2b48abec52d3faf01cce12e8b4f95973755fafec98d45162dfdab111978 F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645 F src/mem1.c c12a42539b1ba105e3707d0e628ad70e611040d8f5e38cf942cee30c867083de @@ -1578,7 +1578,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 9e35c89dbe744312f612e507b51ff9a5bb656def75392d25bc19fc638548cd1e -R ff82b9e0856a749852e0a40a30515627 +P 430f539cbb3f806fb89191e0b759a5f8b49d9e5b6c95fe9a4b55a1aa0875762a +R 9361fb55741f5070a358ac5ee22a5ad4 U drh -Z a7183f9c248f45ecd3f1461fb3e694c7 +Z 6969a550096004330a93c292edb36e97 diff --git a/manifest.uuid b/manifest.uuid index ee0d3109c4..3d5674cd54 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -430f539cbb3f806fb89191e0b759a5f8b49d9e5b6c95fe9a4b55a1aa0875762a \ No newline at end of file +31a51b4d168065fa59cc0e52ba798bd87ac82160c675bd531442b65133edb401 \ No newline at end of file diff --git a/src/global.c b/src/global.c index a105135561..fe63bbe140 100644 --- a/src/global.c +++ b/src/global.c @@ -137,9 +137,16 @@ const unsigned char sqlite3CtypeMap[256] = { ** EVIDENCE-OF: R-43642-56306 By default, URI handling is globally ** disabled. The default value may be changed by compiling with the ** SQLITE_USE_URI symbol defined. +** +** URI filenames are enabled by default if SQLITE_HAS_CODEC is +** enabled. */ #ifndef SQLITE_USE_URI -# define SQLITE_USE_URI 0 +# ifdef SQLITE_HAS_CODEC +# define SQLITE_USE_URI 1 +# else +# define SQLITE_USE_URI 0 +# endif #endif /* EVIDENCE-OF: R-38720-18127 The default setting is determined by the diff --git a/src/main.c b/src/main.c index 4ac5327e4f..32d00087f5 100644 --- a/src/main.c +++ b/src/main.c @@ -3095,16 +3095,18 @@ opendb_out: #endif #if defined(SQLITE_HAS_CODEC) if( rc==SQLITE_OK ){ - const char *zHexKey = sqlite3_uri_parameter(zOpen, "hexkey"); - if( zHexKey && zHexKey[0] ){ + const char *zKey; + if( (zKey = sqlite3_uri_parameter(zOpen, "hexkey"))!=0 && zKey[0] ){; u8 iByte; int i; - char zKey[40]; - for(i=0, iByte=0; i