From: drh Date: Thu, 25 Aug 2016 17:47:36 +0000 (+0000) Subject: Another fix in the IN-operator algorithm description. X-Git-Tag: version-3.15.0~110^2~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0a1082aec2a46e1189a6ccf8ca1edfc10c6681be;p=thirdparty%2Fsqlite.git Another fix in the IN-operator algorithm description. FossilOrigin-Name: f474aeac4fa62d87e73189868d7c7a295ffb7265 --- diff --git a/manifest b/manifest index 9f1b129892..6410765471 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Further\srefinement\sof\sthe\sin-operator.md\sdocumentation. -D 2016-08-25T17:40:32.626 +C Another\sfix\sin\sthe\sIN-operator\salgorithm\sdescription. +D 2016-08-25T17:47:36.711 F Makefile.in cfd8fb987cd7a6af046daa87daa146d5aad0e088 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc d66d0395c38571aab3804f8db0fa20707ae4609a @@ -346,7 +346,7 @@ F src/global.c c45ea22aff29334f6a9ec549235ac3357c970015 F src/hash.c 55b5fb474100cee0b901edaf203e26c970940f36 F src/hash.h ab34c5c54a9e9de2e790b24349ba5aab3dbb4fd4 F src/hwtime.h 747c1bbe9df21a92e9c50f3bbec1de841dc5e5da -F src/in-operator.md 9627b332c40228c0cb756eff1d84471b397539be +F src/in-operator.md e74c3dbd32b765c22c0bfc023f3b867e841a292b F src/insert.c a255eb795cf475e7a0659297144fc80f70eb4e30 F src/legacy.c 75d3023be8f0d2b99d60f905090341a03358c58e F src/loadext.c dd7a2b77902cc66c22555aef02e1a682554b7aec @@ -1521,7 +1521,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 b6344298783a1207cba3f635939ddc9ba922ab67 -R 0bc7dc0041a27b5ec53385d0f7163e25 +P df0648373a50006ca18d692e12552d1d53d549e3 +R 5563c2646a49e89461278dffc729d682 U drh -Z 0df057355417cbdb73d372028cbbe733 +Z f4cbbe9a35f7af77488dc4e4d3d948a7 diff --git a/manifest.uuid b/manifest.uuid index fa403130a1..53efcbce1d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -df0648373a50006ca18d692e12552d1d53d549e3 \ No newline at end of file +f474aeac4fa62d87e73189868d7c7a295ffb7265 \ No newline at end of file diff --git a/src/in-operator.md b/src/in-operator.md index ecd0b97e3a..ff691864b0 100644 --- a/src/in-operator.md +++ b/src/in-operator.md @@ -77,16 +77,16 @@ is the algorithm that is implemented in SQLite. driving a loop, then skip this step entirely. 2. Check the LHS to see if it is a partial-NULL and if it is, jump - ahead to step 4. + ahead to step 5. - 3. Do a binary search for the RHS using the LHS as a probe. If + 3. Do a binary search of the RHS using the LHS as a probe. If an exact match is found, return TRUE. - 4. If we do not need to distingish between FALSE and NULL, - then return FALSE. - - 5. If the RHS is non-NULL then return FALSE. + 4. If the RHS is non-NULL then return FALSE. + 5. If we do not need to distingish between FALSE and NULL, + then return FALSE. + 6. For each row in the RHS, compare that row against the LHS and if the result is NULL, immediately return NULL. In the case of a scalar IN operator, we only need to look at the very first