mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-06 15:49:35 +03:00
All tests now pass. But there are still issues. For example, inserts
are way too slow. And additional tests are needed for new features. (CVS 243) FossilOrigin-Name: e7b65e37fd88c4d69c89cfe73ab345b8b645ada6
This commit is contained in:
12
src/random.c
12
src/random.c
@@ -27,7 +27,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.3 2001/09/13 21:53:10 drh Exp $
|
||||
** $Id: random.c,v 1.4 2001/09/14 03:24:25 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <time.h>
|
||||
@@ -104,6 +104,16 @@ int sqliteRandomInteger(void){
|
||||
return r;
|
||||
}
|
||||
|
||||
/*
|
||||
** Return a random 16-bit unsigned integer. The integer is generated by
|
||||
** making 2 calls to sqliteRandomByte().
|
||||
*/
|
||||
int sqliteRandomShort(void){
|
||||
int r;
|
||||
r = sqliteRandomByte();
|
||||
r = (r<<8) + sqliteRandomByte();
|
||||
return r;
|
||||
}
|
||||
|
||||
/*
|
||||
** Generate a random filename with the given prefix. The new filename
|
||||
|
||||
Reference in New Issue
Block a user