forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit592a163
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 parentcbe63d0 commit592a163
4 files changed
+28
-0
lines changedLines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1170 | 1170 |
| |
1171 | 1171 |
| |
1172 | 1172 |
| |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
1173 | 1181 |
| |
1174 | 1182 |
| |
1175 | 1183 |
| |
|
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: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1150 | 1150 |
| |
1151 | 1151 |
| |
1152 | 1152 |
| |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
1153 | 1161 |
| |
1154 | 1162 |
| |
1155 | 1163 |
| |
|
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)