[tracker] libtracker-data: Bugfix NB#172652, comparing NULL isn't reliable



commit 2c253765da4bebafb2579064b2e81c7a95ca2e1a
Author: Philip Van Hoof <philip codeminded be>
Date:   Mon Jun 7 17:15:18 2010 +0300

    libtracker-data: Bugfix NB#172652, comparing NULL isn't reliable

 src/libtracker-data/tracker-sparql-expression.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-data/tracker-sparql-expression.vala b/src/libtracker-data/tracker-sparql-expression.vala
index 784520a..0d3611c 100644
--- a/src/libtracker-data/tracker-sparql-expression.vala
+++ b/src/libtracker-data/tracker-sparql-expression.vala
@@ -784,7 +784,7 @@ class Tracker.Sparql.Expression : Object {
 			return result;
 		} else {
 			// resource
-			sql.append ("(SELECT ID FROM Resource WHERE Uri = ?)");
+			sql.append ("COALESCE((SELECT ID FROM Resource WHERE Uri = ?), 0)");
 			var binding = new LiteralBinding ();
 			binding.literal = uri;
 			query.bindings.append (binding);



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