git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: b43bf61) | patch
Modestly improve pgbench's checking for invalid ranges.
Fri, 5 Aug 2011 16:48:45 +0000 (12:48 -0400)
Fri, 5 Aug 2011 16:53:03 +0000 (12:53 -0400)
commit 68cbb9f4e70b7b7ed515b5c63bafbe47d9617bf0
Modestly improve pgbench's checking for invalid ranges.

The old check against MAX_RANDOM_VALUE is clearly irrelevant since
getrand() no longer calls random(). Instead, check whether min and max
are close enough together to avoid an overflow inside getrand(), as
suggested by Tom Lane. This is still somewhat silly, because we're
using atoi(), which doesn't check for overflow anyway and (at least on
my system) will cheerfully return 0 when given "4294967296". But that's
a problem for another commit.
contrib/pgbench/pgbench.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /