提交 519cd6ae 编写于 作者: B Bomin Zhang

td-449: set parse finsish flag in select statement

上级 979d6d50
......@@ -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);
......
......@@ -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
}
......
......@@ -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) {
......
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 22000
print sleep 120 seconds
sleep 120000
print =============== step4
sql select * from $st
print $st ==> $rows1 $data00 $data01 $data02 $data03
if $data13 >= 51 then
if $data03 >= 51 then
return -1
endi
......@@ -90,8 +90,8 @@ while $i < $tbNum
endw
print =============== step6
print sleep 22 seconds
sleep 22000
print sleep 120 seconds
sleep 120000
print =============== step7
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册