- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit16d69ec
committed
Remove buggy and dead code from CreateTriggerFiringOn
Here we remove some dead code from CreateTriggerFiringOn() which wasattempting to find the relevant child partition index corresponding to thegiven indexOid. As it turned out, thanks to -Wshadow=compatible-local,this code was buggy as the code which was finding the child indexesassigned those to a shadowed variable that directly went out of scope.The code which thought it was looking at the List of child indexes wasalways referencing an empty List.On further investigation, this code is dead. We never callCreateTriggerFiringOn() passing a valid indexOid in a way that thefunction would actually ever execute the code in question. So, for lackof a way to test if a fix actually works, let's just remove the dead codeinstead.As a reminder, if there is ever a need to resurrect this code, an Assert()has been added to remind future feature developers that they might need towrite some code to find the corresponding child index.Reported-by: Justin PryzbyReviewed-by: Justin PryzbyDiscussion:https://postgr.es/m/20220819211824.GX26426@telsasoft.com1 parent8c06a28 commit16d69ec
1 file changed
+5
-39
lines changedLines changed: 5 additions & 39 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1147 | 1147 |
| |
1148 | 1148 |
| |
1149 | 1149 |
| |
1150 |
| - | |
1151 |
| - | |
1152 | 1150 |
| |
1153 | 1151 |
| |
1154 | 1152 |
| |
| |||
1158 | 1156 |
| |
1159 | 1157 |
| |
1160 | 1158 |
| |
1161 |
| - | |
1162 |
| - | |
1163 |
| - | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
1164 | 1162 |
| |
1165 |
| - | |
1166 |
| - | |
1167 |
| - | |
1168 |
| - | |
1169 |
| - | |
1170 |
| - | |
1171 |
| - | |
1172 |
| - | |
1173 |
| - | |
1174 |
| - | |
1175 |
| - | |
| 1163 | + | |
1176 | 1164 |
| |
1177 | 1165 |
| |
1178 | 1166 |
| |
1179 | 1167 |
| |
1180 | 1168 |
| |
1181 | 1169 |
| |
1182 |
| - | |
1183 |
| - | |
1184 |
| - | |
1185 | 1170 |
| |
1186 | 1171 |
| |
1187 | 1172 |
| |
1188 | 1173 |
| |
1189 | 1174 |
| |
1190 | 1175 |
| |
1191 |
| - | |
1192 |
| - | |
1193 |
| - | |
1194 |
| - | |
1195 |
| - | |
1196 |
| - | |
1197 |
| - | |
1198 |
| - | |
1199 |
| - | |
1200 |
| - | |
1201 |
| - | |
1202 |
| - | |
1203 |
| - | |
1204 |
| - | |
1205 |
| - | |
1206 |
| - | |
1207 |
| - | |
1208 | 1176 |
| |
1209 | 1177 |
| |
1210 | 1178 |
| |
| |||
1224 | 1192 |
| |
1225 | 1193 |
| |
1226 | 1194 |
| |
1227 |
| - | |
| 1195 | + | |
1228 | 1196 |
| |
1229 | 1197 |
| |
1230 | 1198 |
| |
| |||
1235 | 1203 |
| |
1236 | 1204 |
| |
1237 | 1205 |
| |
1238 |
| - | |
1239 |
| - | |
1240 | 1206 |
| |
1241 | 1207 |
| |
1242 | 1208 |
| |
|
0 commit comments
Comments
(0)