[tracker] libtracker-db: Remove busy loop from tracker_db_cursor_sqlite_iter_next



commit 2b8b289c6d955d58fc5220d59ef0bf5e1bc2469f
Author: Jürg Billeter <j bitron ch>
Date:   Mon May 10 17:01:10 2010 +0200

    libtracker-db: Remove busy loop from tracker_db_cursor_sqlite_iter_next
    
    We already have a busy handler and we should never get SQLITE_LOCKED
    in tracker-store due to the way we handle updates and selects.

 src/libtracker-db/tracker-db-interface-sqlite.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-interface-sqlite.c b/src/libtracker-db/tracker-db-interface-sqlite.c
index 9de297d..c290d16 100644
--- a/src/libtracker-db/tracker-db-interface-sqlite.c
+++ b/src/libtracker-db/tracker-db-interface-sqlite.c
@@ -1174,11 +1174,9 @@ tracker_db_cursor_sqlite_iter_next (TrackerDBCursor *cursor,
 	priv = TRACKER_DB_CURSOR_SQLITE_GET_PRIVATE (cursor);
 
 	if (!priv->finished) {
-		guint result = SQLITE_BUSY;
+		guint result;
 
-		while (result == SQLITE_BUSY || result == SQLITE_LOCKED) {
-			result = sqlite3_step (priv->stmt);
-		}
+		result = sqlite3_step (priv->stmt);
 
 		if (result == SQLITE_INTERRUPT) {
 			g_set_error (error,



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