Commit 9cba113
liushengsong
Fix ORCA permission checking crash with RTEPermissionInfo
1. orca.c: transformGroupedWindows() incorrectly created an RTEPermissionInfo
with relid=0 for a subquery RTE. Per PG16 commit a61b1f7, only
RTE_RELATION entries need RTEPermissionInfo. This caused
Assert(OidIsValid(perminfo->relid)) failure when ORCA translated
ROLLUP + window function queries.
2. matview.c: replace_rte_with_delta() converted RTE_RELATION to
RTE_SUBQUERY but forgot to clear perminfoindex, causing
Assert(rte->rtekind == RTE_RELATION || ...) failure during IVM
incremental maintenance with ORCA enabled.
Also fix subquery not inheriting rteperminfos, and correct
AddPerfmInfo/Perfission typos.1 parent 0b780e3 commit 9cba113
File tree
6 files changed
+17
-16
lines changed- src
- backend
- commands
- gpopt
- translate
- optimizer/plan
- include/gpopt/translate
6 files changed
+17
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2340 | 2340 | | |
2341 | 2341 | | |
2342 | 2342 | | |
| 2343 | + | |
2343 | 2344 | | |
2344 | 2345 | | |
2345 | 2346 | | |
| |||
2403 | 2404 | | |
2404 | 2405 | | |
2405 | 2406 | | |
| 2407 | + | |
2406 | 2408 | | |
2407 | 2409 | | |
2408 | 2410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2818 | 2818 | | |
2819 | 2819 | | |
2820 | 2820 | | |
2821 | | - | |
2822 | | - | |
| 2821 | + | |
2823 | 2822 | | |
2824 | 2823 | | |
2825 | 2824 | | |
| 2825 | + | |
| 2826 | + | |
2826 | 2827 | | |
2827 | 2828 | | |
2828 | 2829 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
597 | | - | |
| 597 | + | |
598 | 598 | | |
599 | 599 | | |
600 | | - | |
| 600 | + | |
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
604 | | - | |
| 604 | + | |
605 | 605 | | |
606 | | - | |
| 606 | + | |
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5336 | 5336 | | |
5337 | 5337 | | |
5338 | 5338 | | |
5339 | | - | |
| 5339 | + | |
5340 | 5340 | | |
5341 | 5341 | | |
5342 | 5342 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | | - | |
522 | 521 | | |
523 | 522 | | |
524 | 523 | | |
| |||
545 | 544 | | |
546 | 545 | | |
547 | 546 | | |
| 547 | + | |
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
| |||
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | 581 | | |
585 | | - | |
| 582 | + | |
| 583 | + | |
586 | 584 | | |
587 | 585 | | |
588 | 586 | | |
| |||
605 | 603 | | |
606 | 604 | | |
607 | 605 | | |
608 | | - | |
| 606 | + | |
609 | 607 | | |
610 | 608 | | |
611 | 609 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
253 | | - | |
| 252 | + | |
| 253 | + | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| |||
0 commit comments