We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6366c64 commit 1607ce7Copy full SHA for 1607ce7
db/sqlinterfaces.c
@@ -5289,7 +5289,7 @@ void cleanup_clnt(struct sqlclntstate *clnt)
5289
int gbl_unexpected_last_type_warn = 1;
5290
int gbl_unexpected_last_type_abort = 0;
5291
5292
-uint64_t cdb2_get_tid() {
+int cdb2_in_client_trans() {
5293
struct sql_thread *thd = pthread_getspecific(query_info_key);
5294
if (thd == NULL)
5295
return 0;
@@ -5298,10 +5298,7 @@ uint64_t cdb2_get_tid() {
5298
if (clnt == NULL)
5299
5300
5301
- if (clnt->dbtran.cursor_tran)
5302
- return clnt->dbtran.cursor_tran->id;
5303
-
5304
- return 0;
+ return clnt->in_client_trans;
5305
}
5306
5307
void reset_clnt(struct sqlclntstate *clnt, int initial)
0 commit comments