- Notifications
You must be signed in to change notification settings - Fork4.9k
Commite858312
committed
Fix netmask handling in inet_minmax_multi_ops
When calculating distance in brin_minmax_multi_distance_inet(), thenetmask was applied incorrectly. This results in (seemingly) incorrectordering of values, triggering an assert.For builds without asserts this is mostly harmless - we may merge otherranges, possibly resulting in slightly less efficient index. But it'sstill correct and the greedy algorithm doesn't guarantee optimalityanyway.Backpatch to 14, where minmax-multi indexes were introduced.Reported by Dmitry Dolgov, investigation and fix by me.Reported-by: Dmitry DolgovBackpatch-through: 14Discussion:https://postgr.es/m/17774-c6f3e36dd4471e67@postgresql.org1 parent0b51d42 commite858312
File tree
3 files changed
+15
-2
lines changed- src
- backend/access/brin
- test/regress
- expected
- sql
3 files changed
+15
-2
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2364 | 2364 |
| |
2365 | 2365 |
| |
2366 | 2366 |
| |
2367 |
| - | |
| 2367 | + | |
2368 | 2368 |
| |
2369 | 2369 |
| |
2370 | 2370 |
| |
2371 | 2371 |
| |
2372 | 2372 |
| |
2373 | 2373 |
| |
2374 |
| - | |
| 2374 | + | |
2375 | 2375 |
| |
2376 | 2376 |
| |
2377 | 2377 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
351 | 351 |
| |
352 | 352 |
| |
353 | 353 |
| |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
354 | 360 |
| |
355 | 361 |
| |
356 | 362 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
357 | 357 |
| |
358 | 358 |
| |
359 | 359 |
| |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
360 | 367 |
| |
361 | 368 |
| |
362 | 369 |
| |
|
0 commit comments
Comments
(0)