forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4f74741
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 parente7c2e02 commit4f74741
1 file changed
+54
-26
lines changedLines changed: 54 additions & 26 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4151 | 4151 |
| |
4152 | 4152 |
| |
4153 | 4153 |
| |
4154 |
| - | |
| 4154 | + | |
4155 | 4155 |
| |
4156 | 4156 |
| |
4157 | 4157 |
| |
4158 | 4158 |
| |
4159 | 4159 |
| |
4160 | 4160 |
| |
4161 | 4161 |
| |
4162 |
| - | |
| 4162 | + | |
4163 | 4163 |
| |
4164 | 4164 |
| |
4165 | 4165 |
| |
| 4166 | + | |
| 4167 | + | |
| 4168 | + | |
| 4169 | + | |
| 4170 | + | |
4166 | 4171 |
| |
4167 | 4172 |
| |
4168 |
| - | |
| 4173 | + | |
4169 | 4174 |
| |
| 4175 | + | |
| 4176 | + | |
| 4177 | + | |
| 4178 | + | |
| 4179 | + | |
4170 | 4180 |
| |
4171 | 4181 |
| |
4172 |
| - | |
4173 |
| - | |
| 4182 | + | |
| 4183 | + | |
| 4184 | + | |
4174 | 4185 |
| |
4175 | 4186 |
| |
4176 | 4187 |
| |
4177 |
| - | |
| 4188 | + | |
| 4189 | + | |
| 4190 | + | |
| 4191 | + | |
| 4192 | + | |
| 4193 | + | |
| 4194 | + | |
| 4195 | + | |
| 4196 | + | |
| 4197 | + | |
| 4198 | + | |
4178 | 4199 |
| |
4179 | 4200 |
| |
4180 |
| - | |
| 4201 | + | |
| 4202 | + | |
4181 | 4203 |
| |
4182 |
| - | |
4183 |
| - | |
4184 |
| - | |
4185 |
| - | |
4186 |
| - | |
4187 |
| - | |
4188 |
| - | |
4189 |
| - | |
4190 |
| - | |
4191 |
| - | |
4192 |
| - | |
4193 |
| - | |
4194 |
| - | |
4195 |
| - | |
| 4204 | + | |
| 4205 | + | |
| 4206 | + | |
| 4207 | + | |
| 4208 | + | |
| 4209 | + | |
| 4210 | + | |
| 4211 | + | |
| 4212 | + | |
| 4213 | + | |
| 4214 | + | |
| 4215 | + | |
| 4216 | + | |
| 4217 | + | |
| 4218 | + | |
| 4219 | + | |
| 4220 | + | |
| 4221 | + | |
| 4222 | + | |
4196 | 4223 |
| |
| 4224 | + | |
| 4225 | + | |
| 4226 | + | |
4197 | 4227 |
| |
4198 | 4228 |
| |
4199 |
| - | |
4200 |
| - | |
4201 |
| - | |
4202 |
| - | |
| 4229 | + | |
| 4230 | + | |
4203 | 4231 |
| |
4204 | 4232 |
| |
4205 |
| - | |
| 4233 | + | |
4206 | 4234 |
| |
4207 | 4235 |
| |
4208 | 4236 |
| |
|
0 commit comments
Comments
(0)