Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbd305f3

Browse files
committed
Fix multi-column index scans in internal pages.
1 parent8f4559d commitbd305f3

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

‎src/backend/access/nbtree/nbtsearch.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.26 1997/09/08 20:54:27 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.27 1997/10/22 19:02:52 vadim Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -197,8 +197,12 @@ _bt_moveright(Relation rel,
197197
* if number of attrs > keysize. Example: (2,0) - last items
198198
* on this page, (2,1) - first item on next page (hikey), our
199199
* scankey is x = 2. Scankey == (2,1) because of we compare
200-
* first attrs only, but we shouldn't to move right of here. -
201-
* vadim 04/15/97
200+
* first attrs only, but we shouldn't to move right of here.
201+
* - vadim 04/15/97
202+
*
203+
* Also, if this page is not LEAF one (and # of attrs > keysize)
204+
* then we can't move too.
205+
*- vadim 10/22/97
202206
*/
203207

204208
if (_bt_skeycmp(rel,keysz,scankey,page,hikey,
@@ -227,6 +231,8 @@ _bt_moveright(Relation rel,
227231
elog(FATAL,"btree: unexpected greater last item");
228232
/* move right */
229233
}
234+
elseif (!(opaque->btpo_flags&BTP_LEAF))
235+
break;
230236
elseif (_bt_skeycmp(rel,keysz,scankey,page,
231237
PageGetItemId(page,offmax),
232238
BTLessEqualStrategyNumber))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp