Commit 19e065c
committed
Ensure variables live across calls in generate_series(numeric, numeric).
In generate_series_step_numeric(), the variables "start_num"
and "stop_num" may be potentially freed until the next call.
So they should be put in the location which can survive across calls.
But previously they were not, and which could cause incorrect
behavior of generate_series(numeric, numeric). This commit fixes
this problem by copying them on multi_call_memory_ctx.
Andrew Gierth1 parent ccf292c commit 19e065c
File tree
3 files changed
+50
-3
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+50
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1325 | 1325 | | |
1326 | 1326 | | |
1327 | 1327 | | |
1328 | | - | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
1329 | 1331 | | |
1330 | | - | |
1331 | | - | |
| 1332 | + | |
| 1333 | + | |
1332 | 1334 | | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
1333 | 1338 | | |
1334 | 1339 | | |
1335 | 1340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1461 | 1461 | | |
1462 | 1462 | | |
1463 | 1463 | | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
854 | 854 | | |
855 | 855 | | |
856 | 856 | | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
0 commit comments