forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6923d69
committed
Protect GIST logic that assumes penalty values can't be negative.
Apparently sane-looking penalty code might return small negative values,for example because of roundoff error. This will confuse places likegistchoose(). Prevent problems by clamping negative penalty values tozero. (Just to be really sure, I also made it force NaNs to zero.)Back-patch to all supported branches.Alexander Korotkov1 parentba4cacf commit6923d69
2 files changed
+11
-2
lines changedLines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
378 | 378 |
| |
379 | 379 |
| |
380 | 380 |
| |
| 381 | + | |
| 382 | + | |
381 | 383 |
| |
382 | 384 |
| |
383 | 385 |
| |
|
Lines changed: 9 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| 16 | + | |
| 17 | + | |
16 | 18 |
| |
17 | 19 |
| |
18 | 20 |
| |
| |||
526 | 528 |
| |
527 | 529 |
| |
528 | 530 |
| |
| 531 | + | |
529 | 532 |
| |
530 | 533 |
| |
531 | 534 |
| |
532 | 535 |
| |
533 | 536 |
| |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
534 | 541 |
| |
535 | 542 |
| |
536 | 543 |
| |
537 |
| - | |
538 |
| - | |
| 544 | + | |
| 545 | + | |
539 | 546 |
| |
540 | 547 |
| |
541 | 548 |
| |
|
0 commit comments
Comments
(0)