diff --git a/src/client/inc/tscSecondaryMerge.h b/src/client/inc/tscSecondaryMerge.h index 09e23adcb1221bc537d2906fd82a8860df54d7f0..2f47fe36d582babbe2b5ff01d3aaa4cb4c411aaf 100644 --- a/src/client/inc/tscSecondaryMerge.h +++ b/src/client/inc/tscSecondaryMerge.h @@ -20,6 +20,7 @@ extern "C" { #endif +#include "taosmsg.h" #include "textbuffer.h" #include "tinterpolation.h" #include "tlosertree.h" diff --git a/src/client/src/tscParseInsert.c b/src/client/src/tscParseInsert.c index 1951b1249db489bf630a164507e1be4ee5ea2d82..6de2d3bb87d25e4f30dd416cdf069844313a8f95 100644 --- a/src/client/src/tscParseInsert.c +++ b/src/client/src/tscParseInsert.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index e786e6b1343a264a36ffdec76054a1a4fbcd815a..e153344cb49e631fa041c8eb224885ff885e7cc7 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -3949,7 +3949,8 @@ int32_t parseCreateDBOptions(SCreateDBInfo* pCreateDbSql, SSqlCmd* pCmd) { if (pCreateDbSql->keep != NULL) { switch (pCreateDbSql->keep->nExpr) { - case 1:pMsg->daysToKeep = htonl(pCreateDbSql->keep->a[0].pVar.i64Key); + case 1: + pMsg->daysToKeep = htonl(pCreateDbSql->keep->a[0].pVar.i64Key); break; case 2: { pMsg->daysToKeep = htonl(pCreateDbSql->keep->a[0].pVar.i64Key); diff --git a/src/util/src/tcache.c b/src/util/src/tcache.c index 4396d9fda947a7a1a7a79d192e5e5316f1151ad2..ab887637cbcd85e026aba9f4a0dea4c75d7d486c 100644 --- a/src/util/src/tcache.c +++ b/src/util/src/tcache.c @@ -521,10 +521,12 @@ void *taosGetDataFromCache(void *handle, char *key) { pthread_rwlock_rdlock(&pObj->lock); SDataNode *ptNode = taosGetNodeFromHashTable(handle, key, keyLen); + if (ptNode != NULL) { + ptNode->refCount += 1; + } pthread_rwlock_unlock(&pObj->lock); if (ptNode != NULL) { - __sync_add_and_fetch_32(&ptNode->refCount, 1); __sync_add_and_fetch_32(&pObj->statistics.hitCount, 1); pTrace("key:%s is retrieved from cache,refcnt:%d", key, ptNode->refCount);