未验证 提交 b27e172d 编写于 作者: D dapan1121 提交者: GitHub

Merge pull request #8099 from taosdata/fix/TS-401-2.0

[TS-401]<fix>: fixed bug that update didn't work in some conditions
......@@ -52,6 +52,7 @@ typedef void (*__async_cb_func_t)(void *param, TAOS_RES *tres, int32_t numOfRows
typedef struct STableComInfo {
uint8_t numOfTags;
uint8_t precision;
uint8_t update;
int16_t numOfColumns;
int32_t rowSize;
} STableComInfo;
......
......@@ -678,6 +678,10 @@ void tscSortRemoveDataBlockDupRows(STableDataBlocks *dataBuf) {
TSKEY tj = *(TSKEY *)(pBlockData + dataBuf->rowSize * j);
if (ti == tj) {
if (dataBuf->pTableMeta && dataBuf->pTableMeta->tableInfo.update != 0) {
memmove(pBlockData + dataBuf->rowSize * i, pBlockData + dataBuf->rowSize * j, dataBuf->rowSize);
}
++j;
continue;
}
......
......@@ -99,6 +99,7 @@ STableMeta* tscCreateTableMetaFromMsg(STableMetaMsg* pTableMetaMsg) {
pTableMeta->tableInfo = (STableComInfo) {
.numOfTags = pTableMetaMsg->numOfTags,
.precision = pTableMetaMsg->precision,
.update = pTableMetaMsg->update,
.numOfColumns = pTableMetaMsg->numOfColumns,
};
......
......@@ -2913,6 +2913,7 @@ STableMeta* createSuperTableMeta(STableMetaMsg* pChild) {
pTableMeta->tableInfo.numOfTags = pChild->numOfTags;
pTableMeta->tableInfo.numOfColumns = pChild->numOfColumns;
pTableMeta->tableInfo.precision = pChild->precision;
pTableMeta->tableInfo.update = pChild->update;
pTableMeta->id.tid = 0;
pTableMeta->id.uid = pChild->suid;
......
......@@ -754,6 +754,7 @@ typedef struct STableMetaMsg {
char tableFname[TSDB_TABLE_FNAME_LEN]; // table id
uint8_t numOfTags;
uint8_t precision;
uint8_t update;
uint8_t tableType;
int16_t numOfColumns;
int16_t sversion;
......
......@@ -1686,6 +1686,7 @@ static int32_t mnodeGetSuperTableMeta(SMnodeMsg *pMsg) {
pMeta->sversion = htons(pTable->sversion);
pMeta->tversion = htons(pTable->tversion);
pMeta->precision = pMsg->pDb->cfg.precision;
pMeta->update = pMsg->pDb->cfg.update;
pMeta->numOfTags = (uint8_t)pTable->numOfTags;
pMeta->numOfColumns = htons((int16_t)pTable->numOfColumns);
pMeta->tableType = pTable->info.type;
......@@ -2383,6 +2384,7 @@ static int32_t mnodeDoGetChildTableMeta(SMnodeMsg *pMsg, STableMetaMsg *pMeta) {
pMeta->uid = htobe64(pTable->uid);
pMeta->tid = htonl(pTable->tid);
pMeta->precision = pDb->cfg.precision;
pMeta->update = pDb->cfg.update;
pMeta->tableType = pTable->info.type;
tstrncpy(pMeta->tableFname, pTable->info.tableId, TSDB_TABLE_FNAME_LEN);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册