From f658c2caa38ec1c69cb1dbb72f4191bf103ccb7e Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Mon, 4 Jul 2022 20:20:32 +0800 Subject: [PATCH] fix tag error --- source/libs/index/CMakeLists.txt | 6 +++--- source/libs/index/src/indexFstFile.c | 8 ++------ source/libs/index/src/indexTfile.c | 5 ++++- source/libs/transport/src/transSvr.c | 3 +-- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/source/libs/index/CMakeLists.txt b/source/libs/index/CMakeLists.txt index 33133d21ae..0c2ce37c40 100644 --- a/source/libs/index/CMakeLists.txt +++ b/source/libs/index/CMakeLists.txt @@ -35,7 +35,7 @@ if (${BUILD_WITH_INVERTEDINDEX}) endif(${BUILD_WITH_INVERTEDINDEX}) -# if (${BUILD_TEST}) -# add_subdirectory(test) -# endif(${BUILD_TEST}) +if (${BUILD_TEST}) + add_subdirectory(test) +endif(${BUILD_TEST}) diff --git a/source/libs/index/src/indexFstFile.c b/source/libs/index/src/indexFstFile.c index 77dce21150..9106caebd6 100644 --- a/source/libs/index/src/indexFstFile.c +++ b/source/libs/index/src/indexFstFile.c @@ -71,9 +71,7 @@ static int idxFileCtxGetSize(IFileCtx* ctx) { } static int idxFileCtxDoFlush(IFileCtx* ctx) { if (ctx->type == TFile) { - // taosFsyncFile(ctx->file.pFile); taosFsyncFile(ctx->file.pFile); - // tfFlush(ctx->file.pFile); } else { // do nothing } @@ -190,13 +188,11 @@ int idxFileRead(IdxFstFile* write, uint8_t* buf, uint32_t len) { return 0; } IFileCtx* ctx = write->wrt; - int nRead = ctx->read(ctx, buf, len); - // assert(nRead == len); - return nRead; + return ctx->read(ctx, buf, len); } uint32_t idxFileMaskedCheckSum(IdxFstFile* write) { - // opt + ////// return write->summer; } diff --git a/source/libs/index/src/indexTfile.c b/source/libs/index/src/indexTfile.c index e9abd3e577..70cdedd917 100644 --- a/source/libs/index/src/indexTfile.c +++ b/source/libs/index/src/indexTfile.c @@ -457,7 +457,10 @@ static int32_t tfSearchCompareFunc_JSON(void* reader, SIndexTerm* tem, SIdxTRslt } else if (0 != strncmp(ch, p, skip)) { continue; } - cond = cmpFn(ch + skip, tem->colVal, IDX_TYPE_GET_TYPE(tem->colType)); + char* tBuf = taosMemoryCalloc(1, sz + 1); + memcpy(tBuf, ch, sz); + cond = cmpFn(tBuf + skip, tem->colVal, IDX_TYPE_GET_TYPE(tem->colType)); + taosMemoryFree(tBuf); } if (MATCH == cond) { tfileReaderLoadTableIds((TFileReader*)reader, rt->out.out, tr->total); diff --git a/source/libs/transport/src/transSvr.c b/source/libs/transport/src/transSvr.c index 4f33c8cdc1..58d6d53684 100644 --- a/source/libs/transport/src/transSvr.c +++ b/source/libs/transport/src/transSvr.c @@ -1,7 +1,6 @@ /* * Copyright (c) 2019 TAOS Data, Inc. - * - * This program is free software: you can use, redistribute, and/or modify + * * This program is free software: you can use, redistribute, and/or modify * it under the terms of the GNU Affero General Public License, version 3 * or later ("AGPL"), as published by the Free Software Foundation. * -- GitLab