Commit b5ca65fe authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

Get rid of random seeds. Addresses #162.

git-svn-id: file:///svn/tokudb@1066 c7de825b-a66e-492c-adef-691d508d4ae1
parent 04d6f310
......@@ -145,10 +145,10 @@ test_db_curs4.bdb: trace.h
# Note the "-", which means we expect and ignore an error.
c4s.bdb: test_db_curs4.bdb
./test_db_curs4.bdb 1 > c4.c.a.bdb
./test_db_curs4.bdb 1 --more > c4.c.b.bdb
./test_db_curs4.bdb > c4.c.a.bdb
./test_db_curs4.bdb --more > c4.c.b.bdb
c4s.tdb: test_db_curs4.tdb
./test_db_curs4.tdb 1 > c4.c.a.tdb
-./test_db_curs4.tdb 1 --more > c4.c.b.tdb
./test_db_curs4.tdb > c4.c.a.tdb
-./test_db_curs4.tdb --more > c4.c.b.tdb
c4s: c4s.bdb c4s.tdb
......@@ -187,22 +187,15 @@ static void gettod (TIMESTAMP *ts) {
static int oppass=0, opnum=0;
static void insert_person (void) {
// int namelen = 5+myrandom()%245;
struct primary_key pk;
struct primary_data pd;
char keyarray[1000], dataarray[1000];
char *namearray;
// myrandom();
gettod(&pk.ts);
pd.creationtime = pk.ts;
pd.expiretime = pk.ts;
pd.expiretime += 128;
pd.doesexpire = oppass==1 && (opnum==2 || opnum==10 || opnum==22);
// int i;
// for (i=0; i<namelen; i++) {
// myrandom();
// }
// fprintf(stderr, "%d: else if (oppass==%d && opnum==%d) pd.name=\"%s\";\n", __LINE__, oppass, opnum, pd.name.name);
if (oppass==1 && opnum==1) namearray="Hc";
else if (oppass==1 && opnum==2) namearray="Ku";
else if (oppass==1 && opnum==5) namearray="Ub";
......@@ -245,7 +238,6 @@ static void insert_person (void) {
static void delete_oldest_expired (void) {
int r;
//myrandom();
if (delete_cursor==0) {
r = expiredb->cursor(expiredb, null_txn, &delete_cursor, 0); CKERR(r);
......@@ -305,7 +297,6 @@ static void step_name (void) {
}
static void activity (void) {
//myrandom();
int do_delete = (oppass==1 && opnum==32) || (oppass==2 && opnum==8);
if (do_delete) {
// Delete the oldest expired one. Keep the cursor open
......@@ -328,7 +319,6 @@ static void activity (void) {
|| (oppass==1 && opnum==30)
|| (oppass==2 && opnum==9)
|| (oppass==2 && opnum==15));
//myrandom();
if (do_insert) {
insert_person();
} else {
......@@ -373,9 +363,6 @@ int main (int argc, const char *argv[]) {
argc--; argv++;
}
// fprintf(stderr, "seed=%d\n", useseed);
// srandom(useseed);
switch (mode) {
case MODE_DEFAULT:
oppass=1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment