diff --git a/src/client/inc/tsclient.h b/src/client/inc/tsclient.h index 47f4a65442..8f76f812ac 100644 --- a/src/client/inc/tsclient.h +++ b/src/client/inc/tsclient.h @@ -334,7 +334,7 @@ typedef struct SSubqueryState { typedef struct SSqlObj { void *signature; - pthread_t owner; // owner of sql object, by which it is executed + int64_t owner; // owner of sql object, by which it is executed STscObj *pTscObj; int64_t rpcRid; __async_cb_func_t fp; diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index ca5d8dd055..cfa73b969d 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -2578,11 +2578,7 @@ bool tscSetSqlOwner(SSqlObj* pSql) { SSqlRes* pRes = &pSql->res; // set the sql object owner -#ifdef __APPLE__ - pthread_t threadId = (pthread_t)taosGetSelfPthreadId(); -#else // __APPLE__ int64_t threadId = taosGetSelfPthreadId(); -#endif // __APPLE__ if (atomic_val_compare_exchange_64(&pSql->owner, 0, threadId) != 0) { pRes->code = TSDB_CODE_QRY_IN_EXEC; return false;