forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb2d4792
committed
Make int64_div_fast_to_numeric() more robust.
The prior coding of int64_div_fast_to_numeric() had a number of bugsthat would cause it to fail under different circumstances, such aswith log10val2 <= 0, or log10val2 a multiple of 4, or in the "slow"numeric path with log10val2 >= 10.None of those could be triggered by any of our current code, whichonly uses log10val2 = 3 or 6. However, they made it a hazard for anyfuture code that might use it. Also, since this is exported bynumeric.c, users writing their own C code might choose to use it.Therefore fix, and back-patch to v14, where it was introduced.Dean Rasheed, reviewed by Tom Lane.Discussion:https://postgr.es/m/CAEZATCW8gXgW0tgPxPgHDPhVX71%2BSWFRkhnXy%2BTfGDsKLepu2g%40mail.gmail.com1 parent2010d8b commitb2d4792
1 file changed
+46
-27
lines changedLines changed: 46 additions & 27 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4235 | 4235 |
| |
4236 | 4236 |
| |
4237 | 4237 |
| |
4238 |
| - | |
| 4238 | + | |
4239 | 4239 |
| |
4240 | 4240 |
| |
4241 | 4241 |
| |
4242 | 4242 |
| |
4243 | 4243 |
| |
4244 | 4244 |
| |
4245 | 4245 |
| |
4246 |
| - | |
| 4246 | + | |
4247 | 4247 |
| |
4248 | 4248 |
| |
4249 | 4249 |
| |
| 4250 | + | |
| 4251 | + | |
| 4252 | + | |
| 4253 | + | |
| 4254 | + | |
4250 | 4255 |
| |
4251 | 4256 |
| |
4252 |
| - | |
| 4257 | + | |
4253 | 4258 |
| |
| 4259 | + | |
| 4260 | + | |
| 4261 | + | |
| 4262 | + | |
| 4263 | + | |
4254 | 4264 |
| |
4255 | 4265 |
| |
4256 |
| - | |
4257 |
| - | |
| 4266 | + | |
| 4267 | + | |
| 4268 | + | |
4258 | 4269 |
| |
4259 | 4270 |
| |
4260 | 4271 |
| |
4261 | 4272 |
| |
4262 |
| - | |
| 4273 | + | |
4263 | 4274 |
| |
4264 |
| - | |
| 4275 | + | |
4265 | 4276 |
| |
4266 |
| - | |
| 4277 | + | |
4267 | 4278 |
| |
4268 | 4279 |
| |
4269 | 4280 |
| |
| 4281 | + | |
| 4282 | + | |
4270 | 4283 |
| |
4271 | 4284 |
| |
4272 | 4285 |
| |
4273 |
| - | |
| 4286 | + | |
4274 | 4287 |
| |
4275 |
| - | |
4276 |
| - | |
4277 |
| - | |
4278 |
| - | |
4279 |
| - | |
4280 |
| - | |
| 4288 | + | |
| 4289 | + | |
| 4290 | + | |
4281 | 4291 |
| |
4282 |
| - | |
4283 |
| - | |
4284 |
| - | |
4285 |
| - | |
4286 |
| - | |
4287 |
| - | |
4288 |
| - | |
| 4292 | + | |
| 4293 | + | |
| 4294 | + | |
| 4295 | + | |
| 4296 | + | |
| 4297 | + | |
| 4298 | + | |
| 4299 | + | |
| 4300 | + | |
| 4301 | + | |
| 4302 | + | |
| 4303 | + | |
| 4304 | + | |
| 4305 | + | |
| 4306 | + | |
4289 | 4307 |
| |
| 4308 | + | |
| 4309 | + | |
| 4310 | + | |
4290 | 4311 |
| |
4291 | 4312 |
| |
4292 |
| - | |
4293 |
| - | |
4294 |
| - | |
4295 |
| - | |
| 4313 | + | |
| 4314 | + | |
4296 | 4315 |
| |
4297 | 4316 |
| |
4298 |
| - | |
| 4317 | + | |
4299 | 4318 |
| |
4300 | 4319 |
| |
4301 | 4320 |
| |
|
0 commit comments
Comments
(0)