Skip to content

Commit 07953bd

Browse files
committed
Update nbtsort-18.c to HEAD of REL_18_STABLE
1 parent 32c6f4c commit 07953bd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/nbtree/nbtsort-18.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ typedef struct BTShared
105105
int scantuplesortstates;
106106

107107
/* Query ID, for report in worker processes */
108-
uint64 queryid;
108+
int64 queryid;
109109

110110
/*
111111
* workersdonecv is used to monitor the progress of workers. All parallel
@@ -1171,7 +1171,7 @@ _bt_load(BTWriteState *wstate, BTSpool *btspool, BTSpool *btspool2)
11711171
{
11721172
SortSupport sortKey = sortKeys + i;
11731173
ScanKey scanKey = wstate->inskey->scankeys + i;
1174-
int16 strategy;
1174+
bool reverse;
11751175

11761176
sortKey->ssup_cxt = CurrentMemoryContext;
11771177
sortKey->ssup_collation = scanKey->sk_collation;
@@ -1183,10 +1183,9 @@ _bt_load(BTWriteState *wstate, BTSpool *btspool, BTSpool *btspool2)
11831183

11841184
Assert(sortKey->ssup_attno != 0);
11851185

1186-
strategy = (scanKey->sk_flags & SK_BT_DESC) != 0 ?
1187-
BTGreaterStrategyNumber : BTLessStrategyNumber;
1186+
reverse = (scanKey->sk_flags & SK_BT_DESC) != 0;
11881187

1189-
PrepareSortSupportFromIndexRel(wstate->index, strategy, sortKey);
1188+
PrepareSortSupportFromIndexRel(wstate->index, reverse, sortKey);
11901189
}
11911190

11921191
for (;;)

0 commit comments

Comments
 (0)