Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix typos in comments. No changes to code. (CVS 2535) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
d3b03495a46e79a9d82525a61bad99ee |
User & Date: | drh 2005-07-01 11:38:45.000 |
Context
2005-07-06
| ||
13:51 | Fix a quoting problem in the configure script. (CVS 2536) (check-in: b34647a2eb user: drh tags: trunk) | |
2005-07-01
| ||
11:38 | Fix typos in comments. No changes to code. (CVS 2535) (check-in: d3b03495a4 user: drh tags: trunk) | |
2005-06-30
| ||
17:04 | Allow the DEFAULT value of a column to be obtained by calling a function that has constant arguments, such as julianday('now'). (CVS 2534) (check-in: d273766ef2 user: drh tags: trunk) | |
Changes
Changes to src/where.c.
︙ | ︙ | |||
12 13 14 15 16 17 18 | ** This module contains C code that generates VDBE code used to process ** the WHERE clause of SQL statements. This module is reponsible for ** generating the code that loops through a table looking for applicable ** rows. Indices are selected and used to speed the search when doing ** so is applicable. Because this module is responsible for selecting ** indices, you might also think of this module as the "query optimizer". ** | | | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ** This module contains C code that generates VDBE code used to process ** the WHERE clause of SQL statements. This module is reponsible for ** generating the code that loops through a table looking for applicable ** rows. Indices are selected and used to speed the search when doing ** so is applicable. Because this module is responsible for selecting ** indices, you might also think of this module as the "query optimizer". ** ** $Id: where.c,v 1.140 2005/07/01 11:38:45 drh Exp $ */ #include "sqliteInt.h" /* ** The query generator uses an array of instances of this structure to ** help it analyze the subexpressions of the WHERE clause. Each WHERE ** clause subexpression is separated from the others by an AND operator. |
︙ | ︙ | |||
721 722 723 724 725 726 727 | case TK_GT: iDirectGt[i] = j; break; } } } /* If we found a term that tests ROWID with == or IN, that term ** will be used to locate the rows in the database table. There | | | 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 | case TK_GT: iDirectGt[i] = j; break; } } } /* If we found a term that tests ROWID with == or IN, that term ** will be used to locate the rows in the database table. There ** is no need to continue into the code below that looks for ** an index. We will always use the ROWID over an index. */ if( iDirectEq[i]>=0 ){ loopMask |= mask; pLevel->pIdx = 0; continue; } |
︙ | ︙ | |||
834 835 836 837 838 839 840 | ** on the left of the index with == constraints. */ for(nEq=0; nEq<pIdx->nColumn; nEq++){ m = (((Bitmask)1)<<(nEq+1))-1; if( (m & eqMask)!=m ) break; } | | | 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 | ** on the left of the index with == constraints. */ for(nEq=0; nEq<pIdx->nColumn; nEq++){ m = (((Bitmask)1)<<(nEq+1))-1; if( (m & eqMask)!=m ) break; } /* Begin assembling the score */ score = nEq*32; /* Base score is 32 times number of == constraints */ m = ((Bitmask)1)<<nEq; if( m & ltMask ) score+=4; /* Increase score for a < constraint */ if( m & gtMask ) score+=8; /* Increase score for a > constraint */ if( score==0 && inMask ) score = 16; /* Default score for IN constraint */ |
︙ | ︙ |