未验证 提交 5f62c311 编写于 作者: H Haojun Liao 提交者: GitHub

Merge pull request #6694 from taosdata/hotfix/td-4986

[TD-4986]<fix>:fix core when no ts column returned from subquery
......@@ -1575,7 +1575,7 @@ static void last_function(SQLFunctionCtx *pCtx) {
memcpy(pCtx->pOutput, data, pCtx->inputBytes);
TSKEY ts = GET_TS_DATA(pCtx, i);
TSKEY ts = pCtx->ptsList ? GET_TS_DATA(pCtx, i) : 0;
DO_UPDATE_TAG_COLUMNS(pCtx, ts);
pResInfo->hasResult = DATA_SET_FLAG;
......@@ -1590,7 +1590,7 @@ static void last_function(SQLFunctionCtx *pCtx) {
continue;
}
TSKEY ts = GET_TS_DATA(pCtx, i);
TSKEY ts = pCtx->ptsList ? GET_TS_DATA(pCtx, i) : 0;
char* buf = GET_ROWCELL_INTERBUF(pResInfo);
if (pResInfo->hasResult != DATA_SET_FLAG || (*(TSKEY*)buf) < ts) {
......
......@@ -82,5 +82,9 @@ endi
if $data01 != NULL then
return -1
endi
sql select last_row(*) from (select f from lr_nested)
if $rows != 1 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册