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

Merge pull request #17212 from taosdata/feature/TD-19221

fix:add totalRows to get the result lines after parser
...@@ -1980,6 +1980,7 @@ static int32_t parseSmlTimeStamp(TAOS_SML_KV **pTS, const char **idx, int32_t le ...@@ -1980,6 +1980,7 @@ static int32_t parseSmlTimeStamp(TAOS_SML_KV **pTS, const char **idx, int32_t le
if (len > 0) { if (len > 0) {
value = calloc(len + 1, 1); value = calloc(len + 1, 1);
memcpy(value, start, len); memcpy(value, start, len);
len = strtrim(value);
} }
ret = convertSmlTimeStamp(*pTS, value, len, info); ret = convertSmlTimeStamp(*pTS, value, len, info);
...@@ -2677,7 +2678,7 @@ int32_t tscParseLines(char* data, int32_t len, char* lines[], int numLines, SArr ...@@ -2677,7 +2678,7 @@ int32_t tscParseLines(char* data, int32_t len, char* lines[], int numLines, SArr
int32_t lenTmp = 0; int32_t lenTmp = 0;
for(int i = 0; i < len; i++){ for(int i = 0; i < len; i++){
if(data[i] == '\n' || i == len - 1){ if(data[i] == '\n' || i == len - 1){
if(data[i] != '\n' || i == len - 1){ if(data[i] != '\n' && i == len - 1){
lenTmp ++; lenTmp ++;
} }
if(lenTmp > 0) { if(lenTmp > 0) {
......
...@@ -428,7 +428,7 @@ static int32_t tscParseTelnetLines(char* data, int32_t len, char* lines[], int n ...@@ -428,7 +428,7 @@ static int32_t tscParseTelnetLines(char* data, int32_t len, char* lines[], int n
int32_t lenTmp = 0; int32_t lenTmp = 0;
for(int i = 0; i < len; i++){ for(int i = 0; i < len; i++){
if(data[i] == '\n' || i == len - 1){ if(data[i] == '\n' || i == len - 1){
if(data[i] != '\n' || i == len - 1){ if(data[i] != '\n' && i == len - 1){
lenTmp++; lenTmp++;
} }
if(lenTmp > 0) { if(lenTmp > 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册