Commit e047783
committed
Make replace_relid() leave argument unmodified
There are a lot of situations when we share the same pointer to a Bitmapset
structure across different places. In order to evade undesirable side effects
replace_relid() function should always return a copy.
Reported-by: Richard Guo
Discussion: https://postgr.es/m/CAMbWs4_wJthNtYBL%2BSsebpgF-5L2r5zFFk6xYbS0A78GKOTFHw%40mail.gmail.com
Reviewed-by: Richard Guo, Andres Freund, Ashutosh Bapat, Andrei Lepikhov1 parent 7d58f23 commit e047783
File tree
3 files changed
+29
-3
lines changed- src
- backend/optimizer/plan
- test/regress
- expected
- sql
3 files changed
+29
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1522 | 1522 | | |
1523 | 1523 | | |
1524 | 1524 | | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
1525 | 1529 | | |
1526 | 1530 | | |
1527 | 1531 | | |
1528 | 1532 | | |
1529 | 1533 | | |
1530 | 1534 | | |
1531 | 1535 | | |
| 1536 | + | |
1532 | 1537 | | |
1533 | | - | |
1534 | | - | |
| 1538 | + | |
1535 | 1539 | | |
| 1540 | + | |
1536 | 1541 | | |
1537 | | - | |
| 1542 | + | |
1538 | 1543 | | |
1539 | 1544 | | |
1540 | 1545 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6853 | 6853 | | |
6854 | 6854 | | |
6855 | 6855 | | |
| 6856 | + | |
| 6857 | + | |
| 6858 | + | |
| 6859 | + | |
| 6860 | + | |
| 6861 | + | |
| 6862 | + | |
| 6863 | + | |
| 6864 | + | |
| 6865 | + | |
| 6866 | + | |
| 6867 | + | |
| 6868 | + | |
| 6869 | + | |
| 6870 | + | |
6856 | 6871 | | |
6857 | 6872 | | |
6858 | 6873 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2610 | 2610 | | |
2611 | 2611 | | |
2612 | 2612 | | |
| 2613 | + | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
| 2618 | + | |
2613 | 2619 | | |
2614 | 2620 | | |
2615 | 2621 | | |
| |||
0 commit comments