diff options
Diffstat (limited to 'src/random.c')
-rw-r--r-- | src/random.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/random.c b/src/random.c index e7d518deb..3d0903b4e 100644 --- a/src/random.c +++ b/src/random.c @@ -15,7 +15,7 @@ ** Random numbers are used by some of the database backends in order ** to generate random integer keys for tables or random filenames. ** -** $Id: random.c,v 1.12 2004/05/08 08:23:32 danielk1977 Exp $ +** $Id: random.c,v 1.13 2005/06/12 21:35:52 drh Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -26,13 +26,16 @@ ** must be held while executing this routine. ** ** Why not just use a library random generator like lrand48() for this? -** Because the OP_NewRecno opcode in the VDBE depends on having a very +** Because the OP_NewRowid opcode in the VDBE depends on having a very ** good source of random numbers. The lrand48() library function may ** well be good enough. But maybe not. Or maybe lrand48() has some ** subtle problems on some systems that could cause problems. It is hard ** to know. To minimize the risk of problems due to bad lrand48() ** implementations, SQLite uses this random number generator based ** on RC4, which we know works very well. +** +** (Later): Actually, OP_NewRowid does not depend on a good source of +** randomness any more. But we will leave this code in all the same. */ static int randomByte(){ unsigned char t; @@ -95,6 +98,3 @@ void sqlite3Randomness(int N, void *pBuf){ } sqlite3OsLeaveMutex(); } - - - |