[tracker] libtracker-data: Allow using older sqlite API
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Allow using older sqlite API
- Date: Thu, 29 Jun 2017 19:20:43 +0000 (UTC)
commit c2213802d7171bf73b56a61293793fb6db9eb6cd
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Jun 29 21:17:57 2017 +0200
libtracker-data: Allow using older sqlite API
But warn about it, as it is unsafe.
src/libtracker-data/tracker-db-interface-sqlite.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-db-interface-sqlite.c
b/src/libtracker-data/tracker-db-interface-sqlite.c
index eb7d70e..051f6d8 100644
--- a/src/libtracker-data/tracker-db-interface-sqlite.c
+++ b/src/libtracker-data/tracker-db-interface-sqlite.c
@@ -1478,7 +1478,13 @@ open_database (TrackerDBInterface *db_interface,
sqlite3_extended_result_codes (db_interface->db, 0);
sqlite3_busy_timeout (db_interface->db, 100000);
+
+#ifndef SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION
+#warning Using sqlite3_enable_load_extension instead of SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, this is unsafe
+ sqlite3_enable_load_extension (db_interface->db, 1);
+#else
sqlite3_db_config (db_interface->db, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, 1, NULL);
+#endif
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]