1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-03 08:01:19 +03:00

Begin making changes to the IN operator in an attempt to make it run faster

and to make the code easier to understand.

FossilOrigin-Name: ee0fd6aaf94cda1dce3fe752bfe3b0f83e0043f1
This commit is contained in:
drh
2014-08-01 14:46:57 +00:00
parent cefc87fca5
commit 3a85625d87
5 changed files with 66 additions and 41 deletions

View File

@@ -3591,11 +3591,21 @@ const char *sqlite3JournalModename(int);
#define sqlite3EndBenignMalloc()
#endif
#define IN_INDEX_ROWID 1
#define IN_INDEX_EPH 2
#define IN_INDEX_INDEX_ASC 3
#define IN_INDEX_INDEX_DESC 4
int sqlite3FindInIndex(Parse *, Expr *, int*);
/*
** Allowed return values from sqlite3FindInIndex()
*/
#define IN_INDEX_ROWID 1 /* Search the rowid of the table */
#define IN_INDEX_EPH 2 /* Search an ephemeral b-tree */
#define IN_INDEX_INDEX_ASC 3 /* Existing index ASCENDING */
#define IN_INDEX_INDEX_DESC 4 /* Existing index DESCENDING */
#define IN_INDEX_NOOP 5 /* No table available. Use comparisons */
/*
** Allowed flags for the 3rd parameter to sqlite3FindInIndex().
*/
#define IN_INDEX_NOOP_OK 0x0001 /* OK to return IN_INDEX_NOOP */
#define IN_INDEX_MEMBERSHIP 0x0002 /* IN operator used for membership test */
#define IN_INDEX_LOOP 0x0004 /* IN operator used as a loop */
int sqlite3FindInIndex(Parse *, Expr *, u32, int*);
#ifdef SQLITE_ENABLE_ATOMIC_WRITE
int sqlite3JournalOpen(sqlite3_vfs *, const char *, sqlite3_file *, int, int);