- Notifications
You must be signed in to change notification settings - Fork28
Commit18cacf8
committed
Make ExecGetInsertedCols() and friends more robust and improve comments.
If ExecGetInsertedCols(), ExecGetUpdatedCols() or ExecGetExtraUpdatedCols()were called with a ResultRelInfo that's not in the range table and isn't apartition routing target, the functions would dereference a NULL pointer,relinfo->ri_RootResultRelInfo. Such ResultRelInfos are created when firingRI triggers in tables that are not modified directly. None of the currentcallers of these functions pass such relations, so this isn't a live bug,but let's make them more robust.Also update comment in ResultRelInfo; after commit 6214e2b228,ri_RangeTableIndex is zero for ResultRelInfos created for partition tuplerouting.Noted by Coverity. Backpatch down to v11, like commit 6214e2b228.Reviewed-by: Tom Lane, Amit Langote1 parent6c23e5a commit18cacf8
2 files changed
+30
-13
lines changedLines changed: 21 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1210 | 1210 |
| |
1211 | 1211 |
| |
1212 | 1212 |
| |
1213 |
| - | |
1214 |
| - | |
1215 |
| - | |
1216 |
| - | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
1217 | 1217 |
| |
1218 | 1218 |
| |
1219 | 1219 |
| |
1220 | 1220 |
| |
1221 | 1221 |
| |
1222 | 1222 |
| |
1223 | 1223 |
| |
1224 |
| - | |
| 1224 | + | |
1225 | 1225 |
| |
1226 | 1226 |
| |
1227 | 1227 |
| |
| |||
1233 | 1233 |
| |
1234 | 1234 |
| |
1235 | 1235 |
| |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
1236 | 1246 |
| |
1237 | 1247 |
| |
1238 | 1248 |
| |
| |||
1246 | 1256 |
| |
1247 | 1257 |
| |
1248 | 1258 |
| |
1249 |
| - | |
| 1259 | + | |
1250 | 1260 |
| |
1251 | 1261 |
| |
1252 | 1262 |
| |
| |||
1258 | 1268 |
| |
1259 | 1269 |
| |
1260 | 1270 |
| |
| 1271 | + | |
| 1272 | + | |
1261 | 1273 |
| |
1262 | 1274 |
| |
1263 | 1275 |
| |
| |||
1271 | 1283 |
| |
1272 | 1284 |
| |
1273 | 1285 |
| |
1274 |
| - | |
| 1286 | + | |
1275 | 1287 |
| |
1276 | 1288 |
| |
1277 | 1289 |
| |
| |||
1283 | 1295 |
| |
1284 | 1296 |
| |
1285 | 1297 |
| |
| 1298 | + | |
| 1299 | + | |
1286 | 1300 |
| |
1287 | 1301 |
| |
1288 | 1302 |
| |
|
Lines changed: 9 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
395 | 395 |
| |
396 | 396 |
| |
397 | 397 |
| |
398 |
| - | |
399 |
| - | |
400 |
| - | |
401 |
| - | |
402 |
| - | |
403 |
| - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
404 | 407 |
| |
405 | 408 |
| |
406 | 409 |
| |
|
0 commit comments
Comments
(0)