forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6777080
committed
Explicitly support the case that a plancache's raw_parse_tree is NULL.
This only happens if a client issues a Parse message with an empty querystring, which is a bit odd; but since it is explicitly called out as legalby our FE/BE protocol spec, we'd probably better continue to allow it.Fix by adding tests everywhere that the raw_parse_tree field is passed tofunctions that don't or shouldn't accept NULL. Also make it clear in therelevant comments that NULL is an expected case.This reverts commitsa73c9db and2e9650c, which fixed specific crashsymptoms by hacking things at what now seems to be the wrong end, ie thecallee functions. Making the callees allow NULL is superficially morerobust, but it's not always true that there is a defensible thing for thecallee to do in such cases. The caller has more context and is betterable to decide what the empty-query case ought to do.Per followup discussion of bug #11335. Back-patch to 9.2. The codebefore that is sufficiently different that it would require developmentof a separate patch, which doesn't seem worthwhile for what is believedto be an essentially cosmetic change.1 parentec5896a commit6777080
File tree
6 files changed
+15
-15
lines changed- src
- backend
- executor
- parser
- tcop
- utils/cache
- include/utils
6 files changed
+15
-15
lines changedLines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2037 | 2037 |
| |
2038 | 2038 |
| |
2039 | 2039 |
| |
2040 |
| - | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
2041 | 2043 |
| |
2042 | 2044 |
| |
2043 | 2045 |
| |
|
Lines changed: 1 addition & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
288 | 288 |
| |
289 | 289 |
| |
290 | 290 |
| |
291 |
| - | |
292 |
| - | |
| 291 | + | |
293 | 292 |
| |
294 | 293 |
| |
295 | 294 |
| |
296 | 295 |
| |
297 | 296 |
| |
298 | 297 |
| |
299 |
| - | |
300 |
| - | |
301 |
| - | |
302 | 298 |
| |
303 | 299 |
| |
304 | 300 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1546 | 1546 |
| |
1547 | 1547 |
| |
1548 | 1548 |
| |
1549 |
| - | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
1550 | 1552 |
| |
1551 | 1553 |
| |
1552 | 1554 |
| |
|
Lines changed: 1 addition & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2485 | 2485 |
| |
2486 | 2486 |
| |
2487 | 2487 |
| |
2488 |
| - | |
2489 |
| - | |
2490 |
| - | |
2491 | 2488 |
| |
2492 | 2489 |
| |
2493 | 2490 |
| |
| |||
2592 | 2589 |
| |
2593 | 2590 |
| |
2594 | 2591 |
| |
2595 |
| - | |
| 2592 | + | |
2596 | 2593 |
| |
2597 | 2594 |
| |
2598 | 2595 |
| |
|
Lines changed: 6 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
141 | 141 |
| |
142 | 142 |
| |
143 | 143 |
| |
144 |
| - | |
| 144 | + | |
145 | 145 |
| |
146 | 146 |
| |
147 | 147 |
| |
| |||
232 | 232 |
| |
233 | 233 |
| |
234 | 234 |
| |
235 |
| - | |
| 235 | + | |
236 | 236 |
| |
237 | 237 |
| |
238 | 238 |
| |
| |||
699 | 699 |
| |
700 | 700 |
| |
701 | 701 |
| |
702 |
| - | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
703 | 705 |
| |
704 | 706 |
| |
705 | 707 |
| |
| |||
928 | 930 |
| |
929 | 931 |
| |
930 | 932 |
| |
| 933 | + | |
931 | 934 |
| |
932 | 935 |
| |
933 | 936 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
76 | 76 |
| |
77 | 77 |
| |
78 | 78 |
| |
79 |
| - | |
| 79 | + | |
80 | 80 |
| |
81 | 81 |
| |
82 | 82 |
| |
|
0 commit comments
Comments
(0)