]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Enhancements to the comments on sqlite3FindInIndex(). No code changes.
authordrh <drh@noemail.net>
Tue, 18 Sep 2012 17:08:33 +0000 (17:08 +0000)
committerdrh <drh@noemail.net>
Tue, 18 Sep 2012 17:08:33 +0000 (17:08 +0000)
FossilOrigin-Name: b1a4c394995eb90b3fb43ab204704bda03799303

manifest
manifest.uuid
src/expr.c

index be30a3c7e90f3b54e2df2bc1916d294e3ec10f5f..469e571c7750628cd48b903e017bf302fa8cccd4 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\sthe\sstack_usage.tcl\sscript\sfor\sanalyzing\sthe\soutput\sof\sobjdump\son\sthe\namalgamation\sand\sestimating\sthe\ssizes\sof\sstack\sframes\son\seach\sfunction.
-D 2012-09-18T14:00:54.587
+C Enhancements\sto\sthe\scomments\son\ssqlite3FindInIndex().\s\sNo\scode\schanges.
+D 2012-09-18T17:08:33.701
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 5f4f26109f9d80829122e0e09f9cda008fa065fb
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -130,7 +130,7 @@ F src/complete.c dc1d136c0feee03c2f7550bafc0d29075e36deac
 F src/ctime.c 72a70dcfda75d3a1f81041ce4573e7afddcd8e4e
 F src/date.c 067a81c9942c497aafd2c260e13add8a7d0c7dd4
 F src/delete.c 335f36750dc6ac88d580aa36a6487459be9889de
-F src/expr.c 70ded09d6ac529718aec57589ddb378c23153693
+F src/expr.c f0fc0101879ac92d145f625811f34f647b767f71
 F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb
 F src/fkey.c c82a04e7a92bb728f9ab972b76590403283be2af
 F src/func.c cbb90dc84b22eea25caf39528d342279e61b8898
@@ -1014,7 +1014,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
 F tool/win/sqlite.vsix 67d8a99aceb56384a81b3f30d6c71743146d2cc9
-P e7db056a0d76b2411cadbae077890df189e49414
-R 563f678f5a4a0eeba1c7bc783391bc58
+P 030013ff0c7af5f146a64f9ede31297ff003e0c4
+R 52fabcd4dbff22d0436068b591f13147
 U drh
-Z 77a009fbade94f20c493a281c0066dcb
+Z 0c0f749b44c88277a286b4f0b71de6ea
index 6adf74d6ac959b22486d84182fc9b2d7a5a9d3ce..9a4110e2ab9e5029ad4e55b7a1605eacd44f9a78 100644 (file)
@@ -1 +1 @@
-030013ff0c7af5f146a64f9ede31297ff003e0c4
\ No newline at end of file
+b1a4c394995eb90b3fb43ab204704bda03799303
\ No newline at end of file
index 3fb51cf11f60270fdfa6a5eff31d1227a5fdb713..36dec2c846d18bc9d4c0a2a692235a91a1233f10 100644 (file)
@@ -1420,12 +1420,16 @@ int sqlite3CodeOnce(Parse *pParse){
 
 /*
 ** This function is used by the implementation of the IN (...) operator.
-** It's job is to find or create a b-tree structure that may be used
-** either to test for membership of the (...) set or to iterate through
-** its members, skipping duplicates.
+** The pX parameter is the expression on the RHS of the IN operator, which
+** might be either a list of expressions or a subquery.
+**
+** The job of this routine is to find or create a b-tree object that can
+** be used either to test for membership in the RHS set or to iterate through
+** all members of the RHS set, skipping duplicates.
+**
+** A cursor is opened on the b-tree object that the RHS of the IN operator
+** and pX->iTable is set to the index of that cursor.
 **
-** The index of the cursor opened on the b-tree (database table, database index 
-** or ephermal table) is stored in pX->iTable before this function returns.
 ** The returned value of this function indicates the b-tree type, as follows:
 **
 **   IN_INDEX_ROWID - The cursor was opened on a database table.
@@ -1433,11 +1437,16 @@ int sqlite3CodeOnce(Parse *pParse){
 **   IN_INDEX_EPH -   The cursor was opened on a specially created and
 **                    populated epheremal table.
 **
-** An existing b-tree may only be used if the SELECT is of the simple
-** form:
+** An existing b-tree might be used if the RHS expression pX is a simple
+** subquery such as:
 **
 **     SELECT <column> FROM <table>
 **
+** If the RHS of the IN operator is a list or a more complex subquery, then
+** an ephemeral table might need to be generated from the RHS and then
+** pX->iTable made to point to the ephermeral table instead of an
+** existing table.  
+**
 ** If the prNotFound parameter is 0, then the b-tree will be used to iterate
 ** through the set members, skipping any duplicates. In this case an
 ** epheremal table must be used unless the selected <column> is guaranteed