Commit 07a601e
committed
Avoid crashing in GetOldestSnapshot() if there are no known snapshots.
The sole caller expects NULL to be returned in such a case, so make
it so and document it.
Per reports from Andreas Seltenreich and Regina Obe. This doesn't
really fix their problem, as now their RETURNING queries will say
"ERROR: no known snapshots", but in any case this function should
not dump core in a reasonably-foreseeable situation.
Report: <87vazemeda.fsf@credativ.de>
Report: <20160807051854.1427.32414@wrigleys.postgresql.org>1 parent bcbecbc commit 07a601e
1 file changed
+7
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
402 | | - | |
| 402 | + | |
| 403 | + | |
403 | 404 | | |
404 | 405 | | |
405 | 406 | | |
406 | 407 | | |
407 | 408 | | |
408 | 409 | | |
409 | | - | |
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
419 | | - | |
| 419 | + | |
| 420 | + | |
420 | 421 | | |
421 | | - | |
422 | | - | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
423 | 425 | | |
424 | 426 | | |
425 | 427 | | |
| |||
0 commit comments