projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
115f22b
)
Back port patch.
author
Tatsuo Ishii
<
[email protected]
>
Sat, 13 Jan 2007 03:24:55 +0000
(
03:24
+0000)
committer
Tatsuo Ishii
<
[email protected]
>
Sat, 13 Jan 2007 03:24:55 +0000
(
03:24
+0000)
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.
contrib/pgbench/pgbench.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/pgbench/pgbench.c
b/contrib/pgbench/pgbench.c
index 9a14e1501bd7af160edb31e610a9f89a42ab81a5..3dec7cfd27c91989d5ff40cc20ee6ee33c779297 100644
(file)
--- 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);
+ srand
om
((uint) tv1.tv_usec);
/* get start up time */
gettimeofday(&tv1, 0);