- Notifications
You must be signed in to change notification settings - Fork5.2k
Commit0f08df4
committed
Avoid treating nonrequired nbtree keys as required.
Consistently prevent nbtree array advancement from treating a scankey asrequired when operating in pstate.forcenonrequired mode. Otherwise, werisk a NULL pointer dereference. This was possible in the path where_bt_check_compare is called to recheck a tuple that advanced all of thescan's arrays to matching values: its continuescan=false handlingexpects _bt_advance_array_keys to have been called with a valid pstate,but it'll always be NULL during sktrig_required=false calls (which ishow _bt_advance_array_keys must be called when pstate.forcenonrequired).Oversight in commit8a51027, which optimized nbtree search scan keycomparisons.Author: Peter Geoghegan <pg@bowt.ie>Reported-By: Mark Dilger <mark.dilger@enterprisedb.com>Discussion:https://postgr.es/m/CAHgHdKsn2W=gPBmj7p6MjQFvxB+zZDBkwTSg0o3f5Hh8rkRrsA@mail.gmail.comDiscussion:https://postgr.es/m/CAH2-WzmodSE+gpTd1CRGU9ez8ytyyDS+Kns2r9NzgUp1s56kpw@mail.gmail.com1 parent1681a70 commit0f08df4
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1826 | 1826 | | |
1827 | 1827 | | |
1828 | 1828 | | |
1829 | | - | |
| 1829 | + | |
1830 | 1830 | | |
1831 | 1831 | | |
1832 | 1832 | | |
| |||
2799 | 2799 | | |
2800 | 2800 | | |
2801 | 2801 | | |
2802 | | - | |
2803 | | - | |
2804 | 2802 | | |
2805 | 2803 | | |
2806 | 2804 | | |
| |||
0 commit comments
Comments
(0)