Skip to content

Commit 241b198

Browse files
committed
Merge branch 'master' of git.postgrespro.ru:pgpro-dev/rum
2 parents 063ca03 + d9607bf commit 241b198

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

src/rum_ts_utils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ pre_checkcondition_rum(void *checkval, QueryOperand *val, ExecPhraseData *data)
216216
j = gcv->map_item_operand[((QueryItem *) val) - gcv->first_item];
217217
/* return presence of current entry in indexed value */
218218
#if PG_VERSION_NUM >= 130000
219-
return ( *(gcv->need_recheck) ? TS_MAYBE : gcv->check[j] );
219+
return ( *(gcv->need_recheck) ? TS_MAYBE : (gcv->check[j] ? TS_YES : TS_NO) );
220220
#else
221221
return gcv->check[j];
222222
#endif
@@ -228,7 +228,7 @@ rum_tsquery_pre_consistent(PG_FUNCTION_ARGS)
228228
bool *check = (bool *) PG_GETARG_POINTER(0);
229229
TSQuery query = PG_GETARG_TSQUERY(2);
230230
Pointer *extra_data = (Pointer *) PG_GETARG_POINTER(4);
231-
bool recheck;
231+
bool recheck = false;
232232
bool res = false;
233233

234234
if (query->size > 0)

src/rumscan.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -703,9 +703,12 @@ rumNewScanKey(IndexScanDesc scan)
703703
repalloc(so->entries, so->allocentries * sizeof(RumScanEntry));
704704
}
705705

706-
memcpy(so->entries + so->totalentries,
707-
key->scanEntry, sizeof(*key->scanEntry) * key->nentries);
708-
so->totalentries += key->nentries;
706+
if ( key->scanEntry != NULL )
707+
{
708+
memcpy(so->entries + so->totalentries,
709+
key->scanEntry, sizeof(*key->scanEntry) * key->nentries);
710+
so->totalentries += key->nentries;
711+
}
709712
}
710713

711714
/*

src/rumsort.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
#include "commands/tablespace.h"
2323
#include "executor/executor.h"
24-
#include "utils/guc.h"
2524
#include "utils/logtape.h"
2625
#include "utils/pg_rusage.h"
2726

@@ -52,9 +51,18 @@
5251
* Below are copied definitions from src/backend/utils/sort/tuplesort.c.
5352
*/
5453

55-
/* GUC variables */
54+
/* For PGPRO since v.13 trace_sort is imported from backend by including its
55+
* declaration in guc.h (guc.h contains added Windows export/import magic to be done
56+
* during postgres.exe compilation).
57+
* For older or non-PGPRO versions on Windows platform trace_sort is not exported by
58+
* backend so it is declared local for this case.
59+
*/
5660
#ifdef TRACE_SORT
57-
bool trace_sort = false;
61+
#if ( !defined (_MSC_VER) || (PG_VERSION_NUM >= 130000 && defined (PGPRO_VERSION)) )
62+
#include "utils/guc.h"
63+
#else
64+
bool trace_sort = false;
65+
#endif
5866
#endif
5967

6068
typedef struct

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy