forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita7aa61f
committed
Properly initialize SortSupport for ORDER BY rechecks in nodeIndexscan.c.
Fix still another bug in commit35fcb1b: it failed to fully initializethe SortSupport states it introduced to allow the executor to re-checkORDER BY expressions containing distance operators. That led to a nullpointer dereference if the sortsupport code tried to use ssup_cxt. Theproblem only manifests in narrow cases, explaining the lack of previousfield reports. It requires a GiST-indexable distance operator that lacksSortSupport and is on a pass-by-ref data type, which among core+contribseems to be only btree_gist's interval opclass; and it requires the scanto be done as an IndexScan not an IndexOnlyScan, which explains howbtree_gist's regression test didn't catch it. Per bug #14134 fromJihyun Yu.Peter GeogheganReport: <20160511154904.2603.43889@wrigleys.postgresql.org>1 parentc82037e commita7aa61f
File tree
3 files changed
+37
-2
lines changed- contrib/btree_gist
- expected
- sql
- src/backend/executor
3 files changed
+37
-2
lines changedLines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
89 | 89 |
| |
90 | 90 |
| |
91 | 91 |
| |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + |
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + |
Lines changed: 13 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
966 | 966 |
| |
967 | 967 |
| |
968 | 968 |
| |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
969 | 982 |
| |
970 |
| - | |
971 |
| - | |
972 | 983 |
| |
973 | 984 |
| |
974 | 985 |
| |
|
0 commit comments
Comments
(0)