Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
1eba1849
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1eba1849
编写于
7月 11, 2022
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: fix stmt rerun issue
上级
def96ee3
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
19 addition
and
0 deletion
+19
-0
source/client/src/clientStmt.c
source/client/src/clientStmt.c
+18
-0
source/libs/planner/src/planPhysiCreater.c
source/libs/planner/src/planPhysiCreater.c
+1
-0
未找到文件。
source/client/src/clientStmt.c
浏览文件 @
1eba1849
...
...
@@ -351,6 +351,7 @@ int32_t stmtGetFromCache(STscStmt* pStmt) {
pStmt
->
bInfo
.
inExecCache
=
true
;
if
(
pStmt
->
sql
.
autoCreateTbl
)
{
tscDebug
(
"reuse stmt block for tb %s in execBlock"
,
pStmt
->
bInfo
.
tbFName
);
return
TSDB_CODE_SUCCESS
;
}
}
...
...
@@ -359,9 +360,11 @@ int32_t stmtGetFromCache(STscStmt* pStmt) {
if
(
pStmt
->
bInfo
.
inExecCache
)
{
ASSERT
(
taosHashGetSize
(
pStmt
->
exec
.
pBlockHash
)
==
1
);
pStmt
->
bInfo
.
needParse
=
false
;
tscDebug
(
"reuse stmt block for tb %s in execBlock"
,
pStmt
->
bInfo
.
tbFName
);
return
TSDB_CODE_SUCCESS
;
}
tscDebug
(
"no stmt block cache for tb %s"
,
pStmt
->
bInfo
.
tbFName
);
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -385,6 +388,8 @@ int32_t stmtGetFromCache(STscStmt* pStmt) {
STMT_ERR_RET
(
TSDB_CODE_OUT_OF_MEMORY
);
}
tscDebug
(
"reuse stmt block for tb %s in sqlBlock, suid:0x%"
PRIx64
,
pStmt
->
bInfo
.
tbFName
,
pStmt
->
bInfo
.
tbSuid
);
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -400,6 +405,8 @@ int32_t stmtGetFromCache(STscStmt* pStmt) {
if
(
TSDB_CODE_PAR_TABLE_NOT_EXIST
==
code
)
{
STMT_ERR_RET
(
stmtCleanBindInfo
(
pStmt
));
tscDebug
(
"tb %s not exist"
,
pStmt
->
bInfo
.
tbFName
);
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -414,6 +421,8 @@ int32_t stmtGetFromCache(STscStmt* pStmt) {
if
(
uid
==
pStmt
->
bInfo
.
tbUid
)
{
pStmt
->
bInfo
.
needParse
=
false
;
tscDebug
(
"tb %s is current table"
,
pStmt
->
bInfo
.
tbFName
);
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -434,6 +443,8 @@ int32_t stmtGetFromCache(STscStmt* pStmt) {
pStmt
->
bInfo
.
boundTags
=
pCache
->
boundTags
;
pStmt
->
bInfo
.
tagsCached
=
true
;
tscDebug
(
"tb %s in execBlock list, set to current"
,
pStmt
->
bInfo
.
tbFName
);
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -455,6 +466,8 @@ int32_t stmtGetFromCache(STscStmt* pStmt) {
STMT_ERR_RET
(
TSDB_CODE_OUT_OF_MEMORY
);
}
tscDebug
(
"tb %s in sqlBlock list, set to current"
,
pStmt
->
bInfo
.
tbFName
);
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -523,6 +536,8 @@ int stmtPrepare(TAOS_STMT* stmt, const char* sql, unsigned long length) {
int
stmtSetTbName
(
TAOS_STMT
*
stmt
,
const
char
*
tbName
)
{
STscStmt
*
pStmt
=
(
STscStmt
*
)
stmt
;
tscDebug
(
"start to set stmt tbName: %s"
,
tbName
);
STMT_ERR_RET
(
stmtSwitchStatus
(
pStmt
,
STMT_SETTBNAME
));
int32_t
insert
=
0
;
...
...
@@ -568,6 +583,7 @@ int stmtSetTbTags(TAOS_STMT* stmt, TAOS_MULTI_BIND* tags) {
STMT_ERR_RET
(
TSDB_CODE_QRY_APP_ERROR
);
}
tscDebug
(
"start to bind stmt tag values"
);
STMT_ERR_RET
(
qBindStmtTagsValue
(
*
pDataBlock
,
pStmt
->
bInfo
.
boundTags
,
pStmt
->
bInfo
.
tbSuid
,
pStmt
->
bInfo
.
sname
.
tname
,
tags
,
pStmt
->
exec
.
pRequest
->
msgBuf
,
pStmt
->
exec
.
pRequest
->
msgBufLen
));
...
...
@@ -713,6 +729,8 @@ int stmtAddBatch(TAOS_STMT* stmt) {
}
int
stmtUpdateTableUid
(
STscStmt
*
pStmt
,
SSubmitRsp
*
pRsp
)
{
tscDebug
(
"start to update stmt tbUid"
);
if
(
pRsp
->
nBlocks
<=
0
)
{
tscError
(
"invalid submit resp block number %d"
,
pRsp
->
nBlocks
);
STMT_ERR_RET
(
TSDB_CODE_TSC_APP_ERROR
);
...
...
source/libs/planner/src/planPhysiCreater.c
浏览文件 @
1eba1849
...
...
@@ -1522,6 +1522,7 @@ static SSubplan* makeSubplan(SPhysiPlanContext* pCxt, SLogicSubplan* pLogicSubpl
static
int32_t
buildInsertValuesSubplan
(
SPhysiPlanContext
*
pCxt
,
SVnodeModifyLogicNode
*
pModify
,
SSubplan
*
pSubplan
)
{
pSubplan
->
msgType
=
pModify
->
msgType
;
pSubplan
->
execNode
.
nodeId
=
pModify
->
pVgDataBlocks
->
vg
.
vgId
;
pSubplan
->
execNode
.
epSet
=
pModify
->
pVgDataBlocks
->
vg
.
epSet
;
return
createDataInserter
(
pCxt
,
pModify
->
pVgDataBlocks
,
&
pSubplan
->
pDataSink
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录