mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-19 21:43:15 +03:00
Refactor the interface to the randomness generator. (CVS 1224)
FossilOrigin-Name: f2bdccf4bb2f796aafb64c33e55f62a1794d750c
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
** ROLLBACK
|
||||
** PRAGMA
|
||||
**
|
||||
** $Id: build.c,v 1.164 2004/01/19 04:55:56 jplyon Exp $
|
||||
** $Id: build.c,v 1.165 2004/02/11 09:46:31 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -819,7 +819,9 @@ void sqliteAddCollateType(Parse *pParse, int collType){
|
||||
*/
|
||||
void sqliteChangeCookie(sqlite *db, Vdbe *v){
|
||||
if( db->next_cookie==db->aDb[0].schema_cookie ){
|
||||
db->next_cookie = db->aDb[0].schema_cookie + sqliteRandomByte() + 1;
|
||||
unsigned char r;
|
||||
sqliteRandomness(1, &r);
|
||||
db->next_cookie = db->aDb[0].schema_cookie + r + 1;
|
||||
db->flags |= SQLITE_InternChanges;
|
||||
sqliteVdbeAddOp(v, OP_Integer, db->next_cookie, 0);
|
||||
sqliteVdbeAddOp(v, OP_SetCookie, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user