aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2019-08-02 20:45:04 +0000
committerdrh <drh@noemail.net>2019-08-02 20:45:04 +0000
commitade54d68ee770d74ff98716f3eae9ecb2512da54 (patch)
treedd4f462e0e00ae7d9e1d034e208035777aca31f0 /src/main.c
parent0bf6549cd184c58dc4b8867405c40bfda5ba75b1 (diff)
downloadsqlite-ade54d68ee770d74ff98716f3eae9ecb2512da54.tar.gz
sqlite-ade54d68ee770d74ff98716f3eae9ecb2512da54.zip
Add the SQLITE_TESTCTRL_PRNG_SEED test control.
FossilOrigin-Name: 3ac5723164ae801e209ce525a5d94692767136f9d06be2a84883dcea677d02da
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c
index 612700627..81a76aabc 100644
--- a/src/main.c
+++ b/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;
}