Merge pull request #19960 from taosdata/fix/nodisk
fix(query): 1. reset the pointer, when initialize the reader failed. …
This commit is contained in:
commit
4e11adebe4
|
@ -41,6 +41,13 @@ static int32_t saveOneRow(SArray* pRow, SSDataBlock* pBlock, SCacheRowsReader* p
|
|||
int32_t slotId = slotIds[i];
|
||||
SLastCol* pColVal = (SLastCol*)taosArrayGet(pRow, slotId);
|
||||
|
||||
// add check for null value, caused by the modification of table schema (new column added).
|
||||
if (pColVal == NULL) {
|
||||
p->ts = 0;
|
||||
p->isNull = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
p->ts = pColVal->ts;
|
||||
p->isNull = !COL_VAL_IS_VALUE(&pColVal->colVal);
|
||||
allNullRow = p->isNull & allNullRow;
|
||||
|
|
|
@ -3942,6 +3942,7 @@ int32_t tsdbReaderOpen(SVnode* pVnode, SQueryTableDataCond* pCond, void* pTableL
|
|||
_err:
|
||||
tsdbError("failed to create data reader, code:%s %s", tstrerror(code), idstr);
|
||||
tsdbReaderClose(pReader);
|
||||
*ppReader = NULL; // reset the pointer value.
|
||||
return code;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue