mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-12 01:18:35 +08:00
Fix incorrect hash equality operator bug in Memoize
In v14, because we don't have a field in RestrictInfo to cache both the left and right type's hash equality operator, we just restrict the scope of Memoize to only when the left and right types of a RestrictInfo are the same. In master we add another field to RestrictInfo and cache both hash equality operators. Reported-by: Jaime Casanova Author: David Rowley Discussion: https://postgr.es/m/20210929185544.GB24346%40ahch-to Backpatch-through: 14
This commit is contained in:
@ -2122,8 +2122,9 @@ typedef struct RestrictInfo
|
||||
Selectivity left_mcvfreq; /* left side's most common val's freq */
|
||||
Selectivity right_mcvfreq; /* right side's most common val's freq */
|
||||
|
||||
/* hash equality operator used for memoize nodes, else InvalidOid */
|
||||
Oid hasheqoperator;
|
||||
/* hash equality operators used for memoize nodes, else InvalidOid */
|
||||
Oid left_hasheqoperator;
|
||||
Oid right_hasheqoperator;
|
||||
} RestrictInfo;
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user