forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf50f029
committed
Fix thinkos in have_unsafe_outer_join_ref; reduce to Assert check.
Late in the development of commit2489d76, I (tgl) incorrectlyconcluded that the new function have_unsafe_outer_join_ref couldn'tever reach its inner loop. That should be the case if the innerrel's parameterization is based on just one Var, but it could bebased on Vars from several relations, and then not only is theinner loop reachable but it's wrongly coded.Despite those errors, it still appears that the whole thing isredundant given previous join_is_legal checks, so let's arrangeto only run it in assert-enabled builds.Diagnosis and patch by Richard Guo, per fuzz testing by Justin Pryzby.Discussion:https://postgr.es/m/20230212235823.GW1653@telsasoft.com1 parentb16259b commitf50f029
File tree
3 files changed
+57
-15
lines changed- src
- backend/optimizer/path
- test/regress
- expected
- sql
3 files changed
+57
-15
lines changedLines changed: 14 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
378 | 378 |
| |
379 | 379 |
| |
380 | 380 |
| |
381 |
| - | |
382 |
| - | |
| 381 | + | |
383 | 382 |
| |
| 383 | + | |
384 | 384 |
| |
385 | 385 |
| |
386 | 386 |
| |
387 | 387 |
| |
388 | 388 |
| |
389 | 389 |
| |
390 | 390 |
| |
| 391 | + | |
391 | 392 |
| |
392 |
| - | |
| 393 | + | |
393 | 394 |
| |
394 |
| - | |
395 |
| - | |
396 | 395 |
| |
397 | 396 |
| |
398 | 397 |
| |
| |||
401 | 400 |
| |
402 | 401 |
| |
403 | 402 |
| |
404 |
| - | |
| 403 | + | |
405 | 404 |
| |
406 |
| - | |
| 405 | + | |
407 | 406 |
| |
408 | 407 |
| |
409 | 408 |
| |
410 | 409 |
| |
411 | 410 |
| |
412 |
| - | |
413 |
| - | |
414 |
| - | |
415 |
| - | |
416 | 411 |
| |
417 | 412 |
| |
418 | 413 |
| |
419 | 414 |
| |
| 415 | + | |
420 | 416 |
| |
421 | 417 |
| |
422 | 418 |
| |
| 419 | + | |
423 | 420 |
| |
424 | 421 |
| |
425 | 422 |
| |
| |||
713 | 710 |
| |
714 | 711 |
| |
715 | 712 |
| |
716 |
| - | |
717 |
| - | |
718 |
| - | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
719 | 716 |
| |
720 | 717 |
| |
721 | 718 |
| |
722 | 719 |
| |
723 | 720 |
| |
724 | 721 |
| |
725 |
| - | |
726 | 722 |
| |
727 | 723 |
| |
728 | 724 |
| |
729 | 725 |
| |
730 | 726 |
| |
731 | 727 |
| |
732 | 728 |
| |
| 729 | + | |
| 730 | + | |
| 731 | + | |
733 | 732 |
| |
734 | 733 |
| |
735 | 734 |
| |
|
Lines changed: 26 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4653 | 4653 |
| |
4654 | 4654 |
| |
4655 | 4655 |
| |
| 4656 | + | |
| 4657 | + | |
| 4658 | + | |
| 4659 | + | |
| 4660 | + | |
| 4661 | + | |
| 4662 | + | |
| 4663 | + | |
| 4664 | + | |
| 4665 | + | |
| 4666 | + | |
| 4667 | + | |
| 4668 | + | |
| 4669 | + | |
| 4670 | + | |
| 4671 | + | |
| 4672 | + | |
| 4673 | + | |
| 4674 | + | |
| 4675 | + | |
| 4676 | + | |
| 4677 | + | |
| 4678 | + | |
| 4679 | + | |
| 4680 | + | |
| 4681 | + | |
4656 | 4682 |
| |
4657 | 4683 |
| |
4658 | 4684 |
| |
|
Lines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1609 | 1609 |
| |
1610 | 1610 |
| |
1611 | 1611 |
| |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
1612 | 1629 |
| |
1613 | 1630 |
| |
1614 | 1631 |
| |
|
0 commit comments
Comments
(0)