[tracker/tracker-3.0: 1/4] libtracker-data: Do not error on NULL arguments in tracker:uri-is-parent
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-3.0: 1/4] libtracker-data: Do not error on NULL arguments in tracker:uri-is-parent
- Date: Thu, 5 Nov 2020 12:57:51 +0000 (UTC)
commit 5ef99cee26d7acc95cb50007fd6235d936d40847
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Nov 4 13:30:41 2020 +0100
libtracker-data: Do not error on NULL arguments in tracker:uri-is-parent
This may happen during query evaluation, without the query explicitly
specifying any NULL value. If we error out, query execution will
definitely stop, and the error may propagate further up.
Just tiptoe over those values, and let query evaluation continue
further, the right results will be eventually returned.
Fixes: https://gitlab.gnome.org/GNOME/tracker/-/issues/235
src/libtracker-data/tracker-db-interface-sqlite.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libtracker-data/tracker-db-interface-sqlite.c
b/src/libtracker-data/tracker-db-interface-sqlite.c
index c6a20a84c..18a174e26 100644
--- a/src/libtracker-data/tracker-db-interface-sqlite.c
+++ b/src/libtracker-data/tracker-db-interface-sqlite.c
@@ -288,7 +288,7 @@ function_sparql_uri_is_parent (sqlite3_context *context,
uri = (gchar *)sqlite3_value_text (argv[1]);
if (!parent || !uri) {
- result_context_function_error (context, fn, "Invalid arguments");
+ sqlite3_result_int (context, FALSE);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]