1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-08 03:22:21 +03:00

Add initial infrastructure for cursors. In where.c, optimize out clauses

of the form "ORDER BY rowid" if a table scan is being performed.  Do a
reverse table scan if "ORDER BY rowid DESC" is present. (CVS 2141)

FossilOrigin-Name: fc8c1393c86017a816beb52725b68af3b973f979
This commit is contained in:
drh
2004-11-22 19:12:19 +00:00
parent 8237d45ed8
commit b6c29897eb
17 changed files with 671 additions and 93 deletions

View File

@@ -12,7 +12,7 @@
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
** $Id: expr.c,v 1.172 2004/11/20 20:44:14 drh Exp $
** $Id: expr.c,v 1.173 2004/11/22 19:12:20 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -503,10 +503,10 @@ Select *sqlite3SelectDup(Select *p){
pNew->pPrior = sqlite3SelectDup(p->pPrior);
pNew->nLimit = p->nLimit;
pNew->nOffset = p->nOffset;
pNew->zSelect = 0;
pNew->iLimit = -1;
pNew->iOffset = -1;
pNew->ppOpenTemp = 0;
pNew->pFetch = 0;
return pNew;
}