- Notifications
You must be signed in to change notification settings - Fork5
Commit68cbb9f
committed
Modestly improve pgbench's checking for invalid ranges.
The old check against MAX_RANDOM_VALUE is clearly irrelevant sincegetrand() no longer calls random(). Instead, check whether min and maxare close enough together to avoid an overflow inside getrand(), assuggested by Tom Lane. This is still somewhat silly, because we'reusing atoi(), which doesn't check for overflow anyway and (at least onmy system) will cheerfully return 0 when given "4294967296". But that'sa problem for another commit.1 parentb43bf61 commit68cbb9f
1 file changed
+16
-2
lines changedLines changed: 16 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1066 | 1066 |
| |
1067 | 1067 |
| |
1068 | 1068 |
| |
1069 |
| - | |
| 1069 | + | |
1070 | 1070 |
| |
1071 |
| - | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
1072 | 1086 |
| |
1073 | 1087 |
| |
1074 | 1088 |
| |
|
0 commit comments
Comments
(0)