[tracker/tracker-0.8] libtracker-data: Fixed bug for SPARQL regex
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.8] libtracker-data: Fixed bug for SPARQL regex
- Date: Tue, 6 Apr 2010 12:10:01 +0000 (UTC)
commit e06fec0f15f4878ae983d5a0f200d8225081be8c
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Apr 6 10:50:45 2010 +0200
libtracker-data: Fixed bug for SPARQL regex
SQLite's sqlite3_set_auxdata doesn't work for bound string values for the
regex string. This fix changes the regex from a bound literal to being part
of the SQL query string itself.
src/libtracker-data/tracker-sparql-expression.vala | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-data/tracker-sparql-expression.vala b/src/libtracker-data/tracker-sparql-expression.vala
index 37a2fea..0b28af9 100644
--- a/src/libtracker-data/tracker-sparql-expression.vala
+++ b/src/libtracker-data/tracker-sparql-expression.vala
@@ -240,10 +240,15 @@ class Tracker.Sparql.Expression : Object {
translate_expression_as_string (sql);
sql.append (", ");
expect (SparqlTokenType.COMMA);
- translate_expression (sql);
+ // SQLite's sqlite3_set_auxdata doesn't work correctly with bound
+ // strings for the regex in function_sparql_regex.
+ // translate_expression (sql);
+ sql.append (escape_sql_string_literal (parse_string_literal ()));
sql.append (", ");
if (accept (SparqlTokenType.COMMA)) {
- translate_expression (sql);
+ // Same as above
+ // translate_expression (sql);
+ sql.append (escape_sql_string_literal (parse_string_literal ()));
} else {
sql.append ("''");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]