forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb11123b
committed
Fix parameter recalculation for Limit nodes: during a ReScan call we must
recompute the limit/offset immediately, so that the updated values areavailable when the child's ReScan function is invoked. Add a regressiontest for this, too. Bug is new in HEAD (due to the bounded-sorting patch)so no need for back-patch.I did not do anything about merging this signaling with chgParam processing,but if we were to do that we'd still need to compute the updated valuesat this point rather than during the first ProcNode call.Per observation and test case from Greg Stark, though I didn't use his patch.1 parent6405842 commitb11123b
File tree
5 files changed
+63
-13
lines changed- src
- backend/executor
- include/nodes
- test/regress
- expected
- sql
5 files changed
+63
-13
lines changedLines changed: 23 additions & 11 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 |
| |
| |||
55 | 55 |
| |
56 | 56 |
| |
57 | 57 |
| |
58 |
| - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
59 | 62 |
| |
60 |
| - | |
61 |
| - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
62 | 68 |
| |
63 | 69 |
| |
64 |
| - | |
65 |
| - | |
66 |
| - | |
| 70 | + | |
67 | 71 |
| |
68 |
| - | |
| 72 | + | |
| 73 | + | |
69 | 74 |
| |
70 | 75 |
| |
71 | 76 |
| |
| |||
217 | 222 |
| |
218 | 223 |
| |
219 | 224 |
| |
220 |
| - | |
| 225 | + | |
221 | 226 |
| |
222 | 227 |
| |
223 | 228 |
| |
| |||
281 | 286 |
| |
282 | 287 |
| |
283 | 288 |
| |
| 289 | + | |
| 290 | + | |
| 291 | + | |
284 | 292 |
| |
285 | 293 |
| |
286 | 294 |
| |
| |||
403 | 411 |
| |
404 | 412 |
| |
405 | 413 |
| |
406 |
| - | |
407 |
| - | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
408 | 420 |
| |
409 | 421 |
| |
410 | 422 |
| |
|
Lines changed: 8 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
242 | 242 |
| |
243 | 243 |
| |
244 | 244 |
| |
| 245 | + | |
| 246 | + | |
| 247 | + | |
245 | 248 |
| |
246 | 249 |
| |
247 | 250 |
| |
| |||
901 | 904 |
| |
902 | 905 |
| |
903 | 906 |
| |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
904 | 911 |
| |
905 | 912 |
| |
906 | 913 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
1416 | 1416 |
| |
1417 | 1417 |
| |
1418 | 1418 |
| |
| 1419 | + | |
1419 | 1420 |
| |
1420 | 1421 |
| |
1421 | 1422 |
| |
|
Lines changed: 21 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
108 | 108 |
| |
109 | 109 |
| |
110 | 110 |
| |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + |
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + |
0 commit comments
Comments
(0)