mirror of
https://github.com/status-im/sqlcipher.git
synced 2025-02-23 17:28:17 +00:00
Exclude cipher_profile support with SQLITE_OMIT_TRACE or SQLITE_OMIT_DEPRECATED
This commit is contained in:
parent
5f9fc6f45f
commit
339f4d3ffe
@ -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){
|
int sqlcipher_cipher_profile(sqlite3 *db, const char *destination){
|
||||||
|
#if defined(SQLITE_OMIT_TRACE) || defined(SQLITE_OMIT_DEPRECATED)
|
||||||
|
return SQLITE_ERROR;
|
||||||
|
#else
|
||||||
FILE *f;
|
FILE *f;
|
||||||
if(sqlite3StrICmp(destination, "stdout") == 0){
|
if(sqlite3StrICmp(destination, "stdout") == 0){
|
||||||
f = stdout;
|
f = stdout;
|
||||||
@ -1229,6 +1232,7 @@ int sqlcipher_cipher_profile(sqlite3 *db, const char *destination){
|
|||||||
}
|
}
|
||||||
sqlite3_profile(db, sqlcipher_profile_callback, f);
|
sqlite3_profile(db, sqlcipher_profile_callback, f);
|
||||||
return SQLITE_OK;
|
return SQLITE_OK;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sqlcipher_profile_callback(void *file, const char *sql, sqlite3_uint64 run_time){
|
static void sqlcipher_profile_callback(void *file, const char *sql, sqlite3_uint64 run_time){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user