未验证 提交 654161e3 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #16674 from taosdata/szhou/2.6/ts-1828

fix: typo error when find long query
...@@ -930,7 +930,7 @@ _cleanup: ...@@ -930,7 +930,7 @@ _cleanup:
free(colKVs); free(colKVs);
if (r == fromIndex) { if (r == fromIndex) {
tscError("buffer can not fit one line"); tscDebug("buffer can not fit one line");
*cTableSqlLen = 0; *cTableSqlLen = 0;
} else { } else {
*cTableSqlLen = totalLen; *cTableSqlLen = totalLen;
...@@ -2608,6 +2608,12 @@ int32_t tscParseLine(const char* sql, TAOS_SML_DATA_POINT* smlData, SSmlLinesInf ...@@ -2608,6 +2608,12 @@ int32_t tscParseLine(const char* sql, TAOS_SML_DATA_POINT* smlData, SSmlLinesInf
return ret; return ret;
} }
tscDebug("SML:0x%"PRIx64" Parse fields finished, num of fields:%d", info->id, smlData->fieldNum); tscDebug("SML:0x%"PRIx64" Parse fields finished, num of fields:%d", info->id, smlData->fieldNum);
if (smlData->fieldNum == 0) {
tscDebug("SML:0x%"PRIx64" Parse fields error, no field in line", info->id);
taosHashCleanup(keyHashTable);
return TSDB_CODE_TSC_LINE_SYNTAX_ERROR;
}
taosHashCleanup(keyHashTable); taosHashCleanup(keyHashTable);
//Parse timestamp //Parse timestamp
......
...@@ -642,7 +642,7 @@ static int compareLongQuery(const void* p1, const void* p2) { ...@@ -642,7 +642,7 @@ static int compareLongQuery(const void* p1, const void* p2) {
} }
// callback for taosCacheRefresh // callback for taosCacheRefresh
static void cbFoundItem(void* handle, void* param1) { static void cbFoundLongQuery(void* handle, void* param1) {
SQInfo * qInfo = *(SQInfo**) handle; SQInfo * qInfo = *(SQInfo**) handle;
if(qInfo == NULL) return ; if(qInfo == NULL) return ;
SArray* qids = (SArray*) param1; SArray* qids = (SArray*) param1;
...@@ -654,7 +654,7 @@ static void cbFoundItem(void* handle, void* param1) { ...@@ -654,7 +654,7 @@ static void cbFoundItem(void* handle, void* param1) {
SMemTable* imem = qInfo->query.memRef.snapshot.imem; SMemTable* imem = qInfo->query.memRef.snapshot.imem;
if(mem == NULL || T_REF_VAL_GET(mem) == 0) if(mem == NULL || T_REF_VAL_GET(mem) == 0)
usedMem = false; usedMem = false;
if(imem == NULL || T_REF_VAL_GET(mem) == 0) if(imem == NULL || T_REF_VAL_GET(imem) == 0)
usedIMem = false ; usedIMem = false ;
if(!usedMem && !usedIMem) if(!usedMem && !usedIMem)
...@@ -675,7 +675,7 @@ void* qObtainLongQuery(void* param){ ...@@ -675,7 +675,7 @@ void* qObtainLongQuery(void* param){
SArray* qids = taosArrayInit(4, sizeof(int64_t*)); SArray* qids = taosArrayInit(4, sizeof(int64_t*));
if(qids == NULL) return NULL; if(qids == NULL) return NULL;
// Get each item // Get each item
taosCacheRefresh(qMgmt->qinfoPool, cbFoundItem, qids); taosCacheRefresh(qMgmt->qinfoPool, cbFoundLongQuery, qids);
size_t cnt = taosArrayGetSize(qids); size_t cnt = taosArrayGetSize(qids);
if(cnt == 0) { if(cnt == 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册