forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9f71e10
committed
Fix checking of index expressions in CompareIndexInfo().
This code was sloppy about comparison of index columns thatare expressions. It didn't reliably reject cases where oneindex has an expression where the other has a plain column,and it could index off the start of the attmap array, leadingto a Valgrind complaint (though an actual crash seems unlikely).I'm not sure that the expression-vs-column sloppiness leadsto any visible problem in practice, because the subsequentcomparison of the two expression lists would reject caseswhere the indexes have different numbers of expressionsoverall. Maybe we could falsely match indexes having thesame expressions in different column positions, but it'drequire unlucky contents of the word before the attmap array.It's not too surprising that no problem has been reportedfrom the field. Nonetheless, this code is clearly wrong.Per bug #18135 from Alexander Lakhin. Back-patch to allsupported branches.Discussion:https://postgr.es/m/18135-532f4a755e71e4d2@postgresql.org1 parent4e9fc3a commit9f71e10
1 file changed
+16
-7
lines changedLines changed: 16 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2559 | 2559 |
| |
2560 | 2560 |
| |
2561 | 2561 |
| |
2562 |
| - | |
| 2562 | + | |
2563 | 2563 |
| |
2564 | 2564 |
| |
2565 | 2565 |
| |
| |||
2568 | 2568 |
| |
2569 | 2569 |
| |
2570 | 2570 |
| |
2571 |
| - | |
2572 |
| - | |
2573 |
| - | |
2574 |
| - | |
2575 |
| - | |
| 2571 | + | |
| 2572 | + | |
| 2573 | + | |
| 2574 | + | |
| 2575 | + | |
| 2576 | + | |
| 2577 | + | |
| 2578 | + | |
| 2579 | + | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
2576 | 2585 |
| |
2577 |
| - | |
| 2586 | + | |
2578 | 2587 |
| |
2579 | 2588 |
| |
2580 | 2589 |
| |
|
0 commit comments
Comments
(0)