Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
93a20c16
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
93a20c16
编写于
3月 04, 2021
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix bug
上级
15a65b52
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
14 addition
and
7 deletion
+14
-7
src/client/inc/tscUtil.h
src/client/inc/tscUtil.h
+1
-1
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+1
-1
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+12
-5
未找到文件。
src/client/inc/tscUtil.h
浏览文件 @
93a20c16
...
@@ -270,7 +270,7 @@ void tscPrintSelectClause(SSqlObj* pSql, int32_t subClauseIndex);
...
@@ -270,7 +270,7 @@ void tscPrintSelectClause(SSqlObj* pSql, int32_t subClauseIndex);
bool
hasMoreVnodesToTry
(
SSqlObj
*
pSql
);
bool
hasMoreVnodesToTry
(
SSqlObj
*
pSql
);
bool
hasMoreClauseToTry
(
SSqlObj
*
pSql
);
bool
hasMoreClauseToTry
(
SSqlObj
*
pSql
);
void
tscFreeQueryInfo
(
SSqlCmd
*
pCmd
);
void
tscFreeQueryInfo
(
SSqlCmd
*
pCmd
,
bool
removeMeta
);
void
tscTryQueryNextVnode
(
SSqlObj
*
pSql
,
__async_cb_func_t
fp
);
void
tscTryQueryNextVnode
(
SSqlObj
*
pSql
,
__async_cb_func_t
fp
);
void
tscAsyncQuerySingleRowForNextVnode
(
void
*
param
,
TAOS_RES
*
tres
,
int
numOfRows
);
void
tscAsyncQuerySingleRowForNextVnode
(
void
*
param
,
TAOS_RES
*
tres
,
int
numOfRows
);
...
...
src/client/src/tscSubquery.c
浏览文件 @
93a20c16
...
@@ -2802,7 +2802,7 @@ static void multiVnodeInsertFinalize(void* param, TAOS_RES* tres, int numOfRows)
...
@@ -2802,7 +2802,7 @@ static void multiVnodeInsertFinalize(void* param, TAOS_RES* tres, int numOfRows)
numOfFailed
+=
1
;
numOfFailed
+=
1
;
// clean up tableMeta in cache
// clean up tableMeta in cache
tscFreeQueryInfo
(
&
pSql
->
cmd
);
tscFreeQueryInfo
(
&
pSql
->
cmd
,
false
);
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetailSafely
(
&
pSql
->
cmd
,
0
);
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetailSafely
(
&
pSql
->
cmd
,
0
);
STableMetaInfo
*
pMasterTableMetaInfo
=
tscGetTableMetaInfoFromCmd
(
&
pParentObj
->
cmd
,
pSql
->
cmd
.
clauseIndex
,
0
);
STableMetaInfo
*
pMasterTableMetaInfo
=
tscGetTableMetaInfoFromCmd
(
&
pParentObj
->
cmd
,
pSql
->
cmd
.
clauseIndex
,
0
);
tscAddTableMetaInfo
(
pQueryInfo
,
&
pMasterTableMetaInfo
->
name
,
NULL
,
NULL
,
NULL
,
NULL
);
tscAddTableMetaInfo
(
pQueryInfo
,
&
pMasterTableMetaInfo
->
name
,
NULL
,
NULL
,
NULL
,
NULL
);
...
...
src/client/src/tscUtil.c
浏览文件 @
93a20c16
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
#include "ttokendef.h"
#include "ttokendef.h"
static
void
freeQueryInfoImpl
(
SQueryInfo
*
pQueryInfo
);
static
void
freeQueryInfoImpl
(
SQueryInfo
*
pQueryInfo
);
static
void
clearAllTableMetaInfo
(
SQueryInfo
*
pQueryInfo
);
static
void
clearAllTableMetaInfo
(
SQueryInfo
*
pQueryInfo
,
bool
removeMeta
);
static
void
tscStrToLower
(
char
*
str
,
int32_t
n
)
{
static
void
tscStrToLower
(
char
*
str
,
int32_t
n
)
{
if
(
str
==
NULL
||
n
<=
0
)
{
return
;}
if
(
str
==
NULL
||
n
<=
0
)
{
return
;}
...
@@ -367,7 +367,7 @@ static void tscDestroyResPointerInfo(SSqlRes* pRes) {
...
@@ -367,7 +367,7 @@ static void tscDestroyResPointerInfo(SSqlRes* pRes) {
pRes
->
data
=
NULL
;
// pRes->data points to the buffer of pRsp, no need to free
pRes
->
data
=
NULL
;
// pRes->data points to the buffer of pRsp, no need to free
}
}
void
tscFreeQueryInfo
(
SSqlCmd
*
pCmd
)
{
void
tscFreeQueryInfo
(
SSqlCmd
*
pCmd
,
bool
removeMeta
)
{
if
(
pCmd
==
NULL
||
pCmd
->
numOfClause
==
0
)
{
if
(
pCmd
==
NULL
||
pCmd
->
numOfClause
==
0
)
{
return
;
return
;
}
}
...
@@ -376,7 +376,7 @@ void tscFreeQueryInfo(SSqlCmd* pCmd) {
...
@@ -376,7 +376,7 @@ void tscFreeQueryInfo(SSqlCmd* pCmd) {
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
pCmd
,
i
);
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
pCmd
,
i
);
freeQueryInfoImpl
(
pQueryInfo
);
freeQueryInfoImpl
(
pQueryInfo
);
clearAllTableMetaInfo
(
pQueryInfo
);
clearAllTableMetaInfo
(
pQueryInfo
,
removeMeta
);
tfree
(
pQueryInfo
);
tfree
(
pQueryInfo
);
}
}
...
@@ -404,7 +404,7 @@ void tscResetSqlCmd(SSqlCmd* pCmd, bool removeMeta) {
...
@@ -404,7 +404,7 @@ void tscResetSqlCmd(SSqlCmd* pCmd, bool removeMeta) {
pCmd
->
pTableBlockHashList
=
tscDestroyBlockHashTable
(
pCmd
->
pTableBlockHashList
,
removeMeta
);
pCmd
->
pTableBlockHashList
=
tscDestroyBlockHashTable
(
pCmd
->
pTableBlockHashList
,
removeMeta
);
pCmd
->
pDataBlocks
=
tscDestroyBlockArrayList
(
pCmd
->
pDataBlocks
);
pCmd
->
pDataBlocks
=
tscDestroyBlockArrayList
(
pCmd
->
pDataBlocks
);
tscFreeQueryInfo
(
pCmd
);
tscFreeQueryInfo
(
pCmd
,
removeMeta
);
}
}
void
tscFreeSqlResult
(
SSqlObj
*
pSql
)
{
void
tscFreeSqlResult
(
SSqlObj
*
pSql
)
{
...
@@ -1847,10 +1847,17 @@ SArray* tscVgroupTableInfoDup(SArray* pVgroupTables) {
...
@@ -1847,10 +1847,17 @@ SArray* tscVgroupTableInfoDup(SArray* pVgroupTables) {
return
pa
;
return
pa
;
}
}
void
clearAllTableMetaInfo
(
SQueryInfo
*
pQueryInfo
)
{
void
clearAllTableMetaInfo
(
SQueryInfo
*
pQueryInfo
,
bool
removeMeta
)
{
for
(
int32_t
i
=
0
;
i
<
pQueryInfo
->
numOfTables
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
pQueryInfo
->
numOfTables
;
++
i
)
{
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
i
);
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
i
);
if
(
removeMeta
)
{
char
name
[
TSDB_TABLE_FNAME_LEN
]
=
{
0
};
tNameExtractFullName
(
&
pTableMetaInfo
->
name
,
name
);
taosHashRemove
(
tscTableMetaInfo
,
name
,
strnlen
(
name
,
TSDB_TABLE_FNAME_LEN
));
}
tscFreeVgroupTableInfo
(
pTableMetaInfo
->
pVgroupTables
);
tscFreeVgroupTableInfo
(
pTableMetaInfo
->
pVgroupTables
);
tscClearTableMetaInfo
(
pTableMetaInfo
);
tscClearTableMetaInfo
(
pTableMetaInfo
);
free
(
pTableMetaInfo
);
free
(
pTableMetaInfo
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录