1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

New test-only SQL functions: implies_nonnull_row(), expr_compare(), and

expr_implies_expr().  The SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test-control
is modified to toggle internal function access on and off for a single
database connection.

FossilOrigin-Name: 473892a8eceacf24d57fd0c72ff2a0b8be4e0d75e0af7a30bdb24fbc3b453601
This commit is contained in:
drh
2020-01-01 15:43:30 +00:00
parent 25c4296bd9
commit 171c50ec38
15 changed files with 113 additions and 57 deletions

View File

@@ -4044,15 +4044,14 @@ int sqlite3_test_control(int op, ...){
break;
}
/* sqlite3_test_control(SQLITE_TESTCTRL_INTERNAL_FUNCS, int onoff);
/* sqlite3_test_control(SQLITE_TESTCTRL_INTERNAL_FUNCTIONS, sqlite3*);
**
** If parameter onoff is non-zero, internal-use-only SQL functions
** are visible to ordinary SQL. This is useful for testing but is
** unsafe because invalid parameters to those internal-use-only functions
** can result in crashes or segfaults.
** Toggle the ability to use internal functions on or off for
** the database connection given in the argument.
*/
case SQLITE_TESTCTRL_INTERNAL_FUNCTIONS: {
sqlite3GlobalConfig.bInternalFunctions = va_arg(ap, int);
sqlite3 *db = va_arg(ap, sqlite3*);
db->mDbFlags ^= DBFLAG_InternalFunc;
break;
}