提交 7649ede0 编写于 作者: X Xiaoyu Wang

fix: last cache read problem after schema change

上级 7deee1c4
......@@ -1432,6 +1432,7 @@ static int32_t mergeLast(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SCach
int16_t nLastCol = pTSchema->numOfCols;
int16_t noneCol = 0;
bool setNoneCol = false;
bool hasRow = false;
SArray *pColArray = NULL;
SColVal *pColVal = &(SColVal){0};
......@@ -1454,6 +1455,8 @@ static int32_t mergeLast(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SCach
break;
}
hasRow = true;
code = updateTSchema(TSDBROW_SVERSION(pRow), pr, uid);
if (TSDB_CODE_SUCCESS != code) {
goto _err;
......@@ -1545,6 +1548,9 @@ static int32_t mergeLast(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SCach
//*ppLastArray = NULL;
// taosArrayDestroy(pColArray);
//} else {
if (!hasRow) {
taosArrayClear(pColArray);
}
*ppLastArray = pColArray;
//}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册