Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
9d33d99c
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看板
提交
9d33d99c
编写于
6月 09, 2022
作者:
X
xywang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: fixed crash bugs
上级
34e4a146
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
12 deletion
+22
-12
src/client/src/tscAsync.c
src/client/src/tscAsync.c
+14
-1
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+8
-3
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+0
-8
未找到文件。
src/client/src/tscAsync.c
浏览文件 @
9d33d99c
...
@@ -343,6 +343,10 @@ void tscAsyncResultOnError(SSqlObj* pSql) {
...
@@ -343,6 +343,10 @@ void tscAsyncResultOnError(SSqlObj* pSql) {
int
tscSendMsgToServer
(
SSqlObj
*
pSql
);
int
tscSendMsgToServer
(
SSqlObj
*
pSql
);
void
tscClearTableMeta
(
SSqlObj
*
pSql
);
void
tscClearTableMeta
(
SSqlObj
*
pSql
);
static
void
freeElem
(
void
*
p
)
{
tfree
(
*
(
char
**
)
p
);
}
void
tscTableMetaCallBack
(
void
*
param
,
TAOS_RES
*
res
,
int
code
)
{
void
tscTableMetaCallBack
(
void
*
param
,
TAOS_RES
*
res
,
int
code
)
{
SSqlObj
*
pSql
=
(
SSqlObj
*
)
taosAcquireRef
(
tscObjRef
,
(
int64_t
)
param
);
SSqlObj
*
pSql
=
(
SSqlObj
*
)
taosAcquireRef
(
tscObjRef
,
(
int64_t
)
param
);
if
(
pSql
==
NULL
)
return
;
if
(
pSql
==
NULL
)
return
;
...
@@ -362,13 +366,22 @@ void tscTableMetaCallBack(void *param, TAOS_RES *res, int code) {
...
@@ -362,13 +366,22 @@ void tscTableMetaCallBack(void *param, TAOS_RES *res, int code) {
tscAllocPayload
(
&
pSql
->
cmd
,
(
int
)
sz
+
1
);
tscAllocPayload
(
&
pSql
->
cmd
,
(
int
)
sz
+
1
);
memcpy
(
tscGetErrorMsgPayload
(
&
pSql
->
cmd
),
tscGetErrorMsgPayload
(
&
sub
->
cmd
),
sz
);
memcpy
(
tscGetErrorMsgPayload
(
&
pSql
->
cmd
),
tscGetErrorMsgPayload
(
&
sub
->
cmd
),
sz
);
}
else
if
(
code
==
TSDB_CODE_MND_INVALID_TABLE_NAME
)
{
}
else
if
(
code
==
TSDB_CODE_MND_INVALID_TABLE_NAME
)
{
if
(
sub
->
cmd
.
command
==
TSDB_SQL_MULTI_META
)
{
if
(
pSql
->
cmd
.
command
==
TSDB_SQL_MULTI_META
&&
pSql
->
cmd
.
hashedTableNames
)
{
tscClearTableMeta
(
pSql
);
tscClearTableMeta
(
pSql
);
taosArrayDestroyEx
(
&
pSql
->
cmd
.
hashedTableNames
,
freeElem
);
pSql
->
cmd
.
hashedTableNames
=
NULL
;
}
}
}
}
goto
_error
;
goto
_error
;
}
}
if
(
pSql
->
cmd
.
command
==
TSDB_SQL_MULTI_META
)
{
if
(
pSql
->
cmd
.
hashedTableNames
)
{
taosArrayDestroyEx
(
&
pSql
->
cmd
.
hashedTableNames
,
freeElem
);
pSql
->
cmd
.
hashedTableNames
=
NULL
;
}
}
tscDebug
(
"0x%"
PRIx64
" get %s successfully"
,
pSql
->
self
,
msg
);
tscDebug
(
"0x%"
PRIx64
" get %s successfully"
,
pSql
->
self
,
msg
);
if
(
pSql
->
pStream
==
NULL
)
{
if
(
pSql
->
pStream
==
NULL
)
{
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfo
(
pCmd
);
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfo
(
pCmd
);
...
...
src/client/src/tscSQLParser.c
浏览文件 @
9d33d99c
...
@@ -9914,7 +9914,6 @@ int32_t loadAllTableMeta(SSqlObj* pSql, struct SSqlInfo* pInfo) {
...
@@ -9914,7 +9914,6 @@ int32_t loadAllTableMeta(SSqlObj* pSql, struct SSqlInfo* pInfo) {
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfo
(
pCmd
);
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfo
(
pCmd
);
pCmd
->
pTableMetaMap
=
taosHashInit
(
4
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_BINARY
),
false
,
HASH_NO_LOCK
);
pCmd
->
pTableMetaMap
=
taosHashInit
(
4
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_BINARY
),
false
,
HASH_NO_LOCK
);
pCmd
->
hashedTableNames
=
taosArrayInit
(
4
,
POINTER_BYTES
);
tableNameList
=
taosArrayInit
(
4
,
sizeof
(
SName
));
tableNameList
=
taosArrayInit
(
4
,
sizeof
(
SName
));
size_t
size
=
taosArrayGetSize
(
pInfo
->
list
);
size_t
size
=
taosArrayGetSize
(
pInfo
->
list
);
...
@@ -9983,8 +9982,14 @@ int32_t loadAllTableMeta(SSqlObj* pSql, struct SSqlInfo* pInfo) {
...
@@ -9983,8 +9982,14 @@ int32_t loadAllTableMeta(SSqlObj* pSql, struct SSqlInfo* pInfo) {
taosArrayPush
(
pVgroupList
,
&
t
);
taosArrayPush
(
pVgroupList
,
&
t
);
tscDebug
(
"0x%"
PRIx64
" failed to retrieve stable %s vgroup id list in cache, try fetch from mnode"
,
pSql
->
self
,
name
);
tscDebug
(
"0x%"
PRIx64
" failed to retrieve stable %s vgroup id list in cache, try fetch from mnode"
,
pSql
->
self
,
name
);
char
*
tb
=
strdup
(
name
);
if
(
pCmd
->
hashedTableNames
==
NULL
)
{
taosArrayPush
(
pCmd
->
hashedTableNames
,
&
tb
);
pCmd
->
hashedTableNames
=
taosArrayInit
(
4
,
POINTER_BYTES
);
}
if
(
pCmd
->
hashedTableNames
)
{
char
*
tb
=
strdup
(
name
);
taosArrayPush
(
pCmd
->
hashedTableNames
,
&
tb
);
}
}
else
{
}
else
{
tFilePage
*
pdata
=
(
tFilePage
*
)
pv
;
tFilePage
*
pdata
=
(
tFilePage
*
)
pv
;
pVgroupIdList
=
taosArrayInit
((
size_t
)
pdata
->
num
,
sizeof
(
int32_t
));
pVgroupIdList
=
taosArrayInit
((
size_t
)
pdata
->
num
,
sizeof
(
int32_t
));
...
...
src/client/src/tscUtil.c
浏览文件 @
9d33d99c
...
@@ -1631,10 +1631,6 @@ void destroyTableNameList(SInsertStatementParam* pInsertParam) {
...
@@ -1631,10 +1631,6 @@ void destroyTableNameList(SInsertStatementParam* pInsertParam) {
tfree
(
pInsertParam
->
pTableNameList
);
tfree
(
pInsertParam
->
pTableNameList
);
}
}
static
void
freeElem
(
void
*
p
)
{
tfree
(
*
(
char
**
)
p
);
}
void
tscResetSqlCmd
(
SSqlCmd
*
pCmd
,
bool
clearCachedMeta
,
uint64_t
id
)
{
void
tscResetSqlCmd
(
SSqlCmd
*
pCmd
,
bool
clearCachedMeta
,
uint64_t
id
)
{
SSqlObj
*
pSql
=
(
SSqlObj
*
)
taosAcquireRef
(
tscObjRef
,
id
);
SSqlObj
*
pSql
=
(
SSqlObj
*
)
taosAcquireRef
(
tscObjRef
,
id
);
pCmd
->
command
=
0
;
pCmd
->
command
=
0
;
...
@@ -1650,10 +1646,6 @@ void tscResetSqlCmd(SSqlCmd* pCmd, bool clearCachedMeta, uint64_t id) {
...
@@ -1650,10 +1646,6 @@ void tscResetSqlCmd(SSqlCmd* pCmd, bool clearCachedMeta, uint64_t id) {
tfree
(
pCmd
->
insertParam
.
tagData
.
data
);
tfree
(
pCmd
->
insertParam
.
tagData
.
data
);
pCmd
->
insertParam
.
tagData
.
dataLen
=
0
;
pCmd
->
insertParam
.
tagData
.
dataLen
=
0
;
if
(
pCmd
->
hashedTableNames
)
{
taosArrayDestroyEx
(
&
pCmd
->
hashedTableNames
,
freeElem
);
}
tscFreeQueryInfo
(
pCmd
,
clearCachedMeta
,
id
);
tscFreeQueryInfo
(
pCmd
,
clearCachedMeta
,
id
);
pCmd
->
pTableMetaMap
=
tscCleanupTableMetaMap
(
pCmd
->
pTableMetaMap
);
pCmd
->
pTableMetaMap
=
tscCleanupTableMetaMap
(
pCmd
->
pTableMetaMap
);
taosReleaseRef
(
tscObjRef
,
id
);
taosReleaseRef
(
tscObjRef
,
id
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录