Merge pull request #6694 from taosdata/hotfix/td-4986
[TD-4986]<fix>:fix core when no ts column returned from subquery
This commit is contained in:
commit
5f62c311c3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue