- Notifications
You must be signed in to change notification settings - Fork5
Commitbab163e
committed
Fix old oversight in join removal logic.
Commit9e7e29c introduced an Assert thatjoin removal didn't reduce the eval_at set of any PlaceHolderVar to empty.At first glance it looks like join_is_removable ensures that's true --- butactually, the loop in join_is_removable skips PlaceHolderVars that are notreferenced above the join due to be removed. So, if we don't want anyempty eval_at sets, the right thing to do is to delete any now-unreferencedPlaceHolderVars from the data structure entirely.Per fuzz testing by Andreas Seltenreich. Back-patch to 9.3 where theaforesaid Assert was added.1 parent58e09b9 commitbab163e
File tree
3 files changed
+45
-6
lines changed- src
- backend/optimizer/plan
- test/regress
- expected
- sql
3 files changed
+45
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
| 467 | + | |
| 468 | + | |
468 | 469 | | |
469 | | - | |
| 470 | + | |
470 | 471 | | |
471 | 472 | | |
472 | 473 | | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
477 | 485 | | |
478 | 486 | | |
479 | 487 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3862 | 3862 | | |
3863 | 3863 | | |
3864 | 3864 | | |
| 3865 | + | |
| 3866 | + | |
| 3867 | + | |
| 3868 | + | |
| 3869 | + | |
| 3870 | + | |
| 3871 | + | |
| 3872 | + | |
| 3873 | + | |
| 3874 | + | |
| 3875 | + | |
| 3876 | + | |
| 3877 | + | |
| 3878 | + | |
| 3879 | + | |
| 3880 | + | |
3865 | 3881 | | |
3866 | 3882 | | |
3867 | 3883 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1247 | 1247 | | |
1248 | 1248 | | |
1249 | 1249 | | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
1250 | 1265 | | |
1251 | 1266 | | |
1252 | 1267 | | |
| |||
0 commit comments
Comments
(0)