- Notifications
You must be signed in to change notification settings - Fork28
Commitf7da492
committed
Fix array size allocation for HashAggregate hash keys.
When there were duplicate columns in the hash key list, the arraysizes could be miscomputed, resulting in access off the end of thearray. Adjust the computation to ensure the array is always largeenough.(I considered whether the duplicates could be removed in planning, butI can't rule out the possibility that duplicate columns might havedifferent hash functions assigned. Simpler to just make sure it worksat execution time regardless.)Bug apparently introduced infc4b3de as part of narrowing down thetuples stored in the hashtable. Reported by Colm McHugh of Salesforce,though I didn't use their patch. Backpatch back to version 10 wherethe bug was introduced.Discussion:https://postgr.es/m/CAFeeJoKKu0u+A_A9R9316djW-YW3-+Gtgvy3ju655qRHR3jtdA@mail.gmail.com1 parenta7b2fca commitf7da492
File tree
3 files changed
+47
-7
lines changed- src
- backend/executor
- test/regress
- expected
- sql
3 files changed
+47
-7
lines changedLines changed: 22 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1311 | 1311 |
| |
1312 | 1312 |
| |
1313 | 1313 |
| |
1314 |
| - | |
1315 |
| - | |
1316 |
| - | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
1317 | 1322 |
| |
1318 | 1323 |
| |
1319 | 1324 |
| |
| |||
1334 | 1339 |
| |
1335 | 1340 |
| |
1336 | 1341 |
| |
| 1342 | + | |
1337 | 1343 |
| |
1338 | 1344 |
| |
1339 | 1345 |
| |
| |||
1358 | 1364 |
| |
1359 | 1365 |
| |
1360 | 1366 |
| |
1361 |
| - | |
1362 |
| - | |
1363 |
| - | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
1364 | 1375 |
| |
1365 | 1376 |
| |
1366 |
| - | |
| 1377 | + | |
1367 | 1378 |
| |
1368 | 1379 |
| |
1369 | 1380 |
| |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
1370 | 1385 |
| |
1371 | 1386 |
| |
1372 | 1387 |
| |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2140 | 2140 |
| |
2141 | 2141 |
| |
2142 | 2142 |
| |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + |
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
944 | 944 |
| |
945 | 945 |
| |
946 | 946 |
| |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + |
0 commit comments
Comments
(0)