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

Add SQLITE_TESTCTRL_VALIDATE_JSONB, which if enabled under SQLITE_DEBUG causes

cross-checking of generate JSONB.

FossilOrigin-Name: b410a4db74a650003539ffaaea18519d5159b504daac47db6a4874b730f40ac8
This commit is contained in:
drh
2023-12-11 17:03:12 +00:00
parent ce46e0eb11
commit 7d2eaae83e
8 changed files with 205 additions and 137 deletions

View File

@@ -4659,6 +4659,19 @@ int sqlite3_test_control(int op, ...){
break;
}
#endif
/* sqlite3_test_control(SQLITE_TESTCTRL_VALIDATE_JSONB, (u8)trueFalse);
**
** Activate or deactivate validation of JSONB that is generated from
** text. Off by default, as the validation is slow. Validation is
** only available if compiled using SQLITE_DEBUG.
*/
case SQLITE_TESTCTRL_VALIDATE_JSONB: {
#if defined(SQLITE_DEBUG)
sqlite3Config.bJsonbValidate = (u8)(va_arg(ap, int)&0xff);
#endif
break;
}
}
va_end(ap);
#endif /* SQLITE_UNTESTABLE */