[tracker/rss-enclosures] libtracker-fts: Make sure to not keep table locked after queries



commit ff3c6ac20255ff75d2abfb30a099edc12e8b2144
Author: Jürg Billeter <j bitron ch>
Date:   Thu May 27 14:27:38 2010 +0200

    libtracker-fts: Make sure to not keep table locked after queries

 src/libtracker-fts/tracker-fts.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-fts/tracker-fts.c b/src/libtracker-fts/tracker-fts.c
index 3f42bcd..ee590b2 100644
--- a/src/libtracker-fts/tracker-fts.c
+++ b/src/libtracker-fts/tracker-fts.c
@@ -2487,6 +2487,10 @@ get_metadata_weight (fulltext_vtab *v, int id)
     weight = 1;
   }
 
+  /* We expect only one row.  We must execute another sqlite3_step()
+   * to complete the iteration; otherwise the table will remain locked. */
+  sqlite3_step (stmt);
+
   return weight;
 }
 



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