From: Tatsuo Ishii Date: Sat, 13 Jan 2007 03:24:55 +0000 (+0000) Subject: Back port patch. X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=265afce48f8c78b1c4dce21b4f29bc42fa30571d;p=users%2Fbernd%2Fpostgres.git 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. --- diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c index 9a14e1501b..3dec7cfd27 100644 --- a/contrib/pgbench/pgbench.c +++ b/contrib/pgbench/pgbench.c @@ -935,7 +935,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);