/ Check-in [071cabd2]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Clarification of comments on sqlite3FindInIndex(). No changes to code.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 071cabd23cd010180711a138f891a0e358031dd128532def4f62c5764651bace
User & Date: drh 2017-11-17 15:02:00
Context
2017-11-17
17:32
New assert() statements in the rowvalue IN expression processing. check-in: 00c32831 user: drh tags: trunk
15:02
Clarification of comments on sqlite3FindInIndex(). No changes to code. check-in: 071cabd2 user: drh tags: trunk
13:21
Do not count temporary databases that have been attached using ATTACH when figuring out if a master-journal file is required by a transaction. check-in: 93e012a3 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/expr.c.

  2182   2182   **     SELECT <column1>, <column2>... FROM <table>
  2183   2183   **
  2184   2184   ** If the RHS of the IN operator is a list or a more complex subquery, then
  2185   2185   ** an ephemeral table might need to be generated from the RHS and then
  2186   2186   ** pX->iTable made to point to the ephemeral table instead of an
  2187   2187   ** existing table.
  2188   2188   **
  2189         -** The inFlags parameter must contain exactly one of the bits
  2190         -** IN_INDEX_MEMBERSHIP or IN_INDEX_LOOP.  If inFlags contains
  2191         -** IN_INDEX_MEMBERSHIP, then the generated table will be used for a
  2192         -** fast membership test.  When the IN_INDEX_LOOP bit is set, the
  2193         -** IN index will be used to loop over all values of the RHS of the
  2194         -** IN operator.
         2189  +** The inFlags parameter must contain, at a minimum, one of the bits
         2190  +** IN_INDEX_MEMBERSHIP or IN_INDEX_LOOP but not both.  If inFlags contains
         2191  +** IN_INDEX_MEMBERSHIP, then the generated table will be used for a fast
         2192  +** membership test.  When the IN_INDEX_LOOP bit is set, the IN index will
         2193  +** be used to loop over all values of the RHS of the IN operator.
  2195   2194   **
  2196   2195   ** When IN_INDEX_LOOP is used (and the b-tree will be used to iterate
  2197   2196   ** through the set members) then the b-tree must not contain duplicates.
  2198         -** An epheremal table must be used unless the selected columns are guaranteed
         2197  +** An epheremal table will be created unless the selected columns are guaranteed
  2199   2198   ** to be unique - either because it is an INTEGER PRIMARY KEY or due to
  2200   2199   ** a UNIQUE constraint or index.
  2201   2200   **
  2202   2201   ** When IN_INDEX_MEMBERSHIP is used (and the b-tree will be used 
  2203   2202   ** for fast set membership tests) then an epheremal table must 
  2204   2203   ** be used unless <columns> is a single INTEGER PRIMARY KEY column or an 
  2205   2204   ** index can be found with the specified <columns> as its left-most.