]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Improved comment on the codeDeferredSeek() routine. No code changes.
authordrh <>
Fri, 25 Feb 2022 13:29:56 +0000 (13:29 +0000)
committerdrh <>
Fri, 25 Feb 2022 13:29:56 +0000 (13:29 +0000)
FossilOrigin-Name: 54f49f65ac943263a1622b1efe519c8a61f30f23694fd4fec89ad2bf0e17b473

manifest
manifest.uuid
src/wherecode.c

index d5960c30c238c13e81b3c7440eb5e849b87771e5..e6c22fe8554fc8c9c5396932f92f39e41d63bb48 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sunimportant\stypos\sin\scomment\stext.
-D 2022-02-25T11:30:29.835
+C Improved\scomment\son\sthe\scodeDeferredSeek()\sroutine.\sNo\scode\schanges.
+D 2022-02-25T13:29:56.636
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -641,7 +641,7 @@ F src/wal.h c3aa7825bfa2fe0d85bef2db94655f99870a285778baa36307c0a16da32b226a
 F src/walker.c f890a3298418d7cba3b69b8803594fdc484ea241206a8dfa99db6dd36f8cbb3b
 F src/where.c 0d75d7514764726409ea945520fe9fb515e7d9ae52a5a3c0a136142cfaa19087
 F src/whereInt.h 15d2975c3b4c193c78c26674400a840da8647fe1777ae3b026e2d15937b38a03
-F src/wherecode.c 6150f51c0368be941fad90a736ce37cc1e2a719876750a3183a516ed256a4cbb
+F src/wherecode.c d34d3980f35e504a558f788ad9ac4bc6876b119409d597e7e234a4564a94c6ab
 F src/whereexpr.c 2a71f5491798460c9590317329234d332d9eb1717cba4f3403122189a75c465e
 F src/window.c dfaec4abc6012cbc18e4a202ca3a5d5a0efcc4011d86a06d882ddaab8aedee4d
 F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
@@ -1944,8 +1944,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P ad1be34828726bfef0dbc0ce16090400cf3530e7b5077849af96774d7428387b
-R a4beb76483336f72fca390718a058877
+P 393460132994d6ca133e52af57374e43a2795a9e7fc7781bd9dea752a2b52c6a
+R 9d513bd798b81de21bb7dd572470a8e8
 U drh
-Z e5f1864550275862aa2798467c9b0f60
+Z bd0ff582d66826c917840ae517528eb1
 # Remove this line to create a well-formed Fossil manifest.
index 7d6b60bd57605d0f595a83ff20ef5642765568f5..0e6e71b15efdadeffe4cfd558b6f48bee79f0b10 100644 (file)
@@ -1 +1 @@
-393460132994d6ca133e52af57374e43a2795a9e7fc7781bd9dea752a2b52c6a
\ No newline at end of file
+54f49f65ac943263a1622b1efe519c8a61f30f23694fd4fec89ad2bf0e17b473
\ No newline at end of file
index 79504159a695b8a08e85d35a57f39e7ed0cd342c..ab3b8b18e1421d6d10231cc4646bb238493fd9c2 100644 (file)
@@ -1118,13 +1118,21 @@ static void codeCursorHint(
 **
 **   OP_DeferredSeek $iCur $iRowid
 **
+** Which causes a seek on $iCur to the row with rowid $iRowid.
+**
 ** However, if the scan currently being coded is a branch of an OR-loop and
-** the statement currently being coded is a SELECT, then P3 of OP_DeferredSeek
-** is set to iIdxCur and P4 is set to point to an array of integers
-** containing one entry for each column of the table cursor iCur is open 
-** on. For each table column, if the column is the i'th column of the 
-** index, then the corresponding array entry is set to (i+1). If the column
-** does not appear in the index at all, the array entry is set to 0.
+** the statement currently being coded is a SELECT, then additional information
+** is added that might allow OP_Column to omit the seek and instead do its
+** lookup on the index, thus avoiding an expensive seek operation.  To
+** enable this optimization, the P3 of OP_DeferredSeek is set to iIdxCur
+** and P4 is set to an array of integers containing one entry for each column
+** in the table.  For each table column, if the column is the i'th
+** column of the index, then the corresponding array entry is set to (i+1).
+** If the column does not appear in the index at all, the array entry is set
+** to 0.  The OP_Column opcode can check this array to see if the column it
+** wants is in the index and if it is, it will substitute the index cursor
+** and column number and continue with those new values, rather than seeking
+** the table cursor.
 */
 static void codeDeferredSeek(
   WhereInfo *pWInfo,              /* Where clause context */