summaryrefslogtreecommitdiff
path: root/contrib/pgbench/pgbench.c
diff options
context:
space:
mode:
authorTatsuo Ishii <ishii@postgresql.org>2007-01-13 03:31:12 +0000
committerTatsuo Ishii <ishii@postgresql.org>2007-01-13 03:31:12 +0000
commit43021ef8156d76e87fcec3d597c7f7b2e06d21a7 (patch)
treeaad5b5b31442da826749a94dcbc31818b6b24ee8 /contrib/pgbench/pgbench.c
parent4c884c3ceb9da30e02e53f8bf2d427e5b82741fe (diff)
Back port patch.
Call srandom() instead of srand(). pgbench calls random() later, so it should have called srandom(). On most platforms except Windows srandom() is actually identical to srand(), so the bug only bites Windows users. per bug report from Akio Ishida.
Diffstat (limited to 'contrib/pgbench/pgbench.c')
-rw-r--r--contrib/pgbench/pgbench.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c
index 1f64e9dc0e2..9cdc53de11a 100644
--- a/contrib/pgbench/pgbench.c
+++ b/contrib/pgbench/pgbench.c
@@ -1,10 +1,10 @@
/*
- * $Header: /cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.22 2002/10/20 19:38:10 tgl Exp $
+ * $Header: /cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.22.2.1 2007/01/13 03:31:12 ishii Exp $
*
* pgbench: a simple TPC-B like benchmark program for PostgreSQL
* written by Tatsuo Ishii
*
- * Copyright (c) 2000-2002 Tatsuo Ishii
+ * Copyright (c) 2000-2007 Tatsuo Ishii
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
@@ -914,7 +914,7 @@ main(int argc, char **argv)
/* set random seed */
gettimeofday(&tv1, 0);
- srand((uint) tv1.tv_usec);
+ srandom((uint) tv1.tv_usec);
/* get start up time */
gettimeofday(&tv1, 0);