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

Add the SQLITE_TESTCTRL_PRNG_SEED test control.

FossilOrigin-Name: 3ac5723164ae801e209ce525a5d94692767136f9d06be2a84883dcea677d02da
This commit is contained in:
drh
2019-08-02 20:45:04 +00:00
parent 0bf6549cd1
commit ade54d68ee
9 changed files with 62 additions and 26 deletions

View File

@@ -3824,13 +3824,13 @@ int sqlite3_test_control(int op, ...){
break;
}
/*
** Reset the PRNG back to its uninitialized state. The next call
** to sqlite3_randomness() will reseed the PRNG using a single call
** to the xRandomness method of the default VFS.
/* sqlite3_test_control(SQLITE_TESTCTRL_PRNG_SEED, unsigned int);
**
** Use the integer value as the seed for SQLite's internal PRNG.
** rather than the VFS xRandomness() function.
*/
case SQLITE_TESTCTRL_PRNG_RESET: {
sqlite3_randomness(0,0);
case SQLITE_TESTCTRL_PRNG_SEED: {
sqlite3Config.iPrngSeed = va_arg(ap, unsigned int);
break;
}