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

Add the new SQLITE_TESTCTRL_OPTGET that retrieves the current optimization

setting.  Use this in the CLI to provide symbolic fine-grain control
over optimization settings using the ".testctrl opt" dot-command.

FossilOrigin-Name: 0ea4e1e8fc689cb1af3a8d21dd6af9d483115412b414e85e8a42480f50d65af2
This commit is contained in:
drh
2024-08-21 18:57:55 +00:00
parent 9904d824b8
commit be1fdbd272
5 changed files with 137 additions and 11 deletions

View File

@@ -4393,6 +4393,18 @@ int sqlite3_test_control(int op, ...){
break;
}
/* sqlite3_test_control(SQLITE_TESTCTRL_GETOPT, sqlite3 *db, int *N)
**
** Write the current optimization settings into *N. A zero bit means that
** the optimization is on, and a 1 bit means that the optimization is off.
*/
case SQLITE_TESTCTRL_GETOPT: {
sqlite3 *db = va_arg(ap, sqlite3*);
int *pN = va_arg(ap, int*);
*pN = db->dbOptFlags;
break;
}
/* sqlite3_test_control(SQLITE_TESTCTRL_LOCALTIME_FAULT, onoff, xAlt);
**
** If parameter onoff is 1, subsequent calls to localtime() fail.