Skip to content

Commit 1607ce7

Browse files
committed
Just check if we are in client trans
Signed-off-by: mohitkhullar <mkhullar1@bloomberg.net>
1 parent 6366c64 commit 1607ce7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

db/sqlinterfaces.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5289,7 +5289,7 @@ void cleanup_clnt(struct sqlclntstate *clnt)
52895289
int gbl_unexpected_last_type_warn = 1;
52905290
int gbl_unexpected_last_type_abort = 0;
52915291

5292-
uint64_t cdb2_get_tid() {
5292+
int cdb2_in_client_trans() {
52935293
struct sql_thread *thd = pthread_getspecific(query_info_key);
52945294
if (thd == NULL)
52955295
return 0;
@@ -5298,10 +5298,7 @@ uint64_t cdb2_get_tid() {
52985298
if (clnt == NULL)
52995299
return 0;
53005300

5301-
if (clnt->dbtran.cursor_tran)
5302-
return clnt->dbtran.cursor_tran->id;
5303-
5304-
return 0;
5301+
return clnt->in_client_trans;
53055302
}
53065303

53075304
void reset_clnt(struct sqlclntstate *clnt, int initial)

0 commit comments

Comments
 (0)