- Notifications
You must be signed in to change notification settings - Fork5
Commitdfd26f9
committed
Make executor's SELECT INTO code save and restore original tuple receiver.
As previously coded, the QueryDesc's dest pointer was left dangling(pointing at an already-freed receiver object) after ExecutorEnd. It's abit astonishing that it took us this long to notice, and I'm not sure thatthe known problem case with SQL functions is the only one. Fix it bysaving and restoring the original receiver pointer, which seems the mostbulletproof way of ensuring any related bugs are also covered.Per bug #6379 from Paul Ramsey. Back-patch to 8.4 where the currenthandling of SELECT INTO was introduced.1 parent10ecc0d commitdfd26f9
File tree
3 files changed
+55
-5
lines changed- src
- backend/executor
- test/regress
- expected
- sql
3 files changed
+55
-5
lines changedLines changed: 15 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2445 | 2445 |
| |
2446 | 2446 |
| |
2447 | 2447 |
| |
| 2448 | + | |
2448 | 2449 |
| |
2449 | 2450 |
| |
2450 | 2451 |
| |
| |||
2651 | 2652 |
| |
2652 | 2653 |
| |
2653 | 2654 |
| |
2654 |
| - | |
2655 |
| - | |
| 2655 | + | |
2656 | 2656 |
| |
2657 | 2657 |
| |
| 2658 | + | |
2658 | 2659 |
| |
2659 | 2660 |
| |
| 2661 | + | |
| 2662 | + | |
2660 | 2663 |
| |
2661 | 2664 |
| |
2662 | 2665 |
| |
| |||
2677 | 2680 |
| |
2678 | 2681 |
| |
2679 | 2682 |
| |
2680 |
| - | |
2681 |
| - | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
2682 | 2688 |
| |
2683 | 2689 |
| |
2684 | 2690 |
| |
| |||
2689 | 2695 |
| |
2690 | 2696 |
| |
2691 | 2697 |
| |
2692 |
| - | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
2693 | 2703 |
| |
2694 | 2704 |
| |
2695 | 2705 |
| |
|
Lines changed: 25 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + |
Lines changed: 15 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + |
0 commit comments
Comments
(0)