mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +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:
@@ -14,7 +14,7 @@
|
||||
** other files are for internal use by SQLite and should not be
|
||||
** accessed by users of the library.
|
||||
**
|
||||
** $Id: main.c,v 1.267 2004/11/22 05:26:27 danielk1977 Exp $
|
||||
** $Id: main.c,v 1.268 2004/11/22 19:12:20 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@@ -500,6 +500,13 @@ int sqlite3_close(sqlite3 *db){
|
||||
sqlite3ValueFree(db->pErr);
|
||||
}
|
||||
|
||||
#ifndef SQLITE_OMIT_CURSOR
|
||||
for(j=0; j<db->nSqlCursor; j++){
|
||||
sqlite3CursorDelete(db->apSqlCursor[j]);
|
||||
}
|
||||
sqliteFree(db->apSqlCursor);
|
||||
#endif
|
||||
|
||||
db->magic = SQLITE_MAGIC_ERROR;
|
||||
sqliteFree(db);
|
||||
return SQLITE_OK;
|
||||
|
Reference in New Issue
Block a user