Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
679145dc
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
679145dc
编写于
8月 25, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
8月 25, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #16418 from taosdata/fix/TD-18457
fix(query): fix valgrind report uninitialized variable error
上级
1279213c
cbcb1464
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
163 addition
and
159 deletion
+163
-159
source/client/src/clientImpl.c
source/client/src/clientImpl.c
+1
-1
source/libs/catalog/inc/catalogInt.h
source/libs/catalog/inc/catalogInt.h
+12
-12
source/libs/catalog/src/ctgAsync.c
source/libs/catalog/src/ctgAsync.c
+143
-143
source/libs/parser/src/parInsert.c
source/libs/parser/src/parInsert.c
+2
-2
source/util/src/thash.c
source/util/src/thash.c
+5
-1
未找到文件。
source/client/src/clientImpl.c
浏览文件 @
679145dc
...
...
@@ -1975,7 +1975,7 @@ _OVER:
int32_t
appendTbToReq
(
SHashObj
*
pHash
,
int32_t
pos1
,
int32_t
len1
,
int32_t
pos2
,
int32_t
len2
,
const
char
*
str
,
int32_t
acctId
,
char
*
db
)
{
SName
name
;
SName
name
=
{
0
}
;
if
(
len1
<=
0
)
{
return
-
1
;
...
...
source/libs/catalog/inc/catalogInt.h
浏览文件 @
679145dc
...
...
@@ -188,7 +188,7 @@ typedef struct SCtgTbCache {
typedef
struct
SCtgVgCache
{
SRWLatch
vgLock
;
SDBVgInfo
*
vgInfo
;
SDBVgInfo
*
vgInfo
;
}
SCtgVgCache
;
typedef
struct
SCtgDBCache
{
...
...
@@ -224,7 +224,7 @@ typedef struct SCtgUserAuth {
}
SCtgUserAuth
;
typedef
struct
SCatalog
{
uint64_t
clusterId
;
uint64_t
clusterId
;
SHashObj
*
userCache
;
//key:user, value:SCtgUserAuth
SHashObj
*
dbCache
;
//key:dbname, value:SCtgDBCache
SCtgRentMgmt
dbRent
;
...
...
@@ -253,9 +253,9 @@ typedef struct SCtgJob {
int32_t
jobResCode
;
int32_t
taskIdx
;
SRWLatch
taskLock
;
uint64_t
queryId
;
SCatalog
*
pCtg
;
SCatalog
*
pCtg
;
SRequestConnInfo
conn
;
void
*
userParam
;
catalogCallback
userFp
;
...
...
@@ -279,7 +279,7 @@ typedef struct SCtgMsgCtx {
void
*
lastOut
;
void
*
out
;
char
*
target
;
SHashObj
*
pBatchs
;
SHashObj
*
pBatchs
;
}
SCtgMsgCtx
;
...
...
@@ -364,7 +364,7 @@ typedef struct SCtgCacheStat {
uint64_t
numOfMetaHit
;
uint64_t
numOfMetaMiss
;
uint64_t
numOfIndexHit
;
uint64_t
numOfIndexMiss
;
uint64_t
numOfIndexMiss
;
uint64_t
numOfUserHit
;
uint64_t
numOfUserMiss
;
uint64_t
numOfClear
;
...
...
@@ -451,7 +451,7 @@ typedef struct SCtgCacheOperation {
int32_t
opId
;
void
*
data
;
bool
syncOp
;
tsem_t
rspSem
;
tsem_t
rspSem
;
bool
stopQueue
;
bool
unLocked
;
}
SCtgCacheOperation
;
...
...
@@ -466,7 +466,7 @@ typedef struct SCtgQueue {
bool
stopQueue
;
SCtgQNode
*
head
;
SCtgQNode
*
tail
;
tsem_t
reqSem
;
tsem_t
reqSem
;
uint64_t
qRemainNum
;
}
SCtgQueue
;
...
...
@@ -475,7 +475,7 @@ typedef struct SCatalogMgmt {
int32_t
jobPool
;
SRWLatch
lock
;
SCtgQueue
queue
;
TdThread
updateThread
;
TdThread
updateThread
;
SHashObj
*
pCluster
;
//key: clusterId, value: SCatalog*
SCatalogStat
stat
;
SCatalogCfg
cfg
;
...
...
@@ -528,8 +528,8 @@ typedef struct SCtgOperation {
#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_DB_NOT_EXIST(code) (code == TSDB_CODE_MND_DB_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 ctgFatal(param, ...) qFatal("CTG:%p " param, pCtg, __VA_ARGS__)
#define ctgError(param, ...) qError("CTG:%p " param, pCtg, __VA_ARGS__)
...
...
@@ -576,7 +576,7 @@ typedef struct SCtgOperation {
} \
} 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_ERR_JRET(c) do { code = c; if (code != TSDB_CODE_SUCCESS) { terrno = code; goto _return; } } while (0)
...
...
source/libs/catalog/src/ctgAsync.c
浏览文件 @
679145dc
此差异已折叠。
点击以展开。
source/libs/parser/src/parInsert.c
浏览文件 @
679145dc
...
...
@@ -1715,7 +1715,7 @@ static int32_t skipUsingClause(SInsertParseSyntaxCxt* pCxt) {
}
static
int32_t
collectTableMetaKey
(
SInsertParseSyntaxCxt
*
pCxt
,
bool
isStable
,
int32_t
tableNo
,
SToken
*
pTbToken
)
{
SName
name
;
SName
name
=
{
0
}
;
CHECK_CODE
(
createSName
(
&
name
,
pTbToken
,
pCxt
->
pComCxt
->
acctId
,
pCxt
->
pComCxt
->
db
,
&
pCxt
->
msg
));
CHECK_CODE
(
reserveTableMetaInCacheForInsert
(
&
name
,
isStable
?
CATALOG_REQ_TYPE_META
:
CATALOG_REQ_TYPE_BOTH
,
tableNo
,
pCxt
->
pMetaCache
));
...
...
@@ -1730,7 +1730,7 @@ static int32_t checkTableName(const char* pTableName, SMsgBuf* pMsgBuf) {
}
static
int32_t
collectAutoCreateTableMetaKey
(
SInsertParseSyntaxCxt
*
pCxt
,
int32_t
tableNo
,
SToken
*
pTbToken
)
{
SName
name
;
SName
name
=
{
0
}
;
CHECK_CODE
(
createSName
(
&
name
,
pTbToken
,
pCxt
->
pComCxt
->
acctId
,
pCxt
->
pComCxt
->
db
,
&
pCxt
->
msg
));
CHECK_CODE
(
checkTableName
(
name
.
tname
,
&
pCxt
->
msg
));
CHECK_CODE
(
reserveTableMetaInCacheForInsert
(
&
name
,
CATALOG_REQ_TYPE_VGROUP
,
tableNo
,
pCxt
->
pMetaCache
));
...
...
source/util/src/thash.c
浏览文件 @
679145dc
...
...
@@ -252,11 +252,15 @@ SHashObj *taosHashInit(size_t capacity, _hash_fn_t fn, bool update, SHashLockTyp
// the max slots is not defined by user
pHashObj
->
capacity
=
taosHashCapacity
((
int32_t
)
capacity
);
pHashObj
->
size
=
0
;
pHashObj
->
equalFp
=
memcmp
;
pHashObj
->
hashFp
=
fn
;
pHashObj
->
type
=
type
;
pHashObj
->
lock
=
0
;
pHashObj
->
enableUpdate
=
update
;
pHashObj
->
freeFp
=
NULL
;
pHashObj
->
callbackFp
=
NULL
;
ASSERT
((
pHashObj
->
capacity
&
(
pHashObj
->
capacity
-
1
))
==
0
);
...
...
@@ -329,7 +333,7 @@ int32_t taosHashPut(SHashObj *pHashObj, const void *key, size_t keyLen, const vo
// disable resize
taosHashRLock
(
pHashObj
);
int32_t
slot
=
HASH_INDEX
(
hashVal
,
pHashObj
->
capacity
);
uint32_t
slot
=
HASH_INDEX
(
hashVal
,
pHashObj
->
capacity
);
SHashEntry
*
pe
=
pHashObj
->
hashList
[
slot
];
taosHashEntryWLock
(
pHashObj
,
pe
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录