summaryrefslogtreecommitdiff
path: root/contrib/pgbench
diff options
context:
space:
mode:
authorTatsuo Ishii2006-12-26 01:02:05 +0000
committerTatsuo Ishii2006-12-26 01:02:05 +0000
commit39def593c5b9b2c694efada0a1d9ba358c888ed5 (patch)
treeb9ed7665fb655e5f7720944ea0e46316fb8d2baf /contrib/pgbench
parent506a9893b7c078ad8dc739ea6872f9f6cc7bd59e (diff)
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')
-rw-r--r--contrib/pgbench/pgbench.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c
index e880f638f06..1c4e69681ea 100644
--- a/contrib/pgbench/pgbench.c
+++ b/contrib/pgbench/pgbench.c
@@ -1,5 +1,5 @@
/*
- * $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.58 2006/10/21 06:31:28 ishii Exp $
+ * $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.59 2006/12/26 01:02:05 ishii Exp $
*
* pgbench: a simple benchmark program for PostgreSQL
* written by Tatsuo Ishii
@@ -1500,7 +1500,7 @@ main(int argc, char **argv)
/* set random seed */
gettimeofday(&tv1, NULL);
- srand((unsigned int) tv1.tv_usec);
+ srandom((unsigned int) tv1.tv_usec);
/* get start up time */
gettimeofday(&tv1, NULL);