forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita43b190
committed
Fix a thinko in join_is_legal: when we decide we can implement a semijoin
by unique-ifying the RHS and then inner-joining to some other relation,that is not grounds for violating the RHS of some other outer join.Noticed while regression-testing new GEQO code, which will blindly followany path that join_is_legal says is legal, and then complain later if thatleads to a dead end.I'm not certain that this can result in any visible failure in 8.4: themistake may always be masked by the fact that subsequent attempts to jointhe rest of the RHS of the other join will fail. But I'm not certain itcan't, either, and it's definitely not operating as intended. So back-patch.The added regression test depends on the new no-failures-allowed logicthat I'm about to commit in GEQO, so no point back-patching that.1 parent011eae6 commita43b190
File tree
3 files changed
+36
-3
lines changed- src
- backend/optimizer/path
- test/regress
- expected
- sql
3 files changed
+36
-3
lines changedLines changed: 12 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
349 | 349 |
| |
350 | 350 |
| |
351 | 351 |
| |
| 352 | + | |
352 | 353 |
| |
353 | 354 |
| |
354 | 355 |
| |
| |||
366 | 367 |
| |
367 | 368 |
| |
368 | 369 |
| |
| 370 | + | |
369 | 371 |
| |
370 | 372 |
| |
371 | 373 |
| |
| |||
450 | 452 |
| |
451 | 453 |
| |
452 | 454 |
| |
| 455 | + | |
453 | 456 |
| |
454 | 457 |
| |
455 | 458 |
| |
| |||
461 | 464 |
| |
462 | 465 |
| |
463 | 466 |
| |
| 467 | + | |
464 | 468 |
| |
465 | 469 |
| |
466 | 470 |
| |
| |||
510 | 514 |
| |
511 | 515 |
| |
512 | 516 |
| |
513 |
| - | |
514 |
| - | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
515 | 524 |
| |
516 | 525 |
| |
517 | 526 |
| |
|
Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2150 | 2150 |
| |
2151 | 2151 |
| |
2152 | 2152 |
| |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
2153 | 2167 |
| |
2154 | 2168 |
| |
2155 | 2169 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
343 | 343 |
| |
344 | 344 |
| |
345 | 345 |
| |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
346 | 356 |
| |
347 | 357 |
| |
348 | 358 |
| |
|
0 commit comments
Comments
(0)