Skip to contentSkip to conversation

sqlite: Add new compile-time options

PATCH New Stefan Froberg 2 participants 3 messages Aug 12, 2012 – Nov 4, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sqlite: Add new compile-time options

This patch will add the following optional compile-time options to SQLite:

SQLITE_ENABLE_FTS3
SQLITE_ENABLE_UNLOCK_NOTIFY
SQLITE_SECURE_DELETE

To check what compile-time options currently are in your version of SQLite compile the following little test program with:

gcc -o sqlite_check sqlite_check.c -lsqlite3

#include <stdio.h>
#include <sqlite3.h>

int main(void)

{
	int n = 0;
	const char* s = NULL;
	
	printf("Your SQLite has the following compile-time options:\n");
	do {
		s = sqlite3_compileoption_get(n++);
		if(s != NULL)
			printf("%s\n",s);
	} while(s != NULL);

	return(0);
}
#1 lore raw

PATCH 1/1 sqlite: Add new compile-time options

---
 package/sqlite/Config.in |   34 ++++++++++++++++++++++++++++++++++
 package/sqlite/sqlite.mk |   12 ++++++++++++
 2 files changed, 46 insertions(+), 0 deletions(-)
package/sqlite/Config.in +34 -0
index 25aaa3f..75bce70 100644
@@ -22,3 +22,37 @@ config BR2_PACKAGE_SQLITE_STAT3
 	  planner that can help SQLite to choose a better query plan under
 	  certain situations.
 
+config BR2_PACKAGE_SQLITE_ENABLE_FTS3
+	bool "Enables version 3 of the full-text search engine"
+	depends on BR2_PACKAGE_SQLITE
+	help
+	  When this option is defined in the amalgamation 
+	  (see http://www.sqlite.org/amalgamation.html), version 3 of
+	  the full-text search engine is added to the build automatically.
+
+config BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY
+	bool "Enables sqlite3_unlock_notify() interface"
+	depends on BR2_PACKAGE_SQLITE
+	help
+	  This option enables the sqlite3_unlock_notify() interface and its
+	  accosiated functionality. See the documentation 
+	  http://www.sqlite.org/unlock_notify.html for additional information.
+
+config BR2_PACKAGE_SQLITE_SECURE_DELETE
+	bool "Sets the secure_delete pragma on by default"
+	depends on BR2_PACKAGE_SQLITE
+	help
+	  This compile-time option changes the default settings of the
+	  secure_delete pragma. When this option is not used, secure_delete
+	  defaults to off. When this option is present, secure_delete defaults
+	  to on.
+
+	  The secure_delete setting causes deleted content to be overwritten
+	  with zeros. There is a small performance penalty for this since 
+	  additional I/O must occur. On the other hand, secure_delete can
+	  prevent sensitive information from lingering in unused parts 
+	  of the database file after it has allegedly been deleted.
+	  See the documentation on the 
+	  http://www.sqlite.org/pragma.html#pragma_secure_delete
+	  for additional information.
+
package/sqlite/sqlite.mk +12 -0
index 9e63b52..745bf2a 100644
@@ -20,6 +20,18 @@ ifeq ($(BR2_PACKAGE_SQLITE_STAT3),y)
 SQLITE_CFLAGS += -DSQLITE_ENABLE_STAT3
 endif
 
+ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_FTS3),y)
+SQLITE_CFLAGS += -DSQLITE_ENABLE_FTS3
+endif
+
+ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY),y)
+SQLITE_CFLAGS += -DSQLITE_ENABLE_UNLOCK_NOTIFY
+endif
+
+ifeq ($(BR2_PACKAGE_SQLITE_SECURE_DELETE),y)
+SQLITE_CFLAGS += -DSQLITE_SECURE_DELETE
+endif
+
 SQLITE_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) $(SQLITE_CFLAGS)"
 
 SQLITE_CONF_OPT = \
Signature · 1 line
1.7.7.6
#2 lore raw

PATCH 1/1 sqlite: Add new compile-time options

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Stefan" == Stefan Froberg <[email protected]> writes:

Stefan> Signed-off-by: Stefan Froberg <[email protected]>

Committed with some minor whitespace/wording tweaks, thanks.

Signature · 1 line
Bye, Peter Korsgaard