[tracker/tracker-0.10] libtracker-data: Error when OFFSET, LIMIT, etc are used with ASK
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.10] libtracker-data: Error when OFFSET, LIMIT, etc are used with ASK
- Date: Thu, 14 Apr 2011 15:16:11 +0000 (UTC)
commit 6f9ed5eb974de1971bdaa677f41143b9c06b9207
Author: Philip Van Hoof <philip codeminded be>
Date: Mon Apr 11 14:03:19 2011 +0200
libtracker-data: Error when OFFSET, LIMIT, etc are used with ASK
src/libtracker-data/tracker-sparql-query.vala | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-sparql-query.vala b/src/libtracker-data/tracker-sparql-query.vala
index 397779e..79e8bcb 100644
--- a/src/libtracker-data/tracker-sparql-query.vala
+++ b/src/libtracker-data/tracker-sparql-query.vala
@@ -552,6 +552,11 @@ public class Tracker.Sparql.Query : Object {
sql.append (pattern_sql.str);
sql.append (" ) WHEN 1 THEN 'true' WHEN 0 THEN 'false' ELSE NULL END");
+ if (accept (SparqlTokenType.GROUP) || accept (SparqlTokenType.ORDER) ||
+ accept (SparqlTokenType.OFFSET) || accept (SparqlTokenType.LIMIT)) {
+ throw get_error ("invalid use of %s in ASK".printf (last().to_string()));
+ }
+
context = context.parent_context;
return sql.str;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]