diff --git a/manifest b/manifest index b69115a5fc..2c01a256ff 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\snotes\son\sthe\simplementation\sof\sthe\sIN\soperator. -D 2016-08-25T14:00:15.437 +C Corrections\sto\sthe\sIN-operator\snotes. +D 2016-08-25T14:23:59.673 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 8176075ceca5b1a0564d4aff1e415ff6f9037280 +F src/in-operator.md 973fe4522b871fb8cf683d8453760f4f19ac68c8 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 7ae504e62e9bbbbd85a676f3c3922b7fd0cc73d2 -R 85a14e909442e83b4fd5e48b00047186 +P d256b2caeb9e3eb5dd88bb569ec71f91e9991c81 +R e83420368d9fa99d84d7c5701ecba45b U drh -Z fb24d479cf53b7630adc4dea69c62760 +Z a8948efc181e8ffaf5af6c9f4ff55b46 diff --git a/manifest.uuid b/manifest.uuid index 0fc9cd5be3..b1c505cee1 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -d256b2caeb9e3eb5dd88bb569ec71f91e9991c81 \ No newline at end of file +25033ee94538289ba7e0147da30a18300047123f \ No newline at end of file diff --git a/src/in-operator.md b/src/in-operator.md index 76002b8597..0c9480234d 100644 --- a/src/in-operator.md +++ b/src/in-operator.md @@ -62,8 +62,8 @@ algorithm is suboptimal, especially if there are many rows on the RHS. The following procedure computes the same answer as the simple full-scan algorithm, though it does so with less work in the common case. This is the algorithm that is implemented in SQLite. The steps must occur -in the order specified. Except for the INDEX_NOOP optimization of step 1, -none of the steps can be skipped. +in the order specified. Steps 1 and 3 are optional. All other steps +are required for correctness. 1. If the RHS is a constant list of length 1 or 2, then rewrite the IN operator as a simple expression. Implement @@ -80,17 +80,14 @@ none of the steps can be skipped. 2. If the RHS is empty, return FALSE. - 3. If the LHS is a total-NULL or if the RHS contains a total-NULL, - then return NULL. + 3. If the LHS is a total-NULL, then return NULL. 4. If the LHS is non-NULL, then use the LHS as a probe in a binary search of the RHS -
    -
  1. If the binary search finds an exact match, return TRUE + 4-A. If the binary search finds an exact match, return TRUE -
  2. If the RHS is known to be not-null, return FALSE -
+ 4-B. If the RHS is known to be not-null, return FALSE 5. At this point, it is known that the result cannot be TRUE. All that remains is to distinguish between NULL and FALSE.