Exclude cipher_profile support with SQLITE_OMIT_TRACE or SQLITE_OMIT_DEPRECATED

This commit is contained in:
Nick Parker 2017-03-09 13:44:34 -06:00
parent 5f9fc6f45f
commit 339f4d3ffe

View File

@ -1209,6 +1209,9 @@ int sqlcipher_codec_add_random(codec_ctx *ctx, const char *zRight, int random_sz
}
int sqlcipher_cipher_profile(sqlite3 *db, const char *destination){
#if defined(SQLITE_OMIT_TRACE) || defined(SQLITE_OMIT_DEPRECATED)
return SQLITE_ERROR;
#else
FILE *f;
if(sqlite3StrICmp(destination, "stdout") == 0){
f = stdout;
@ -1229,6 +1232,7 @@ int sqlcipher_cipher_profile(sqlite3 *db, const char *destination){
}
sqlite3_profile(db, sqlcipher_profile_callback, f);
return SQLITE_OK;
#endif
}
static void sqlcipher_profile_callback(void *file, const char *sql, sqlite3_uint64 run_time){