Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix userauth so that it works together with SQLITE_OMIT_SHARED_CACHE. (Forum post 0bfc5888a384d430). However, also change to code to issue a deprecation warning whenever SQLITE_USER_AUTHENTICATION is used. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
249048b0cbc37058c229a785182e07b4 |
User & Date: | drh 2024-01-22 12:56:58.708 |
Context
2024-01-22
| ||
14:01 | Fix test script literal.test so that it works with SQLITE_OMIT_ALTER_TABLE builds. (check-in: 4dc00f5776 user: dan tags: trunk) | |
12:56 | Fix userauth so that it works together with SQLITE_OMIT_SHARED_CACHE. (Forum post 0bfc5888a384d430). However, also change to code to issue a deprecation warning whenever SQLITE_USER_AUTHENTICATION is used. (check-in: 249048b0cb user: drh tags: trunk) | |
12:30 | Add a notice to the user-authentication documentation to say that the extension is deprecated and may disappear in the future. (check-in: fe6fc7b91a user: drh tags: trunk) | |
Changes
Changes to ext/userauth/user-auth.txt.
1 2 3 4 5 6 | *********************************** NOTICE ************************************ * This extension is deprecated. The SQLite developers do not maintain this * * extension. At some point in the future, it might disappear from the source * * tree. * * * * If you are using this extension and think it should be supported moving * | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | *********************************** NOTICE ************************************ * This extension is deprecated. The SQLite developers do not maintain this * * extension. At some point in the future, it might disappear from the source * * tree. * * * * If you are using this extension and think it should be supported moving * * forward, visit the SQLite Forum (https://sqlite.org/forum) and argue your * * case there. * * * * This deprecation notice was added on 2024-01-22. * ******************************************************************************* Activate the user authentication logic by including the ext/userauth/userauth.c source code file in the build and adding the -DSQLITE_USER_AUTHENTICATION compile-time option. |
︙ | ︙ |
Changes to src/build.c.
︙ | ︙ | |||
185 186 187 188 189 190 191 | sqlite3VdbeAddOp2(v, OP_Next, pReturning->iRetCur, addrRewind+1); VdbeCoverage(v); sqlite3VdbeJumpHere(v, addrRewind); } } sqlite3VdbeAddOp0(v, OP_Halt); | | | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | sqlite3VdbeAddOp2(v, OP_Next, pReturning->iRetCur, addrRewind+1); VdbeCoverage(v); sqlite3VdbeJumpHere(v, addrRewind); } } sqlite3VdbeAddOp0(v, OP_Halt); #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 ){ sqlite3ErrorMsg(pParse, "user not authenticated"); pParse->rc = SQLITE_AUTH_USER; return; } |
︙ | ︙ |
Changes to src/sqliteInt.h.
︙ | ︙ | |||
1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 | */ #define SQLITE_FUNC_HASH_SZ 23 struct FuncDefHash { FuncDef *a[SQLITE_FUNC_HASH_SZ]; /* Hash table for functions */ }; #define SQLITE_FUNC_HASH(C,L) (((C)+(L))%SQLITE_FUNC_HASH_SZ) #ifdef SQLITE_USER_AUTHENTICATION /* ** Information held in the "sqlite3" database connection object and used ** to manage user authentication. */ typedef struct sqlite3_userauth sqlite3_userauth; struct sqlite3_userauth { | > > > > | 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 | */ #define SQLITE_FUNC_HASH_SZ 23 struct FuncDefHash { FuncDef *a[SQLITE_FUNC_HASH_SZ]; /* Hash table for functions */ }; #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 ** to manage user authentication. */ typedef struct sqlite3_userauth sqlite3_userauth; struct sqlite3_userauth { |
︙ | ︙ |