mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Deterministically initialize the PRNG used as a tie-breaker in the ANALYZE
command, so that the analysis is always the same given the same database. This simplifies testing. FossilOrigin-Name: 48ed8b565b84c8fa7898c2f9817c01f7e9c9182e
This commit is contained in:
@@ -347,7 +347,7 @@ static void statInit(
|
||||
p->mxSample = mxSample;
|
||||
p->nPSample = (tRowcnt)(sqlite3_value_int64(argv[1])/(mxSample/3+1) + 1);
|
||||
p->current.anLt = &p->current.anEq[nColUp];
|
||||
sqlite3_randomness(sizeof(p->iPrn), &p->iPrn);
|
||||
p->iPrn = nCol*0x689e962d ^ sqlite3_value_int(argv[1])*0xd0944565;
|
||||
|
||||
/* Set up the Stat4Accum.a[] and aBest[] arrays */
|
||||
p->a = (struct Stat4Sample*)&p->current.anLt[nColUp];
|
||||
|
Reference in New Issue
Block a user