未验证 提交 26fe683f 编写于 作者: H haojun Liao 提交者: GitHub

Merge pull request #5402 from taosdata/hotfix/TD-3223

[TD-3223]taosd crash for multiple stddev query
...@@ -1883,6 +1883,13 @@ void doAppendData(SInterResult* pInterResult, TAOS_ROW row, int32_t numOfCols, S ...@@ -1883,6 +1883,13 @@ void doAppendData(SInterResult* pInterResult, TAOS_ROW row, int32_t numOfCols, S
} }
} }
if (p && taosArrayGetSize(p) > 0) {
SResPair *l = taosArrayGetLast(p);
if (l->key == key && key == INT64_MIN) {
continue;
}
}
//append a new column //append a new column
if (p == NULL) { if (p == NULL) {
SStddevInterResult t = {.colId = id, .pResult = taosArrayInit(10, sizeof(SResPair)),}; SStddevInterResult t = {.colId = id, .pResult = taosArrayInit(10, sizeof(SResPair)),};
......
...@@ -610,6 +610,11 @@ print =================>TD-2665 ...@@ -610,6 +610,11 @@ print =================>TD-2665
sql_error create table txx as select avg(c) as t from st; sql_error create table txx as select avg(c) as t from st;
sql_error create table txx1 as select avg(c) as t from t1; sql_error create table txx1 as select avg(c) as t from t1;
sql select stddev(c),stddev(c) from st group by c;
if $rows != 4 then
return -1
endi
print =================>TD-2236 print =================>TD-2236
sql select first(ts),last(ts) from t1 group by c; sql select first(ts),last(ts) from t1 group by c;
if $rows != 4 then if $rows != 4 then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册