[tracker] libtracker-data: Define constraint values for older SQLite versions
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Define constraint values for older SQLite versions
- Date: Wed, 6 Feb 2019 09:11:31 +0000 (UTC)
commit d931d7dd70a1a8127c9bfea03d7d8931f7af988d
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Feb 6 10:06:37 2019 +0100
libtracker-data: Define constraint values for older SQLite versions
These were added in sqlite 3.21.0. For the places where updating
SQLite is not easy/possible, just define those. Presumably older
SQLite versions will fall back through other operators in the
xBestIndex method, either way we won't get those from the DB engine.
src/libtracker-data/tracker-vtab-triples.c | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/src/libtracker-data/tracker-vtab-triples.c b/src/libtracker-data/tracker-vtab-triples.c
index 9ff15b628..92a5ff86c 100644
--- a/src/libtracker-data/tracker-vtab-triples.c
+++ b/src/libtracker-data/tracker-vtab-triples.c
@@ -22,6 +22,15 @@
#include "tracker-vtab-triples.h"
+/* Define some constraints for older SQLite, we will never get
+ * those in older versions, and simplifies checks in code.
+ */
+#if SQLITE_VERSION_NUMBER<=3021000
+#define SQLITE_INDEX_CONSTRAINT_NE 68
+#define SQLITE_INDEX_CONSTRAINT_ISNOTNULL 70
+#define SQLITE_INDEX_CONSTRAINT_ISNULL 71
+#endif
+
enum {
COL_ROWID,
COL_GRAPH,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]