sqlite: Show SQLite library version and thread safety flag during startup

This commit is contained in:
Martin Willi 2015-04-10 13:36:26 +02:00
parent d20be3fa28
commit 4e621ada96
1 changed files with 8 additions and 1 deletions

View File

@ -16,6 +16,7 @@
#include "sqlite_plugin.h"
#include <library.h>
#include <sqlite3.h>
#include "sqlite_database.h"
typedef struct private_sqlite_plugin_t private_sqlite_plugin_t;
@ -60,6 +61,7 @@ METHOD(plugin_t, destroy, void,
plugin_t *sqlite_plugin_create()
{
private_sqlite_plugin_t *this;
int threadsave = 0;
INIT(this,
.public = {
@ -71,6 +73,11 @@ plugin_t *sqlite_plugin_create()
},
);
#if SQLITE_VERSION_NUMBER >= 3005000
threadsave = sqlite3_threadsafe();
#endif
DBG2(DBG_LIB, "using SQLite %s, thread safety %d",
sqlite3_libversion(), threadsave);
return &this->public.plugin;
}