Skip to content
Snippets Groups Projects
Commit 8728552b authored by Alexander Korotkov's avatar Alexander Korotkov
Browse files

Fix bug in pairingheap_SpGistSearchItem_cmp()

Our item contains only so->numberOfNonNullOrderBys of distances.  Reflect that
in the loop upper bound.

Discussion: https://postgr.es/m/53536807-784c-e029-6e92-6da802ab8d60%40postgrespro.ru
Author: Nikita Glukhov
Backpatch-through: 12
parent 17822c0e
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,7 @@ pairingheap_SpGistSearchItem_cmp(const pairingheap_node *a,
else
{
/* Order according to distance comparison */
for (i = 0; i < so->numberOfOrderBys; i++)
for (i = 0; i < so->numberOfNonNullOrderBys; i++)
{
if (isnan(sa->distances[i]) && isnan(sb->distances[i]))
continue; /* NaN == NaN */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment