- Notifications
You must be signed in to change notification settings - Fork28
Commite15c384
committed
Fix numeric_power() when the exponent is INT_MIN.
In power_var_int(), the computation of the number of significantdigits to use in the computation used log(Abs(exp)), which isn't safebecause Abs(exp) returns INT_MIN when exp is INT_MIN. Use fabs()instead of Abs(), so that the exponent is cast to a double before theabsolute value is taken.Back-patch to 9.6, where this was introduced (by7d9a473).Discussion:https://postgr.es/m/CAEZATCVd6pMkz=BrZEgBKyqqJrt2xghr=fNc8+Z=5xC6cgWrWA@mail.gmail.com1 parent9e7d87c commite15c384
File tree
3 files changed
+8
-1
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+8
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9370 | 9370 |
| |
9371 | 9371 |
| |
9372 | 9372 |
| |
9373 |
| - | |
| 9373 | + | |
9374 | 9374 |
| |
9375 | 9375 |
| |
9376 | 9376 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1674 | 1674 |
| |
1675 | 1675 |
| |
1676 | 1676 |
| |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
1677 | 1683 |
| |
1678 | 1684 |
| |
1679 | 1685 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
909 | 909 |
| |
910 | 910 |
| |
911 | 911 |
| |
| 912 | + | |
912 | 913 |
| |
913 | 914 |
| |
914 | 915 |
| |
|
0 commit comments
Comments
(0)