“3be59e4e24ef1f478685da85d1e76b17485295c2”上不存在“tests/script/tsim/table/smallint.sim”
提交 eb239b13 编写于 作者: A Alex Duan

[TS-238]<feature>: support last() cache ok if delete last

上级 f3cf8d5b
......@@ -845,9 +845,8 @@ int tsdbRestoreLastRow(STsdbRepo *pRepo, STable *pTable, SReadH* pReadh, SBlockI
// during the load data in file, new data would be inserted and last row has been updated
TSDB_WLOCK_TABLE(pTable);
if (onlyKey) {
pTable->lastKey = lastKey;
} else {
if (!onlyKey) {
// set
if (pTable->lastRow) {
SMemRow* p = pTable->lastRow;
......@@ -956,7 +955,7 @@ int32_t tsdbLoadLastCache(STsdbRepo *pRepo, STable *pTable, bool force) {
taosTZfree(pTable->lastRow);
pTable->lastRow = NULL;
}
if (!cacheLastCol && pTable->lastCols != NULL) {
if ((!cacheLastCol && pTable->lastCols != NULL) || force) {
tsdbFreeLastColumns(pTable);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册