提交 417cf3c5 编写于 作者: G Ganlin Zhao

fix(query): fix valgrind report unitialized variable error

上级 847c0176
...@@ -188,7 +188,7 @@ typedef struct SCtgTbCache { ...@@ -188,7 +188,7 @@ typedef struct SCtgTbCache {
typedef struct SCtgVgCache { typedef struct SCtgVgCache {
SRWLatch vgLock; SRWLatch vgLock;
SDBVgInfo *vgInfo; SDBVgInfo *vgInfo;
} SCtgVgCache; } SCtgVgCache;
typedef struct SCtgDBCache { typedef struct SCtgDBCache {
...@@ -224,7 +224,7 @@ typedef struct SCtgUserAuth { ...@@ -224,7 +224,7 @@ typedef struct SCtgUserAuth {
} SCtgUserAuth; } SCtgUserAuth;
typedef struct SCatalog { typedef struct SCatalog {
uint64_t clusterId; uint64_t clusterId;
SHashObj *userCache; //key:user, value:SCtgUserAuth SHashObj *userCache; //key:user, value:SCtgUserAuth
SHashObj *dbCache; //key:dbname, value:SCtgDBCache SHashObj *dbCache; //key:dbname, value:SCtgDBCache
SCtgRentMgmt dbRent; SCtgRentMgmt dbRent;
...@@ -253,9 +253,9 @@ typedef struct SCtgJob { ...@@ -253,9 +253,9 @@ typedef struct SCtgJob {
int32_t jobResCode; int32_t jobResCode;
int32_t taskIdx; int32_t taskIdx;
SRWLatch taskLock; SRWLatch taskLock;
uint64_t queryId; uint64_t queryId;
SCatalog* pCtg; SCatalog* pCtg;
SRequestConnInfo conn; SRequestConnInfo conn;
void* userParam; void* userParam;
catalogCallback userFp; catalogCallback userFp;
...@@ -279,7 +279,7 @@ typedef struct SCtgMsgCtx { ...@@ -279,7 +279,7 @@ typedef struct SCtgMsgCtx {
void* lastOut; void* lastOut;
void* out; void* out;
char* target; char* target;
SHashObj* pBatchs; SHashObj* pBatchs;
} SCtgMsgCtx; } SCtgMsgCtx;
...@@ -364,7 +364,7 @@ typedef struct SCtgCacheStat { ...@@ -364,7 +364,7 @@ typedef struct SCtgCacheStat {
uint64_t numOfMetaHit; uint64_t numOfMetaHit;
uint64_t numOfMetaMiss; uint64_t numOfMetaMiss;
uint64_t numOfIndexHit; uint64_t numOfIndexHit;
uint64_t numOfIndexMiss; uint64_t numOfIndexMiss;
uint64_t numOfUserHit; uint64_t numOfUserHit;
uint64_t numOfUserMiss; uint64_t numOfUserMiss;
uint64_t numOfClear; uint64_t numOfClear;
...@@ -451,7 +451,7 @@ typedef struct SCtgCacheOperation { ...@@ -451,7 +451,7 @@ typedef struct SCtgCacheOperation {
int32_t opId; int32_t opId;
void *data; void *data;
bool syncOp; bool syncOp;
tsem_t rspSem; tsem_t rspSem;
bool stopQueue; bool stopQueue;
bool unLocked; bool unLocked;
} SCtgCacheOperation; } SCtgCacheOperation;
...@@ -466,7 +466,7 @@ typedef struct SCtgQueue { ...@@ -466,7 +466,7 @@ typedef struct SCtgQueue {
bool stopQueue; bool stopQueue;
SCtgQNode *head; SCtgQNode *head;
SCtgQNode *tail; SCtgQNode *tail;
tsem_t reqSem; tsem_t reqSem;
uint64_t qRemainNum; uint64_t qRemainNum;
} SCtgQueue; } SCtgQueue;
...@@ -475,7 +475,7 @@ typedef struct SCatalogMgmt { ...@@ -475,7 +475,7 @@ typedef struct SCatalogMgmt {
int32_t jobPool; int32_t jobPool;
SRWLatch lock; SRWLatch lock;
SCtgQueue queue; SCtgQueue queue;
TdThread updateThread; TdThread updateThread;
SHashObj *pCluster; //key: clusterId, value: SCatalog* SHashObj *pCluster; //key: clusterId, value: SCatalog*
SCatalogStat stat; SCatalogStat stat;
SCatalogCfg cfg; SCatalogCfg cfg;
...@@ -528,8 +528,8 @@ typedef struct SCtgOperation { ...@@ -528,8 +528,8 @@ typedef struct SCtgOperation {
#define CTG_META_SIZE(pMeta) (sizeof(STableMeta) + ((pMeta)->tableInfo.numOfTags + (pMeta)->tableInfo.numOfColumns) * sizeof(SSchema)) #define CTG_META_SIZE(pMeta) (sizeof(STableMeta) + ((pMeta)->tableInfo.numOfTags + (pMeta)->tableInfo.numOfColumns) * sizeof(SSchema))
#define CTG_TABLE_NOT_EXIST(code) (code == CTG_ERR_CODE_TABLE_NOT_EXIST) #define CTG_TABLE_NOT_EXIST(code) (code == CTG_ERR_CODE_TABLE_NOT_EXIST)
#define CTG_DB_NOT_EXIST(code) (code == TSDB_CODE_MND_DB_NOT_EXIST) #define CTG_DB_NOT_EXIST(code) (code == TSDB_CODE_MND_DB_NOT_EXIST)
#define ctgFatal(param, ...) qFatal("CTG:%p " param, pCtg, __VA_ARGS__) #define ctgFatal(param, ...) qFatal("CTG:%p " param, pCtg, __VA_ARGS__)
#define ctgError(param, ...) qError("CTG:%p " param, pCtg, __VA_ARGS__) #define ctgError(param, ...) qError("CTG:%p " param, pCtg, __VA_ARGS__)
...@@ -576,7 +576,7 @@ typedef struct SCtgOperation { ...@@ -576,7 +576,7 @@ typedef struct SCtgOperation {
} \ } \
} while (0) } while (0)
#define CTG_ERR_RET(c) do { int32_t _code = c; if (_code != TSDB_CODE_SUCCESS) { terrno = _code; return _code; } } while (0) #define CTG_ERR_RET(c) do { int32_t _code = c; if (_code != TSDB_CODE_SUCCESS) { terrno = _code; return _code; } } while (0)
#define CTG_RET(c) do { int32_t _code = c; if (_code != TSDB_CODE_SUCCESS) { terrno = _code; } return _code; } while (0) #define CTG_RET(c) do { int32_t _code = c; if (_code != TSDB_CODE_SUCCESS) { terrno = _code; } return _code; } while (0)
#define CTG_ERR_JRET(c) do { code = c; if (code != TSDB_CODE_SUCCESS) { terrno = code; goto _return; } } while (0) #define CTG_ERR_JRET(c) do { code = c; if (code != TSDB_CODE_SUCCESS) { terrno = code; goto _return; } } while (0)
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册