Commit 7bb2bdfb authored by Carlos Garnacho's avatar Carlos Garnacho

libtracker-data: Add quotes around string literal

If the query is not cacheable, we were adding string literals unquoted.
Oops.
parent 5d186707
Pipeline #56665 passed with stage
in 2 minutes and 9 seconds
......@@ -465,6 +465,8 @@ _append_literal_sql (TrackerSparql *sparql,
if (!sparql->cacheable) {
gchar *escaped, *full_str;
_append_string (sparql, "\"");
switch (TRACKER_BINDING (binding)->data_type) {
case TRACKER_PROPERTY_TYPE_DATE:
full_str = g_strdup_printf ("%sT00:00:00Z", binding->literal);
......@@ -494,6 +496,8 @@ _append_literal_sql (TrackerSparql *sparql,
_append_string (sparql, binding->literal);
break;
}
_append_string (sparql, "\"");
} else {
_append_string_printf (sparql, "?%d ", idx + 1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment