Skip to content
Browse files

Concurrent scans on the same backend failing bug fixed

  • Loading branch information...
1 parent 7b98541 commit 23853e24885093b1f3c30d606a39f4c15b150d9f @atris committed Oct 8, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 jdbc_fdw.c
View
5 jdbc_fdw.c
@@ -99,6 +99,7 @@ typedef struct jdbcFdwExecutionState
{
char *query;
int NumberOfRows;
+ jobject java_call;
int NumberOfColumns;
} jdbcFdwExecutionState;
@@ -890,6 +891,8 @@ jdbcBeginForeignScan(ForeignScanState *node, int eflags)
elog(ERROR, "java_call is NULL");
}
+ festate->java_call = java_call;
+
initialize_result = (*env)->CallObjectMethod(env, java_call, id_initialize, arg_array);
if (initialize_result != NULL)
{
@@ -928,6 +931,7 @@ jdbcIterateForeignScan(ForeignScanState *node)
jstring tempString;
jdbcFdwExecutionState *festate = (jdbcFdwExecutionState *) node->fdw_state;
TupleTableSlot *slot = node->ss.ss_ScanTupleSlot;
+ jobject java_call = festate->java_call;
/* Cleanup */
ExecClearTuple(slot);
@@ -996,6 +1000,7 @@ jdbcEndForeignScan(ForeignScanState *node)
jstring close_result = NULL;
char *close_result_cstring = NULL;
jdbcFdwExecutionState *festate = (jdbcFdwExecutionState *) node->fdw_state;
+ jobject java_call = festate->java_call;
SIGINTInterruptCheckProcess();

0 comments on commit 23853e2

Please sign in to comment.
Something went wrong with that request. Please try again.