• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

taosdata / TDengine / #4912

04 Jan 2026 09:05AM UTC coverage: 64.888% (-0.1%) from 65.028%
#4912

push

travis-ci

web-flow
merge: from main to 3.0 branch #34156

1206 of 4524 new or added lines in 22 files covered. (26.66%)

5351 existing lines in 123 files now uncovered.

194856 of 300296 relevant lines covered (64.89%)

118198896.2 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

58.89
/source/common/src/tmisce.c
1
/*
2
 * Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
3
 *
4
 * This program is free software: you can use, redistribute, and/or modify
5
 * it under the terms of the GNU Affero General Public License, version 3
6
 * or later ("AGPL"), as published by the Free Software Foundation.
7
 *
8
 * This program is distributed in the hope that it will be useful, but WITHOUT
9
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
 * FITNESS FOR A PARTICULAR PURPOSE.
11
 *
12
 * You should have received a copy of the GNU Affero General Public License
13
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14
 */
15

16
#define _DEFAULT_SOURCE
17
#include "tdatablock.h"
18
#include "tglobal.h"
19
#include "tjson.h"
20
#include "tmisce.h"
21
#include "tcompare.h"
22

23
int32_t taosGetIpv4FromEp(const char* ep, SEp* pEp) {
12,026,503✔
24
  pEp->port = 0;
12,026,503✔
25
  memset(pEp->fqdn, 0, TSDB_FQDN_LEN);
12,026,503✔
26
  tstrncpy(pEp->fqdn, ep, TSDB_FQDN_LEN);
12,025,620✔
27

28
  char* temp = strrchr(pEp->fqdn, ':');
12,025,479✔
29
  if (temp) {
12,025,479✔
30
    *temp = 0;
11,291,482✔
31
    pEp->port = taosStr2UInt16(temp + 1, NULL, 10);
11,291,440✔
32
    if (pEp->port < 0) {
33
      return TSDB_CODE_INVALID_PARA;
34
    }
35
  }
36

37
  if (pEp->port == 0) {
12,025,631✔
38
    pEp->port = tsServerPort;
734,946✔
39
  }
40

41
  if (pEp->port <= 0) {
12,025,428✔
42
    return TSDB_CODE_INVALID_PARA;
×
43
  }
44
  return 0;
12,025,856✔
45
}
46

47
static int8_t isValidPort(const char* str) {
×
48
  if (!str || !*str) return 0;
×
49
  for (const char* p = str; *p; ++p) {
×
50
    if (*p < '0' || *p > '9') {
×
51
      return 0;
×
52
    }
53
  }
54
  return 1;
×
55
}
56

57
static int32_t taosGetDualIpFromEp(const char* ep, SEp* pEp) {
×
58
  memset(pEp->fqdn, 0, TSDB_FQDN_LEN);
×
59
  pEp->port = 0;
×
60
  char buf[TSDB_FQDN_LEN] = {0};
×
61

62
  if (ep[0] == '[') {
×
63
    // [IPv6]:port format
64
    const char* end = strchr(ep, ']');
×
65
    if (!end) return TSDB_CODE_INVALID_PARA;
×
66

67
    int ipLen = end - ep - 1;
×
68
    if (ipLen >= TSDB_FQDN_LEN) ipLen = TSDB_FQDN_LEN - 1;
×
69

70
    strncpy(pEp->fqdn, ep + 1, ipLen);
×
71
    pEp->fqdn[ipLen] = '\0';
×
72

73
    if (*(end + 1) == ':' && *(end + 2)) {
×
74
      pEp->port = taosStr2UInt16(end + 2, NULL, 10);
×
75
    }
76
  } else {
77
    // Compatible with ::1:6030, ::1, IPv4:port, hostname:port, etc.
78
    strncpy(buf, ep, TSDB_FQDN_LEN - 1);
×
79
    buf[TSDB_FQDN_LEN - 1] = 0;
×
80

81
    char* lastColon = strrchr(buf, ':');
×
82
    char* firstColon = strchr(buf, ':');
×
83

84
    if (lastColon && firstColon != lastColon) {
×
85
      // Multiple colons, possibly IPv6:port or pure IPv6
86
      char* portStr = lastColon + 1;
×
87
      if (isValidPort(portStr) && lastColon != buf && (*(lastColon - 1) != ':')) {
×
88
        *lastColon = 0;
×
89
        tstrncpy(pEp->fqdn, buf, TSDB_FQDN_LEN);
×
90
        pEp->port = taosStr2UInt16(portStr, NULL, 10);
×
91
      } else {
92
        tstrncpy(pEp->fqdn, ep, TSDB_FQDN_LEN);
×
93
      }
94
    } else if (lastColon) {
×
95
      // Only one colon, IPv4:port or hostname:port
96
      char* portStr = lastColon + 1;
×
97
      if (isValidPort(portStr) && lastColon != buf) {
×
98
        *lastColon = 0;
×
99
        tstrncpy(pEp->fqdn, buf, TSDB_FQDN_LEN);
×
100
        pEp->port = taosStr2UInt16(portStr, NULL, 10);
×
101
      } else {
102
        tstrncpy(pEp->fqdn, ep, TSDB_FQDN_LEN);
×
103
      }
104
    } else {
105
      // No colon, pure hostname or IPv6 without port
106
      tstrncpy(pEp->fqdn, ep, TSDB_FQDN_LEN);
×
107
    }
108
  }
109

110
  if (pEp->port == 0) {
×
111
    pEp->port = tsServerPort;
×
112
  }
113

114
  if (pEp->port <= 0) {
×
115
    return TSDB_CODE_INVALID_PARA;
×
116
  }
117

118
  return 0;
×
119
}
120
int32_t taosGetFqdnPortFromEp(const char* ep, SEp* pEp) {
12,026,695✔
121
  if (tsEnableIpv6) {
12,026,695✔
122
    return taosGetDualIpFromEp(ep, pEp);
×
123
  } else {
124
    return taosGetIpv4FromEp(ep, pEp);
12,026,695✔
125
  }
126
}
127

128
int32_t addEpIntoEpSet(SEpSet* pEpSet, const char* fqdn, uint16_t port) {
43,730,057✔
129
  if (pEpSet == NULL || fqdn == NULL || strlen(fqdn) == 0) {
43,730,057✔
130
    return TSDB_CODE_INVALID_PARA;
×
131
  }
132

133
  int32_t index = pEpSet->numOfEps;
43,730,057✔
134
  if (index >= sizeof(pEpSet->eps) / sizeof(pEpSet->eps[0])) {
43,730,057✔
135
    return TSDB_CODE_OUT_OF_RANGE;
×
136
  }
137
  tstrncpy(pEpSet->eps[index].fqdn, fqdn, tListLen(pEpSet->eps[index].fqdn));
43,730,057✔
138
  pEpSet->eps[index].port = port;
43,730,057✔
139
  pEpSet->numOfEps += 1;
43,730,057✔
140
  return 0;
43,730,057✔
141
}
142

143
bool isEpsetEqual(const SEpSet* s1, const SEpSet* s2) {
8,913,430✔
144
  if (s1->numOfEps != s2->numOfEps || s1->inUse != s2->inUse) {
8,913,430✔
145
    return false;
1,267,804✔
146
  }
147

148
  for (int32_t i = 0; i < s1->numOfEps; i++) {
16,664,758✔
149
    if (s1->eps[i].port != s2->eps[i].port || strncmp(s1->eps[i].fqdn, s2->eps[i].fqdn, TSDB_FQDN_LEN) != 0)
9,021,883✔
150
      return false;
2,751✔
151
  }
152
  return true;
7,642,875✔
153
}
154

155
void epsetAssign(SEpSet* pDst, const SEpSet* pSrc) {
246,074✔
156
  if (pSrc == NULL || pDst == NULL) {
246,074✔
157
    return;
×
158
  }
159

160
  pDst->inUse = pSrc->inUse;
246,074✔
161
  pDst->numOfEps = pSrc->numOfEps;
246,074✔
162
  for (int32_t i = 0; i < pSrc->numOfEps; ++i) {
948,006✔
163
    pDst->eps[i].port = pSrc->eps[i].port;
701,932✔
164
    tstrncpy(pDst->eps[i].fqdn, pSrc->eps[i].fqdn, tListLen(pSrc->eps[i].fqdn));
701,932✔
165
  }
166
}
167

168
void epAssign(SEp* pDst, SEp* pSrc) {
85,565,780✔
169
  if (pSrc == NULL || pDst == NULL) {
85,565,780✔
UNCOV
170
    return;
×
171
  }
172
  memset(pDst->fqdn, 0, tListLen(pSrc->fqdn));
85,565,858✔
173
  tstrncpy(pDst->fqdn, pSrc->fqdn, tListLen(pSrc->fqdn));
85,565,858✔
174
  pDst->port = pSrc->port;
85,566,333✔
175
}
176

177
void epsetSort(SEpSet* pDst) {
72,048,060✔
178
  if (pDst->numOfEps <= 1) {
72,048,060✔
179
    return;
50,587,252✔
180
  }
181
  int validIdx = false;
21,462,282✔
182
  SEp ep = {0};
21,462,282✔
183
  if (pDst->inUse >= 0 && pDst->inUse < pDst->numOfEps) {
21,462,535✔
184
    validIdx = true;
21,461,759✔
185
    epAssign(&ep, &pDst->eps[pDst->inUse]);
21,461,759✔
186
  }
187

188
  for (int i = 0; i < pDst->numOfEps - 1; i++) {
62,228,727✔
189
    for (int j = 0; j < pDst->numOfEps - 1 - i; j++) {
103,788,662✔
190
      SEp* f = &pDst->eps[j];
63,022,337✔
191
      SEp* s = &pDst->eps[j + 1];
63,022,781✔
192
      int  cmp = strncmp(f->fqdn, s->fqdn, sizeof(f->fqdn));
63,022,858✔
193
      if (cmp > 0 || (cmp == 0 && f->port > s->port)) {
63,023,163✔
194
        SEp ep1 = {0};
21,368,148✔
195
        epAssign(&ep1, f);
21,367,961✔
196
        epAssign(f, s);
21,367,961✔
197
        epAssign(s, &ep1);
21,367,961✔
198
      }
199
    }
200
  }
201
  if (validIdx == true)
21,462,535✔
202
    for (int i = 0; i < pDst->numOfEps; i++) {
42,114,427✔
203
      int cmp = strncmp(ep.fqdn, pDst->eps[i].fqdn, sizeof(ep.fqdn));
42,114,250✔
204
      if (cmp == 0 && ep.port == pDst->eps[i].port) {
42,113,278✔
205
        pDst->inUse = i;
21,461,283✔
206
        break;
21,461,270✔
207
      }
208
    }
209
}
210

211
void updateEpSet_s(SCorEpSet* pEpSet, SEpSet* pNewEpSet) {
1,271,722✔
212
  taosCorBeginWrite(&pEpSet->version);
1,271,722✔
213
  pEpSet->epSet = *pNewEpSet;
1,271,722✔
214
  taosCorEndWrite(&pEpSet->version);
1,271,722✔
215
}
1,271,722✔
216

217
SEpSet getEpSet_s(SCorEpSet* pEpSet) {
2,147,483,647✔
218
  SEpSet ep = {0};
2,147,483,647✔
219
  taosCorBeginRead(&pEpSet->version);
2,147,483,647✔
220
  ep = pEpSet->epSet;
2,147,483,647✔
221
  taosCorEndRead(&pEpSet->version);
2,147,483,647✔
222

223
  return ep;
2,147,483,647✔
224
}
225

226
int32_t epsetToStr(const SEpSet* pEpSet, char* pBuf, int32_t cap) {
972,152,728✔
227
  int32_t ret = 0;
972,152,728✔
228
  int32_t nwrite = 0;
972,152,728✔
229

230
  nwrite = snprintf(pBuf + nwrite, cap, "epset:{");
972,152,728✔
231
  if (nwrite <= 0 || nwrite >= cap) {
972,193,358✔
232
    return TSDB_CODE_OUT_OF_BUFFER;
51,874✔
233
  }
234
  cap -= nwrite;
972,141,508✔
235

236
  for (int _i = 0; (_i < pEpSet->numOfEps) && (cap > 0); _i++) {
2,049,532,138✔
237
    if (_i == pEpSet->numOfEps - 1) {
1,077,434,767✔
238
      ret = snprintf(pBuf + nwrite, cap, "%d. %s:%d", _i, pEpSet->eps[_i].fqdn, pEpSet->eps[_i].port);
972,153,932✔
239
    } else {
240
      ret = snprintf(pBuf + nwrite, cap, "%d. %s:%d, ", _i, pEpSet->eps[_i].fqdn, pEpSet->eps[_i].port);
105,260,604✔
241
    }
242

243
    if (ret <= 0 || ret >= cap) {
1,077,390,516✔
244
      return TSDB_CODE_OUT_OF_BUFFER;
×
245
    }
246

247
    nwrite += ret;
1,077,390,630✔
248
    cap -= ret;
1,077,390,630✔
249
  }
250

251
  if (cap <= 0) {
972,172,727✔
252
    return TSDB_CODE_OUT_OF_BUFFER;
×
253
  }
254

255
  ret = snprintf(pBuf + nwrite, cap, "}, inUse:%d", pEpSet->inUse);
972,172,727✔
256
  if (ret <= 0 || ret >= cap) {
972,154,944✔
257
    return TSDB_CODE_OUT_OF_BUFFER;
58✔
258
  } else {
259
    return TSDB_CODE_SUCCESS;
972,154,886✔
260
  }
261
}
262

263
int32_t taosGenCrashJsonMsg(int signum, char** pMsg, int64_t clusterId, int64_t startTime) {
×
264
  int32_t code = 0;
×
265
  SJson*  pJson = tjsonCreateObject();
×
266
  if (pJson == NULL) return terrno;
×
267

268
  char tmp[4096] = {0};
×
269

270
  TAOS_CHECK_GOTO(tjsonAddDoubleToObject(pJson, "reportVersion", 1), NULL, _exit);
×
271

272
  TAOS_CHECK_GOTO(tjsonAddIntegerToObject(pJson, "clusterId", clusterId), NULL, _exit);
×
273
  TAOS_CHECK_GOTO(tjsonAddIntegerToObject(pJson, "startTime", startTime), NULL, _exit);
×
274

275
  // Do NOT invoke the taosGetFqdn here.
276
  // this function may be invoked when memory exception occurs,so we should assume that it is running in a memory locked
277
  // environment. The lock operation by taosGetFqdn may cause this program deadlock.
278
  TAOS_CHECK_GOTO(tjsonAddStringToObject(pJson, "fqdn", tsLocalFqdn), NULL, _exit);
×
279

280
  TAOS_CHECK_GOTO(tjsonAddIntegerToObject(pJson, "pid", taosGetPId()), NULL, _exit);
×
281

282
  code = taosGetAppName(tmp, NULL);
×
283
  if (code != 0) {
×
284
    TAOS_CHECK_GOTO(code, NULL, _exit);
×
285
  }
286
  TAOS_CHECK_GOTO(tjsonAddStringToObject(pJson, "appName", tmp), NULL, _exit);
×
287

288
  if (taosGetOsReleaseName(tmp, NULL, NULL, sizeof(tmp)) == 0) {
×
289
    TAOS_CHECK_GOTO(tjsonAddStringToObject(pJson, "os", tmp), NULL, _exit);
×
290
  } else {
291
    // do nothing
292
  }
293

294
  float numOfCores = 0;
×
295
  if (taosGetCpuInfo(tmp, sizeof(tmp), &numOfCores) == 0) {
×
296
    TAOS_CHECK_GOTO(tjsonAddStringToObject(pJson, "cpuModel", tmp), NULL, _exit);
×
297
    TAOS_CHECK_GOTO(tjsonAddDoubleToObject(pJson, "numOfCpu", numOfCores), NULL, _exit);
×
298
  } else {
299
    TAOS_CHECK_GOTO(tjsonAddDoubleToObject(pJson, "numOfCpu", tsNumOfCores), NULL, _exit);
×
300
  }
301

302
  int32_t nBytes = snprintf(tmp, sizeof(tmp), "%" PRId64 " kB", tsTotalMemoryKB);
×
303
  if (nBytes <= 9 || nBytes >= sizeof(tmp)) {
×
304
    TAOS_CHECK_GOTO(TSDB_CODE_OUT_OF_RANGE, NULL, _exit);
×
305
  }
306
  TAOS_CHECK_GOTO(tjsonAddStringToObject(pJson, "memory", tmp), NULL, _exit);
×
307

308
  TAOS_CHECK_GOTO(tjsonAddStringToObject(pJson, "version", td_version), NULL, _exit);
×
309
  TAOS_CHECK_GOTO(tjsonAddStringToObject(pJson, "buildInfo", td_buildinfo), NULL, _exit);
×
310
  TAOS_CHECK_GOTO(tjsonAddStringToObject(pJson, "gitInfo", td_gitinfo), NULL, _exit);
×
311

312
  TAOS_CHECK_GOTO(tjsonAddIntegerToObject(pJson, "crashSig", signum), NULL, _exit);
×
313
  TAOS_CHECK_GOTO(tjsonAddIntegerToObject(pJson, "crashTs", taosGetTimestampUs()), NULL, _exit);
×
314

315
#if 0
316
#ifdef _TD_DARWIN_64
317
  taosLogTraceToBuf(tmp, sizeof(tmp), 4);
318
#elif !defined(WINDOWS)
319
  taosLogTraceToBuf(tmp, sizeof(tmp), 3);
320
#else
321
  taosLogTraceToBuf(tmp, sizeof(tmp), 8);
322
#endif
323

324
  TAOS_CHECK_GOTO(tjsonAddStringToObject(pJson, "stackInfo", tmp), NULL, _exit);
325
#endif
326
  char* pCont = tjsonToString(pJson);
×
327
  if (pCont == NULL) {
×
328
    code = terrno;
×
329
    TAOS_CHECK_GOTO(code, NULL, _exit);
×
330
    goto _exit;
×
331
  }
332

333
  tjsonDelete(pJson);
×
334
  *pMsg = pCont;
×
335
  pJson = NULL;
×
336
_exit:
×
337
  tjsonDelete(pJson);
×
338
  TAOS_RETURN(code);
×
339
}
340

341
int32_t dumpConfToDataBlock(SSDataBlock* pBlock, int32_t startCol, char* likePattern) {
40,048✔
342
  int32_t  code = 0;
40,048✔
343
  SConfig* pConf = taosGetCfg();
40,048✔
344
  if (pConf == NULL) {
40,048✔
345
    return TSDB_CODE_INVALID_CFG;
×
346
  }
347

348
  int32_t      numOfRows = 0;
40,048✔
349
  int32_t      col = startCol;
40,048✔
350
  SConfigItem* pItem = NULL;
40,048✔
351
  SConfigIter* pIter = NULL;
40,048✔
352

353
  int8_t locked = 0;
40,048✔
354

355
  size_t       exSize = 0;
40,048✔
356
  size_t       index = 0;
40,048✔
357
  SConfigItem* pDataDirItem = cfgGetItem(pConf, "dataDir");
40,048✔
358
  if (pDataDirItem) {
40,048✔
359
    exSize = TMAX(taosArrayGetSize(pDataDirItem->array), 1) - 1;
28,518✔
360
  }
361

362
  TAOS_CHECK_GOTO(blockDataEnsureCapacity(pBlock, cfgGetSize(pConf) + exSize), NULL, _exit);
40,048✔
363

364
  TAOS_CHECK_GOTO(cfgCreateIter(pConf, &pIter), NULL, _exit);
40,048✔
365

366
  cfgLock(pConf);
40,048✔
367
  locked = 1;
40,048✔
368

369
  while ((pItem = cfgNextIter(pIter)) != NULL) {
8,642,318✔
370
  _start:
8,602,270✔
371
    col = startCol;
8,602,270✔
372

373
    // GRANT_CFG_SKIP;
374
    char name[TSDB_CONFIG_OPTION_LEN + VARSTR_HEADER_SIZE] = {0};
8,602,270✔
375
    if (likePattern && rawStrPatternMatch(pItem->name, likePattern) != TSDB_PATTERN_MATCH) {
8,602,270✔
376
      continue;
169,512✔
377
    }
378
    STR_WITH_MAXSIZE_TO_VARSTR(name, pItem->name, TSDB_CONFIG_OPTION_LEN + VARSTR_HEADER_SIZE);
8,432,758✔
379

380
    SColumnInfoData* pColInfo = taosArrayGet(pBlock->pDataBlock, col++);
8,432,758✔
381
    if (pColInfo == NULL) {
8,432,758✔
382
      code = terrno;
×
383
      TAOS_CHECK_GOTO(code, NULL, _exit);
×
384
    }
385

386
    TAOS_CHECK_GOTO(colDataSetVal(pColInfo, numOfRows, name, false), NULL, _exit);
8,432,758✔
387

388
    char      value[TSDB_CONFIG_PATH_LEN + VARSTR_HEADER_SIZE] = {0};
8,432,758✔
389
    int32_t   valueLen = 0;
8,432,758✔
390
    SDiskCfg* pDiskCfg = NULL;
8,432,758✔
391
    if (strcasecmp(pItem->name, "dataDir") == 0 && exSize > 0) {
8,432,758✔
392
      char* buf = &value[VARSTR_HEADER_SIZE];
×
393
      pDiskCfg = taosArrayGet(pItem->array, index);
×
394
      valueLen = tsnprintf(buf, TSDB_CONFIG_PATH_LEN, "%s", pDiskCfg->dir);
×
395
      index++;
×
396
    } else {
397
      TAOS_CHECK_GOTO(cfgDumpItemValue(pItem, &value[VARSTR_HEADER_SIZE], TSDB_CONFIG_PATH_LEN, &valueLen), NULL,
8,432,758✔
398
                      _exit);
399
    }
400
    varDataSetLen(value, valueLen);
8,432,758✔
401

402
    pColInfo = taosArrayGet(pBlock->pDataBlock, col++);
8,432,758✔
403
    if (pColInfo == NULL) {
8,432,758✔
404
      code = terrno;
×
405
      TAOS_CHECK_GOTO(code, NULL, _exit);
×
406
    }
407

408
    TAOS_CHECK_GOTO(colDataSetVal(pColInfo, numOfRows, value, false), NULL, _exit);
8,432,758✔
409

410
    char scope[TSDB_CONFIG_SCOPE_LEN + VARSTR_HEADER_SIZE] = {0};
8,432,758✔
411
    TAOS_CHECK_GOTO(cfgDumpItemScope(pItem, &scope[VARSTR_HEADER_SIZE], TSDB_CONFIG_SCOPE_LEN, &valueLen), NULL, _exit);
8,432,758✔
412
    varDataSetLen(scope, valueLen);
8,432,758✔
413

414
    pColInfo = taosArrayGet(pBlock->pDataBlock, col++);
8,432,758✔
415
    if (pColInfo == NULL) {
8,432,758✔
416
      code = terrno;
×
417
      TAOS_CHECK_GOTO(code, NULL, _exit);
×
418
    }
419
    TAOS_CHECK_GOTO(colDataSetVal(pColInfo, numOfRows, scope, false), NULL, _exit);
8,432,758✔
420

421
    char category[TSDB_CONFIG_CATEGORY_LEN + VARSTR_HEADER_SIZE] = {0};
8,432,758✔
422
    TAOS_CHECK_GOTO(cfgDumpItemCategory(pItem, &category[VARSTR_HEADER_SIZE], TSDB_CONFIG_CATEGORY_LEN, &valueLen),
8,432,758✔
423
                    NULL, _exit);
424
    varDataSetLen(category, valueLen);
8,432,758✔
425

426
    pColInfo = taosArrayGet(pBlock->pDataBlock, col++);
8,432,758✔
427
    if (pColInfo == NULL) {
8,432,758✔
428
      code = terrno;
×
429
      TAOS_CHECK_GOTO(code, NULL, _exit);
×
430
    }
431
    TAOS_CHECK_GOTO(colDataSetVal(pColInfo, numOfRows, category, false), NULL, _exit);
8,432,758✔
432

433
    char info[TSDB_CONFIG_INFO_LEN + VARSTR_HEADER_SIZE] = {0};
8,432,758✔
434
    if (strcasecmp(pItem->name, "dataDir") == 0 && pDiskCfg) {
8,432,758✔
435
      char* buf = &info[VARSTR_HEADER_SIZE];
×
436
      valueLen = tsnprintf(buf, TSDB_CONFIG_INFO_LEN, "level %d primary %d disabled %" PRIi8, pDiskCfg->level,
×
437
                           pDiskCfg->primary, pDiskCfg->disable);
×
438
    } else {
439
      valueLen = 0;
8,432,758✔
440
    }
441
    varDataSetLen(info, valueLen);
8,432,758✔
442

443
    pColInfo = taosArrayGet(pBlock->pDataBlock, col++);
8,432,758✔
444
    if (pColInfo == NULL) {
8,432,758✔
445
      code = terrno;
×
446
      TAOS_CHECK_GOTO(code, NULL, _exit);
×
447
    }
448
    TAOS_CHECK_GOTO(colDataSetVal(pColInfo, numOfRows, info, false), NULL, _exit);
8,432,758✔
449

450
    numOfRows++;
8,432,758✔
451
    if (index > 0 && index <= exSize) {
8,432,758✔
452
      goto _start;
×
453
    }
454
  }
455
  pBlock->info.rows = numOfRows;
40,048✔
456
_exit:
40,048✔
457
  if (locked) cfgUnLock(pConf);
40,048✔
458
  cfgDestroyIter(pIter);
40,048✔
459
  TAOS_RETURN(code);
40,048✔
460
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc