forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9bf2476
committed
Avoid failure when selecting a namespace node in XMLTABLE.
It appears that libxml2 doesn't bother to set the "children" field ofan XML_NAMESPACE_DECL node to null; that field just contains garbage.In v10 and v11, this can result in a crash in XMLTABLE(). The rewritedone in commit251cf2e fixed this, somewhat accidentally, in v12.We're not going to back-patch251cf2e, however. The case apparentlydoesn't have wide use, so rather than risk introducing other problems,just add a safety check to throw an error.Even though no bug manifests in v12/HEAD, add the relevant test casethere too, to prevent future regressions.Chapman Flack (per private report)1 parent84d1c5c commit9bf2476
5 files changed
+26
-1
lines changedLines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4608 | 4608 |
| |
4609 | 4609 |
| |
4610 | 4610 |
| |
| 4611 | + | |
| 4612 | + | |
| 4613 | + | |
| 4614 | + | |
| 4615 | + | |
| 4616 | + | |
4611 | 4617 |
| |
4612 | 4618 |
| |
4613 | 4619 |
| |
4614 | 4620 |
| |
4615 | 4621 |
| |
4616 | 4622 |
| |
4617 | 4623 |
| |
4618 |
| - | |
4619 | 4624 |
| |
4620 | 4625 |
| |
4621 | 4626 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1167 | 1167 |
| |
1168 | 1168 |
| |
1169 | 1169 |
| |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
1170 | 1174 |
| |
1171 | 1175 |
| |
1172 | 1176 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1042 | 1042 |
| |
1043 | 1043 |
| |
1044 | 1044 |
| |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
1045 | 1053 |
| |
1046 | 1054 |
| |
1047 | 1055 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1147 | 1147 |
| |
1148 | 1148 |
| |
1149 | 1149 |
| |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
1150 | 1154 |
| |
1151 | 1155 |
| |
1152 | 1156 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
401 | 401 |
| |
402 | 402 |
| |
403 | 403 |
| |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
404 | 408 |
| |
405 | 409 |
| |
406 | 410 |
| |
|
0 commit comments
Comments
(0)