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

Commitd38767f

Browse files
committed
Add prototypes and remove unused variables from btree Fastbuild patch.
1 parent3eba765 commitd38767f

File tree

2 files changed

+21
-19
lines changed

2 files changed

+21
-19
lines changed

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

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
*
77
* IDENTIFICATION
8-
* $Id: nbtsort.c,v 1.9 1997/02/12 05:04:20 scrappy Exp $
8+
* $Id: nbtsort.c,v 1.10 1997/02/14 22:47:19 momjian Exp $
99
*
1010
* NOTES
1111
*
@@ -596,7 +596,6 @@ _bt_spool(Relation index, BTItem btitem, void *spool)
596596
BTSpool*btspool= (BTSpool*)spool;
597597
BTTapeBlock*itape;
598598
Sizeitemsz;
599-
inti;
600599

601600
itape=btspool->bts_itape[btspool->bts_tape];
602601
itemsz=BTITEMSZ(btitem);
@@ -636,7 +635,7 @@ _bt_spool(Relation index, BTItem btitem, void *spool)
636635
*/
637636
_bt_isortcmpinit(index);
638637
qsort((void*)parray,itape->bttb_ntup,sizeof(BTSortKey),
639-
_bt_isortcmp);
638+
(int (*)(constvoid*,constvoid*))_bt_isortcmp);
640639
}
641640

642641
/*
@@ -743,17 +742,6 @@ _bt_slideleft(Relation index, Buffer buf, Page page)
743742
}
744743
}
745744

746-
typedefstructBTPageState {
747-
Bufferbtps_buf;
748-
Pagebtps_page;
749-
BTItembtps_lastbti;
750-
OffsetNumberbtps_lastoff;
751-
OffsetNumberbtps_firstoff;
752-
intbtps_level;
753-
boolbtps_doupper;
754-
structBTPageState*btps_next;
755-
}BTPageState;
756-
757745
/*
758746
* allocate and initialize a new BTPageState. the returned structure
759747
* is suitable for immediate use by _bt_buildadd.
@@ -841,7 +829,6 @@ _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags)
841829
BTPageState*state= (BTPageState*)pstate;
842830
Buffernbuf;
843831
Pagenpage;
844-
char*pos;
845832
BTItemlast_bti;
846833
OffsetNumberfirst_off;
847834
OffsetNumberlast_off;
@@ -1060,8 +1047,6 @@ _bt_merge(Relation index, BTSpool *btspool)
10601047
intnruns;
10611048
Sizebtisz;
10621049
booldoleaf= false;
1063-
BTPageState*s;
1064-
BTPageOpaque*opaque;
10651050

10661051
/*
10671052
* initialize state needed for the merge into the btree leaf pages.

‎src/include/access/nbtree.h

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: nbtree.h,v 1.6 1997/02/12 05:04:28 scrappy Exp $
9+
* $Id: nbtree.h,v 1.7 1997/02/14 22:47:36 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -114,6 +114,17 @@ typedef struct BTStackData {
114114

115115
typedefBTStackData*BTStack;
116116

117+
typedefstructBTPageState {
118+
Bufferbtps_buf;
119+
Pagebtps_page;
120+
BTItembtps_lastbti;
121+
OffsetNumberbtps_lastoff;
122+
OffsetNumberbtps_firstoff;
123+
intbtps_level;
124+
boolbtps_doupper;
125+
structBTPageState*btps_next;
126+
}BTPageState;
127+
117128
/*
118129
* We need to be able to tell the difference between read and write
119130
* requests for pages, in order to do locking correctly.
@@ -227,7 +238,9 @@ extern void btdelete(Relation rel, ItemPointer tid);
227238
*/
228239
externvoid_bt_regscan(IndexScanDescscan);
229240
externvoid_bt_dropscan(IndexScanDescscan);
230-
externvoid_bt_adjscans(Relationrel,ItemPointertid,intop);
241+
externvoid_bt_adjscans(Relationrel,ItemPointertid);
242+
externvoid_bt_scandel(IndexScanDescscan,BlockNumberblkno,OffsetNumberoffno);
243+
externbool_bt_scantouched(IndexScanDescscan,BlockNumberblkno,OffsetNumberoffno);
231244

232245
/*
233246
* prototypes for functions in nbtsearch.c
@@ -268,6 +281,10 @@ extern BTItem _bt_formitem(IndexTuple itup);
268281
* prototypes for functions in nbtsort.c
269282
*/
270283
externvoid*_bt_spoolinit(Relationindex,intntapes);
284+
externvoid*_bt_pagestate(Relationindex,intflags,intlevel,booldoupper);
285+
externBTItem_bt_minitem(Pageopage,BlockNumberoblkno,intatend);
286+
externBTItem_bt_buildadd(Relationindex,void*pstate,BTItembti,intflags);
287+
externvoid_bt_uppershutdown(Relationindex,BTPageState*state);
271288
externvoid_bt_spooldestroy(void*spool);
272289
externvoid_bt_spool(Relationindex,BTItembtitem,void*spool);
273290
externvoid_bt_upperbuild(Relationindex);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp