forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9f7a664
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 parent2930f16 commit9f7a664
5 files changed
+26
-1
lines changedLines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4612 | 4612 |
| |
4613 | 4613 |
| |
4614 | 4614 |
| |
| 4615 | + | |
| 4616 | + | |
| 4617 | + | |
| 4618 | + | |
| 4619 | + | |
| 4620 | + | |
4615 | 4621 |
| |
4616 | 4622 |
| |
4617 | 4623 |
| |
4618 | 4624 |
| |
4619 | 4625 |
| |
4620 | 4626 |
| |
4621 | 4627 |
| |
4622 |
| - | |
4623 | 4628 |
| |
4624 | 4629 |
| |
4625 | 4630 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1173 | 1173 |
| |
1174 | 1174 |
| |
1175 | 1175 |
| |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
1176 | 1180 |
| |
1177 | 1181 |
| |
1178 | 1182 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1048 | 1048 |
| |
1049 | 1049 |
| |
1050 | 1050 |
| |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
1051 | 1059 |
| |
1052 | 1060 |
| |
1053 | 1061 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1153 | 1153 |
| |
1154 | 1154 |
| |
1155 | 1155 |
| |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
1156 | 1160 |
| |
1157 | 1161 |
| |
1158 | 1162 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
402 | 402 |
| |
403 | 403 |
| |
404 | 404 |
| |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
405 | 409 |
| |
406 | 410 |
| |
407 | 411 |
| |
|
0 commit comments
Comments
(0)