[tracker] tracker-fts: Fix SQLite error after updates



commit cc361adb7a68b91981076ed2d64fb24a65de69e3
Author: Jürg Billeter <j bitron ch>
Date:   Tue Sep 29 17:04:12 2009 +0200

    tracker-fts: Fix SQLite error after updates

 src/tracker-fts/tracker-fts.c |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/src/tracker-fts/tracker-fts.c b/src/tracker-fts/tracker-fts.c
index b1e4c01..34a66b2 100644
--- a/src/tracker-fts/tracker-fts.c
+++ b/src/tracker-fts/tracker-fts.c
@@ -4189,7 +4189,6 @@ static int fulltextNext(sqlite3_vtab_cursor *pCursor){
       c->eof = 1;
       return SQLITE_OK;
     }
-    rc = sqlite3_bind_int64(c->pStmt, 1, dlrDocid(&c->reader));
     c->currentDocid = dlrDocid(&c->reader);
 #ifdef STORE_CATEGORY
     c->currentCatid = dlrCatid(&c->reader);
@@ -4223,14 +4222,8 @@ static int fulltextNext(sqlite3_vtab_cursor *pCursor){
     dlrStep(&c->reader);
     
     if( rc!=SQLITE_OK ) return rc;
-    /* TODO(shess) Handle SQLITE_SCHEMA AND SQLITE_BUSY. */
-    rc = sqlite3_step(c->pStmt);
-    if( rc==SQLITE_ROW ){   /* the case we expect */
-      c->eof = 0;
-      return SQLITE_OK;
-    }
-    /* an error occurred; abort */
-    return rc==SQLITE_DONE ? SQLITE_ERROR : rc;
+    c->eof = 0;
+    return SQLITE_OK;
   }
 }
 
@@ -4802,7 +4795,7 @@ static int fulltextColumn(sqlite3_vtab_cursor *pCursor,
 static int fulltextRowid(sqlite3_vtab_cursor *pCursor, sqlite_int64 *pRowid){
   fulltext_cursor *c = (fulltext_cursor *) pCursor;
 
-  *pRowid = sqlite3_column_int64(c->pStmt, 0);
+  *pRowid = c->currentDocid;
   return SQLITE_OK;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]