[tracker/locking] libtracker-db: Remove busy loop from tracker_db_cursor_sqlite_iter_next
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/locking] libtracker-db: Remove busy loop from tracker_db_cursor_sqlite_iter_next
- Date: Mon, 10 May 2010 15:04:02 +0000 (UTC)
commit b6142ee0aacfc919538419f88402559cb27547e8
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]