Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
519cd6ae
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
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看板
提交
519cd6ae
编写于
6月 08, 2020
作者:
B
Bomin Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
td-449: set parse finsish flag in select statement
上级
979d6d50
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
23 addition
and
27 deletion
+23
-27
src/client/src/tscAsync.c
src/client/src/tscAsync.c
+4
-2
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+2
-1
src/client/src/tscStream.c
src/client/src/tscStream.c
+6
-13
tests/script/general/stream/new_stream.sim
tests/script/general/stream/new_stream.sim
+11
-11
未找到文件。
src/client/src/tscAsync.c
浏览文件 @
519cd6ae
...
...
@@ -517,8 +517,10 @@ void tscTableMetaCallBack(void *param, TAOS_RES *res, int code) {
if
(
pSql
->
pStream
)
{
tscTrace
(
"%p stream:%p meta is updated, start new query, command:%d"
,
pSql
,
pSql
->
pStream
,
pSql
->
cmd
.
command
);
if
(
!
pSql
->
cmd
.
parseFinished
)
{
tsParseSql
(
pSql
,
false
);
sem_post
(
&
pSql
->
rspSem
);
}
return
;
}
else
{
tscTrace
(
"%p get tableMeta successfully"
,
pSql
);
...
...
src/client/src/tscSQLParser.c
浏览文件 @
519cd6ae
...
...
@@ -517,6 +517,7 @@ int32_t tscToSQLCmd(SSqlObj* pSql, struct SSqlInfo* pInfo) {
}
}
pCmd
->
parseFinished
=
1
;
return
TSDB_CODE_SUCCESS
;
// do not build query message here
}
...
...
src/client/src/tscStream.c
浏览文件 @
519cd6ae
...
...
@@ -78,30 +78,23 @@ static void tscProcessStreamLaunchQuery(SSchedMsg *pMsg) {
int
code
=
tscGetTableMeta
(
pSql
,
pTableMetaInfo
);
pSql
->
res
.
code
=
code
;
if
(
code
==
TSDB_CODE_TSC_ACTION_IN_PROGRESS
)
return
;
if
(
code
==
0
&&
UTIL_TABLE_IS_SUPER_TABLE
(
pTableMetaInfo
))
{
code
=
tscGetSTableVgroupInfo
(
pSql
,
0
);
pSql
->
res
.
code
=
code
;
if
(
code
==
TSDB_CODE_TSC_ACTION_IN_PROGRESS
)
return
;
}
tscTansformSQLFuncForSTableQuery
(
pQueryInfo
);
// failed to get meter/metric meta, retry in 10sec.
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
int64_t
retryDelayTime
=
tscGetRetryDelayTime
(
pStream
->
slidingTime
,
pStream
->
precision
);
tscError
(
"%p stream:%p,get metermeta failed, retry in %"
PRId64
"ms"
,
pStream
->
pSql
,
pStream
,
retryDelayTime
);
tscSetRetryTimer
(
pStream
,
pSql
,
retryDelayTime
);
return
;
}
}
else
{
tscTansformSQLFuncForSTableQuery
(
pQueryInfo
);
tscTrace
(
"%p stream:%p start stream query on:%s"
,
pSql
,
pStream
,
pTableMetaInfo
->
name
);
tscDoQuery
(
pStream
->
pSql
);
tscIncStreamExecutionCount
(
pStream
);
}
}
static
void
tscProcessStreamTimer
(
void
*
handle
,
void
*
tmrId
)
{
...
...
tests/script/general/stream/new_stream.sim
浏览文件 @
519cd6ae
system sh/stop_dnodes.sh
#
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 10
system sh/exec.sh -n dnode1 -s start
#
system sh/deploy.sh -n dnode1 -i 1
#
system sh/cfg.sh -n dnode1 -c walLevel -v 0
#
system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 10
#
system sh/exec.sh -n dnode1 -s start
sleep 3000
#
sleep 3000
sql connect
print ======================== dnode1 start
...
...
@@ -56,14 +56,14 @@ print $data00 $data01 $data02 $data03
sql create table $st as select count(*), count(tbcol), count(tbcol2) from $mt interval(10s)
print =============== step3
print sleep
22
seconds
sleep
22
000
print sleep
120
seconds
sleep
120
000
print =============== step4
sql select * from $st
print $st ==> $rows1 $data00 $data01 $data02 $data03
if $data
1
3 >= 51 then
if $data
0
3 >= 51 then
return -1
endi
...
...
@@ -90,8 +90,8 @@ while $i < $tbNum
endw
print =============== step6
print sleep
22
seconds
sleep
22
000
print sleep
120
seconds
sleep
120
000
print =============== step7
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录