From 4146b4e34a29a1710a343f585460f7372ea1af09 Mon Sep 17 00:00:00 2001 From: drh Date: Wed, 8 Mar 2017 15:03:12 +0000 Subject: [PATCH] Improved comments explaining the sha3_query() format. Fix a performance #ifdef error in the sha3 implementation. FossilOrigin-Name: 54ef7abd7f5b16f4b29c9519d283e142c9340fbf --- ext/misc/shathree.c | 19 +++++++++++++------ manifest | 12 ++++++------ manifest.uuid | 2 +- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/ext/misc/shathree.c b/ext/misc/shathree.c index a27faedb3f..52bfdb0363 100644 --- a/ext/misc/shathree.c +++ b/ext/misc/shathree.c @@ -442,7 +442,7 @@ static void SHA3Update( } #endif for(; iu.x[p->nLoaded] ^= aData[i]; #elif SHA3_BYTEORDER==4321 p->u.x[p->nLoaded^0x07] ^= aData[i]; @@ -556,12 +556,19 @@ static void hash_step_vformat( ** T: ** ** is the original SQL text for each statement run and is -** the size of that text. A single R character occurs before the -** start of each row. N means a NULL value. I mean an 8-byte -** little-endian integer . F is a floating point number with -** an 8-byte little-endian IEEE floating point value . +** the size of that text. The SQL text is UTF-8. A single R character +** occurs before the start of each row. N means a NULL value. +** I mean an 8-byte little-endian integer . F is a floating point +** number with an 8-byte little-endian IEEE floating point value . ** B means blobs of bytes. T means text rendered as -** bytes of UTF-8. +** bytes of UTF-8. The and values are expressed as an ASCII +** text integers. +** +** For each SQL statement in the X input, there is one S segment. Each +** S segment is followed by zero or more R segments, one for each row in the +** result set. After each R, there are one or more N, I, F, B, or T segments, +** one for each column in the result set. Segments are concatentated directly +** with no delimiters of any kind. */ static void sha3QueryFunc( sqlite3_context *context, diff --git a/manifest b/manifest index 1056796a52..a10092847b 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sthe\sshathree.c\sextension\sfor\simplementing\sSHA3()\sand\sSHA3_QUERY()\sSQL\nfunctions. -D 2017-03-08T13:50:40.092 +C Improved\scomments\sexplaining\sthe\ssha3_query()\sformat.\s\sFix\sa\sperformance\s#ifdef\nerror\sin\sthe\ssha3\simplementation. +D 2017-03-08T15:03:12.217 F Makefile.in edb6bcdd37748d2b1c3422ff727c748df7ffe918 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc a89ea37ab5928026001569f056973b9059492fe2 @@ -225,7 +225,7 @@ F ext/misc/rot13.c 1ac6f95f99b575907b9b09c81a349114cf9be45a F ext/misc/scrub.c 1c5bfb8b0cd18b602fcb55755e84abf0023ac2fb F ext/misc/series.c e11e534ada797d5b816d7e7a93c022306563ca35 F ext/misc/sha1.c 0b9e9b855354910d3ca467bf39099d570e73db56 -F ext/misc/shathree.c 465f508eb588e6389a8403fc9cf1e9924dcbc581 w ext/misc/sha3b.c +F ext/misc/shathree.c 38aa4c3c3d3c3fc34b8ea367bed299d8d8a224b2 F ext/misc/showauth.c 732578f0fe4ce42d577e1c86dc89dd14a006ab52 F ext/misc/spellfix.c a4723b6aff748a417b5091b68a46443265c40f0d F ext/misc/totype.c 4a167594e791abeed95e0a8db028822b5e8fe512 @@ -1564,7 +1564,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 de65f907610a59e64cbf2214789c11f7117a86a6 -R 23823589b279aa36324ed0cbad2b7a8d +P f7ca9193ddafd3676406bdfeb1b7d21182c2a3c1 +R 702b29708c528596102031b1a9ef3803 U drh -Z 7be543a90293390e2947c08c40f4663a +Z d26e763b8a8a90fd62d33b05211ec0e3 diff --git a/manifest.uuid b/manifest.uuid index 43cc4100d3..1a49212972 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -f7ca9193ddafd3676406bdfeb1b7d21182c2a3c1 \ No newline at end of file +54ef7abd7f5b16f4b29c9519d283e142c9340fbf \ No newline at end of file -- 2.47.2