Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 49ad32d

Browse files
committed
Fix recently-introduced crash in array_contain_compare().
Silly oversight in commit 1dc5ebc: when array2 is an expanded array, it might have array2->xpn.dnulls equal to NULL, indicating the array is known null-free. The code wasn't expecting that, because it formerly always used deconstruct_array() which always delivers a nulls array. Per bug #13334 from Regina Obe.
1 parent 5302760 commit 49ad32d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/adt/arrayfuncs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4110,7 +4110,7 @@ array_contain_compare(AnyArrayType *array1, AnyArrayType *array2, Oid collation,
41104110
for (j = 0; j < nelems2; j++)
41114111
{
41124112
Datum elt2 = values2[j];
4113-
bool isnull2 = nulls2[j];
4113+
bool isnull2 = nulls2 ? nulls2[j] : false;
41144114
bool oprresult;
41154115

41164116
if (isnull2)

0 commit comments

Comments
 (0)