aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2024-01-22 12:56:58 +0000
committerdrh <>2024-01-22 12:56:58 +0000
commit776fe42c70fac79657496020b235a9e67fceeec8 (patch)
tree4c39de5b284a6e39ff3efd6eeaf9598febbc4766 /src
parent3b799b0fca14c36b0c2c62a699fea08b05013718 (diff)
downloadsqlite-776fe42c70fac79657496020b235a9e67fceeec8.tar.gz
sqlite-776fe42c70fac79657496020b235a9e67fceeec8.zip
Fix userauth so that it works together with SQLITE_OMIT_SHARED_CACHE.
([forum:/forumpost/0bfc5888a384d430|Forum post 0bfc5888a384d430]). However, also change to code to issue a deprecation warning whenever SQLITE_USER_AUTHENTICATION is used. FossilOrigin-Name: 249048b0cbc37058c229a785182e07b46029584aff9c385269b0b93503153476
Diffstat (limited to 'src')
-rw-r--r--src/build.c2
-rw-r--r--src/sqliteInt.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/build.c b/src/build.c
index a2553da9f..cfa2c886c 100644
--- a/src/build.c
+++ b/src/build.c
@@ -189,7 +189,7 @@ void sqlite3FinishCoding(Parse *pParse){
}
sqlite3VdbeAddOp0(v, OP_Halt);
-#if SQLITE_USER_AUTHENTICATION
+#if SQLITE_USER_AUTHENTICATION && !defined(SQLITE_OMIT_SHARED_CACHE)
if( pParse->nTableLock>0 && db->init.busy==0 ){
sqlite3UserAuthInit(db);
if( db->auth.authLevel<UAUTH_User ){
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 79a36e060..06253cdd2 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -1596,6 +1596,10 @@ struct FuncDefHash {
};
#define SQLITE_FUNC_HASH(C,L) (((C)+(L))%SQLITE_FUNC_HASH_SZ)
+#if defined(SQLITE_USER_AUTHENTICATION)
+# warning "The SQLITE_USER_AUTHENTICATION extension is deprecated. \
+ See ext/userauth/user-auth.txt for details."
+#endif
#ifdef SQLITE_USER_AUTHENTICATION
/*
** Information held in the "sqlite3" database connection object and used