mirror of
https://github.com/postgres/postgres.git
synced 2025-06-01 00:01:20 -04:00
Fix incorrect comparison of scan key in GIN. Per report from
Vyacheslav Kalinin <vka@mgcp.com>
This commit is contained in:
parent
524d357d09
commit
59dbd542ab
@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/gin/ginscan.c,v 1.24 2009/06/11 14:48:53 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/gin/ginscan.c,v 1.24.2.1 2010/01/18 11:53:10 teodor Exp $
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@ -74,7 +74,9 @@ fillScanKey(GinState *ginstate, GinScanKey key, OffsetNumber attnum, Datum query
|
||||
/* link to the equals entry in current scan key */
|
||||
key->scanEntry[i].master = NULL;
|
||||
for (j = 0; j < i; j++)
|
||||
if (compareEntries(ginstate, attnum, entryValues[i], entryValues[j]) == 0)
|
||||
if (compareEntries(ginstate, attnum, entryValues[i], entryValues[j]) == 0 &&
|
||||
key->scanEntry[i].isPartialMatch == key->scanEntry[j].isPartialMatch &&
|
||||
key->scanEntry[i].strategy == key->scanEntry[j].strategy)
|
||||
{
|
||||
key->scanEntry[i].master = key->scanEntry + j;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user