[tracker/wip/carlosg/uri-is-parent-checks: 3/3] libtracker-data: Do not error on NULL arguments in tracker:uri-is-parent
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/uri-is-parent-checks: 3/3] libtracker-data: Do not error on NULL arguments in tracker:uri-is-parent
- Date: Thu, 5 Nov 2020 09:50:08 +0000 (UTC)
commit a9689de926d332309c28a59dc7f591ad891b835d
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]