forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb3358e2
committed
Fix bug introduced into mergejoin logic by performance improvement patch of
2005-05-13. When we find that a new inner tuple can't possibly match anyouter tuple (because it contains a NULL), we can't immediately skip thetuple when we are in NEXTINNER state. Doing so can lead to emittingmultiple copies of the tuple in FillInner mode, because we may rescan thetuple after returning to a previous marked tuple. Instead, proceed toNEXTOUTER state the same as we used to do. After we've found that there'sno need to return to the marked position, we can go to SKIPINNER_ADVANCEstate instead of SKIP_TEST when the inner tuple is unmatchable; thispreserves the performance improvement. Per bug report from Bruce.I also made a couple of cosmetic code rearrangements and added a regressiontest for the problem.1 parent5094f99 commitb3358e2
File tree
4 files changed
+127
-29
lines changed- src
- backend/executor
- test/regress
- expected
- sql
4 files changed
+127
-29
lines changedLines changed: 50 additions & 29 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
948 | 948 |
| |
949 | 949 |
| |
950 | 950 |
| |
951 |
| - | |
952 |
| - | |
953 |
| - | |
954 | 951 |
| |
955 | 952 |
| |
956 | 953 |
| |
| |||
963 | 960 |
| |
964 | 961 |
| |
965 | 962 |
| |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
966 | 969 |
| |
967 |
| - | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
968 | 974 |
| |
969 | 975 |
| |
970 | 976 |
| |
| |||
1054 | 1060 |
| |
1055 | 1061 |
| |
1056 | 1062 |
| |
1057 |
| - | |
| 1063 | + | |
1058 | 1064 |
| |
1059 |
| - | |
1060 |
| - | |
| 1065 | + | |
| 1066 | + | |
1061 | 1067 |
| |
1062 | 1068 |
| |
1063 | 1069 |
| |
1064 |
| - | |
1065 |
| - | |
| 1070 | + | |
| 1071 | + | |
1066 | 1072 |
| |
1067 | 1073 |
| |
1068 | 1074 |
| |
| |||
1071 | 1077 |
| |
1072 | 1078 |
| |
1073 | 1079 |
| |
1074 |
| - | |
| 1080 | + | |
1075 | 1081 |
| |
1076 | 1082 |
| |
1077 | 1083 |
| |
| |||
1105 | 1111 |
| |
1106 | 1112 |
| |
1107 | 1113 |
| |
1108 |
| - | |
1109 |
| - | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
1110 | 1117 |
| |
1111 | 1118 |
| |
1112 | 1119 |
| |
| |||
1179 | 1186 |
| |
1180 | 1187 |
| |
1181 | 1188 |
| |
1182 |
| - | |
1183 |
| - | |
1184 |
| - | |
1185 |
| - | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
1186 | 1202 |
| |
1187 | 1203 |
| |
1188 | 1204 |
| |
| |||
1293 | 1309 |
| |
1294 | 1310 |
| |
1295 | 1311 |
| |
1296 |
| - | |
| 1312 | + | |
1297 | 1313 |
| |
1298 |
| - | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
1299 | 1320 |
| |
1300 |
| - | |
1301 | 1321 |
| |
1302 |
| - | |
1303 |
| - | |
1304 |
| - | |
1305 | 1322 |
| |
1306 | 1323 |
| |
1307 | 1324 |
| |
| |||
1356 | 1373 |
| |
1357 | 1374 |
| |
1358 | 1375 |
| |
1359 |
| - | |
| 1376 | + | |
1360 | 1377 |
| |
1361 |
| - | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
1362 | 1387 |
| |
1363 |
| - | |
1364 | 1388 |
| |
1365 |
| - | |
1366 |
| - | |
1367 |
| - | |
1368 | 1389 |
| |
1369 | 1390 |
| |
1370 | 1391 |
| |
|
Lines changed: 28 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2182 | 2182 |
| |
2183 | 2183 |
| |
2184 | 2184 |
| |
| 2185 | + | |
| 2186 | + | |
| 2187 | + | |
| 2188 | + | |
| 2189 | + | |
| 2190 | + | |
| 2191 | + | |
| 2192 | + | |
| 2193 | + | |
| 2194 | + | |
| 2195 | + | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
| 2205 | + | |
| 2206 | + | |
| 2207 | + | |
| 2208 | + | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + |
Lines changed: 28 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2182 | 2182 |
| |
2183 | 2183 |
| |
2184 | 2184 |
| |
| 2185 | + | |
| 2186 | + | |
| 2187 | + | |
| 2188 | + | |
| 2189 | + | |
| 2190 | + | |
| 2191 | + | |
| 2192 | + | |
| 2193 | + | |
| 2194 | + | |
| 2195 | + | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
| 2205 | + | |
| 2206 | + | |
| 2207 | + | |
| 2208 | + | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + |
Lines changed: 21 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
369 | 369 |
| |
370 | 370 |
| |
371 | 371 |
| |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + |
0 commit comments
Comments
(0)