Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
ab0d29f9
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看板
提交
ab0d29f9
编写于
9月 03, 2020
作者:
B
Bomin Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
td-804: pass all smoke test
上级
89d87300
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
25 addition
and
21 deletion
+25
-21
src/client/inc/tsclient.h
src/client/inc/tsclient.h
+1
-1
src/client/src/tscParseInsert.c
src/client/src/tscParseInsert.c
+20
-14
src/client/src/tscServer.c
src/client/src/tscServer.c
+4
-6
未找到文件。
src/client/inc/tsclient.h
浏览文件 @
ab0d29f9
...
...
@@ -401,7 +401,7 @@ int tsParseSql(SSqlObj *pSql, bool initial);
void
tscProcessMsgFromServer
(
SRpcMsg
*
rpcMsg
,
SRpcEpSet
*
pEpSet
);
int
tscProcessSql
(
SSqlObj
*
pSql
);
int
tscRenewTableMeta
(
SSqlObj
*
pSql
,
char
*
tableId
);
int
tscRenewTableMeta
(
SSqlObj
*
pSql
,
int32_t
tableIndex
);
void
tscQueueAsyncRes
(
SSqlObj
*
pSql
);
void
tscQueueAsyncError
(
void
(
*
fp
),
void
*
param
,
int32_t
code
);
...
...
src/client/src/tscParseInsert.c
浏览文件 @
ab0d29f9
...
...
@@ -1328,7 +1328,6 @@ int tsParseSql(SSqlObj *pSql, bool initial) {
pSql
->
fp
=
(
void
(
*
)())
tscHandleMultivnodeInsert
;
}
for
(
int
i
=
0
;
true
;
i
++
)
{
if
(
initial
&&
((
ret
=
tsInsertInitialCheck
(
pSql
))
!=
TSDB_CODE_SUCCESS
))
{
return
ret
;
}
...
...
@@ -1336,25 +1335,32 @@ int tsParseSql(SSqlObj *pSql, bool initial) {
// make a backup as tsParseInsertSql may modify the string
char
*
sqlstr
=
strdup
(
pSql
->
sqlstr
);
ret
=
tsParseInsertSql
(
pSql
);
if
(
sqlstr
==
NULL
||
i
>=
2
||
ret
!=
TSDB_CODE_TSC_INVALID_SQL
)
{
if
(
sqlstr
==
NULL
||
pSql
->
retry
>=
1
||
ret
!=
TSDB_CODE_TSC_INVALID_SQL
)
{
free
(
sqlstr
);
break
;
}
}
else
{
tscResetSqlCmdObj
(
pCmd
,
true
);
pCmd
->
pQueryInfo
=
NULL
;
free
(
pSql
->
sqlstr
);
pSql
->
sqlstr
=
sqlstr
;
pSql
->
retry
++
;
if
((
ret
=
tsInsertInitialCheck
(
pSql
))
==
TSDB_CODE_SUCCESS
)
{
ret
=
tsParseInsertSql
(
pSql
);
}
}
}
else
{
SSqlInfo
SQLInfo
=
qSQLParse
(
pSql
->
sqlstr
);
ret
=
tscToSQLCmd
(
pSql
,
&
SQLInfo
);
if
(
ret
==
TSDB_CODE_TSC_INVALID_SQL
)
{
if
(
ret
==
TSDB_CODE_TSC_INVALID_SQL
&&
pSql
->
retry
==
0
&&
SQLInfo
.
type
==
TSDB_SQL_NULL
)
{
tscResetSqlCmdObj
(
pCmd
,
true
);
pSql
->
retry
++
;
ret
=
tscToSQLCmd
(
pSql
,
&
SQLInfo
);
}
SQLInfoDestroy
(
&
SQLInfo
);
}
if
(
ret
==
TSDB_CODE_SUCCESS
)
{
pSql
->
retry
=
0
;
}
/*
* the pRes->code may be modified or released by another thread in tscTableMetaCallBack function,
* so do NOT use pRes->code to determine if the getTableMeta function
...
...
src/client/src/tscServer.c
浏览文件 @
ab0d29f9
...
...
@@ -280,8 +280,6 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg, SRpcEpSet *pEpSet) {
}
}
STableMetaInfo
*
pTableMetaInfo
=
tscGetTableMetaInfoFromCmd
(
pCmd
,
pCmd
->
clauseIndex
,
0
);
int32_t
cmd
=
pCmd
->
command
;
if
((
cmd
==
TSDB_SQL_SELECT
||
cmd
==
TSDB_SQL_FETCH
||
cmd
==
TSDB_SQL_INSERT
||
cmd
==
TSDB_SQL_UPDATE_TAGS_VAL
)
&&
(
rpcMsg
->
code
==
TSDB_CODE_TDB_INVALID_TABLE_ID
||
...
...
@@ -306,7 +304,7 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg, SRpcEpSet *pEpSet) {
taosMsleep
(
duration
);
}
rpcMsg
->
code
=
tscRenewTableMeta
(
pSql
,
pTableMetaInfo
->
name
);
rpcMsg
->
code
=
tscRenewTableMeta
(
pSql
,
0
);
// if there is an error occurring, proceed to the following error handling procedure.
if
(
rpcMsg
->
code
==
TSDB_CODE_TSC_ACTION_IN_PROGRESS
)
{
...
...
@@ -2208,14 +2206,14 @@ int tscGetMeterMetaEx(SSqlObj *pSql, STableMetaInfo *pTableMetaInfo, bool create
/**
* retrieve table meta from mnode, and update the local table meta cache.
* @param pSql sql object
* @param tableI
d table full name
* @param tableI
ndex table index
* @return status code
*/
int
tscRenewTableMeta
(
SSqlObj
*
pSql
,
char
*
tableId
)
{
int
tscRenewTableMeta
(
SSqlObj
*
pSql
,
int32_t
tableIndex
)
{
SSqlCmd
*
pCmd
=
&
pSql
->
cmd
;
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
pCmd
,
0
);
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
0
);
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
tableIndex
);
STableMeta
*
pTableMeta
=
pTableMetaInfo
->
pTableMeta
;
if
(
pTableMetaInfo
->
pTableMeta
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录