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

Disable rootpage bounds checking when the SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS

setting is off, to facilitate reaching obscure error states during testing.

FossilOrigin-Name: d7dd4fc464c791915f646b1ad228697d1fa16f530fc7d0e9aa702c8df3068c65
This commit is contained in:
drh
2020-07-22 21:05:23 +00:00
parent 69306bf43a
commit ca439a4967
11 changed files with 69 additions and 17 deletions

View File

@@ -4091,6 +4091,12 @@ int sqlite3_test_control(int op, ...){
** Set or clear a flag that causes SQLite to verify that type, name,
** and tbl_name fields of the sqlite_schema table. This is normally
** on, but it is sometimes useful to turn it off for testing.
**
** 2020-07-22: Disabling EXTRA_SCHEMA_CHECKS also disables the
** verification of rootpage numbers when parsing the schema. This
** is useful to make it easier to reach strange internal error states
** during testing. The EXTRA_SCHEMA_CHECKS settting is always enabled
** in production.
*/
case SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS: {
sqlite3GlobalConfig.bExtraSchemaChecks = va_arg(ap, int);