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:
12
src/main.c
12
src/main.c
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user