mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-01 10:41:18 +02:00
Fix multi-column index scans in internal pages.
This commit is contained in:
parent
8f4559d0e1
commit
bd305f3f06
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.26 1997/09/08 20:54:27 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.27 1997/10/22 19:02:52 vadim Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -197,8 +197,12 @@ _bt_moveright(Relation rel,
|
|||||||
* if number of attrs > keysize. Example: (2,0) - last items
|
* if number of attrs > keysize. Example: (2,0) - last items
|
||||||
* on this page, (2,1) - first item on next page (hikey), our
|
* on this page, (2,1) - first item on next page (hikey), our
|
||||||
* scankey is x = 2. Scankey == (2,1) because of we compare
|
* scankey is x = 2. Scankey == (2,1) because of we compare
|
||||||
* first attrs only, but we shouldn't to move right of here. -
|
* first attrs only, but we shouldn't to move right of here.
|
||||||
* vadim 04/15/97
|
* - vadim 04/15/97
|
||||||
|
*
|
||||||
|
* Also, if this page is not LEAF one (and # of attrs > keysize)
|
||||||
|
* then we can't move too.
|
||||||
|
* - vadim 10/22/97
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (_bt_skeycmp(rel, keysz, scankey, page, hikey,
|
if (_bt_skeycmp(rel, keysz, scankey, page, hikey,
|
||||||
@ -227,6 +231,8 @@ _bt_moveright(Relation rel,
|
|||||||
elog(FATAL, "btree: unexpected greater last item");
|
elog(FATAL, "btree: unexpected greater last item");
|
||||||
/* move right */
|
/* move right */
|
||||||
}
|
}
|
||||||
|
else if (!(opaque->btpo_flags & BTP_LEAF))
|
||||||
|
break;
|
||||||
else if (_bt_skeycmp(rel, keysz, scankey, page,
|
else if (_bt_skeycmp(rel, keysz, scankey, page,
|
||||||
PageGetItemId(page, offmax),
|
PageGetItemId(page, offmax),
|
||||||
BTLessEqualStrategyNumber))
|
BTLessEqualStrategyNumber))
|
||||||
|
Loading…
Reference in New Issue
Block a user