1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-25 20:58:26 +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

@@ -13,7 +13,7 @@
** is not included in the SQLite library. It is used for automated
** testing of the SQLite library.
**
** $Id: test1.c,v 1.116 2004/11/20 19:18:01 drh Exp $
** $Id: test1.c,v 1.117 2004/11/22 19:12:21 drh Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
@@ -2552,6 +2552,12 @@ static void set_options(Tcl_Interp *interp){
Tcl_SetVar2(interp, "sqlite_options", "conflict", "1", TCL_GLOBAL_ONLY);
#endif
#ifdef SQLITE_OMIT_CURSOR
Tcl_SetVar2(interp, "sqlite_options", "cursor", "0", TCL_GLOBAL_ONLY);
#else
Tcl_SetVar2(interp, "sqlite_options", "cursor", "1", TCL_GLOBAL_ONLY);
#endif
#ifdef SQLITE_OMIT_DATETIME_FUNCS
Tcl_SetVar2(interp, "sqlite_options", "datetime", "0", TCL_GLOBAL_ONLY);
#else