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

taosdata / TDengine / #4896

24 Dec 2025 07:36AM UTC coverage: 65.929% (+0.4%) from 65.513%
#4896

push

travis-ci

web-flow
enh: [TS-7591] Some code refactor and add more log. (#34022)

326 of 537 new or added lines in 4 files covered. (60.71%)

370 existing lines in 111 files now uncovered.

185828 of 281861 relevant lines covered (65.93%)

116309824.55 hits per line

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

58.52
/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) {
13,630,354✔
24
  pEp->port = 0;
13,630,354✔
25
  memset(pEp->fqdn, 0, TSDB_FQDN_LEN);
13,631,055✔
26
  tstrncpy(pEp->fqdn, ep, TSDB_FQDN_LEN);
13,630,766✔
27

28
  char* temp = strrchr(pEp->fqdn, ':');
13,630,765✔
29
  if (temp) {
13,630,799✔
30
    *temp = 0;
12,639,308✔
31
    pEp->port = taosStr2UInt16(temp + 1, NULL, 10);
12,638,807✔
32
    if (pEp->port < 0) {
33
      return TSDB_CODE_INVALID_PARA;
34
    }
35
  }
36

37
  if (pEp->port == 0) {
13,630,412✔
38
    pEp->port = tsServerPort;
991,795✔
39
  }
40

41
  if (pEp->port <= 0) {
13,631,458✔
42
    return TSDB_CODE_INVALID_PARA;
×
43
  }
44
  return 0;
13,630,879✔
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) {
13,630,476✔
121
  if (tsEnableIpv6) {
13,630,476✔
122
    return taosGetDualIpFromEp(ep, pEp);
×
123
  } else {
124
    return taosGetIpv4FromEp(ep, pEp);
13,630,476✔
125
  }
126
}
127

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

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

143
bool isEpsetEqual(const SEpSet* s1, const SEpSet* s2) {
8,606,462✔
144
  if (s1->numOfEps != s2->numOfEps || s1->inUse != s2->inUse) {
8,606,462✔
145
    return false;
1,002,234✔
146
  }
147

148
  for (int32_t i = 0; i < s1->numOfEps; i++) {
18,454,402✔
149
    if (s1->eps[i].port != s2->eps[i].port || strncmp(s1->eps[i].fqdn, s2->eps[i].fqdn, TSDB_FQDN_LEN) != 0)
10,854,111✔
150
      return false;
3,937✔
151
  }
152
  return true;
7,600,291✔
153
}
154

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

160
  pDst->inUse = pSrc->inUse;
720,622✔
161
  pDst->numOfEps = pSrc->numOfEps;
720,622✔
162
  for (int32_t i = 0; i < pSrc->numOfEps; ++i) {
2,836,614✔
163
    pDst->eps[i].port = pSrc->eps[i].port;
2,115,992✔
164
    tstrncpy(pDst->eps[i].fqdn, pSrc->eps[i].fqdn, tListLen(pSrc->eps[i].fqdn));
2,115,992✔
165
  }
166
}
167

168
void epAssign(SEp* pDst, SEp* pSrc) {
80,213,469✔
169
  if (pSrc == NULL || pDst == NULL) {
80,213,469✔
170
    return;
×
171
  }
172
  memset(pDst->fqdn, 0, tListLen(pSrc->fqdn));
80,214,086✔
173
  tstrncpy(pDst->fqdn, pSrc->fqdn, tListLen(pSrc->fqdn));
80,214,376✔
174
  pDst->port = pSrc->port;
80,215,116✔
175
}
176

177
void epsetSort(SEpSet* pDst) {
78,514,648✔
178
  if (pDst->numOfEps <= 1) {
78,514,648✔
179
    return;
53,630,825✔
180
  }
181
  int validIdx = false;
24,885,959✔
182
  SEp ep = {0};
24,885,959✔
183
  if (pDst->inUse >= 0 && pDst->inUse < pDst->numOfEps) {
24,886,272✔
184
    validIdx = true;
24,885,045✔
185
    epAssign(&ep, &pDst->eps[pDst->inUse]);
24,885,045✔
186
  }
187

188
  for (int i = 0; i < pDst->numOfEps - 1; i++) {
72,296,957✔
189
    for (int j = 0; j < pDst->numOfEps - 1 - i; j++) {
120,145,133✔
190
      SEp* f = &pDst->eps[j];
72,734,546✔
191
      SEp* s = &pDst->eps[j + 1];
72,735,092✔
192
      int  cmp = strncmp(f->fqdn, s->fqdn, sizeof(f->fqdn));
72,736,305✔
193
      if (cmp > 0 || (cmp == 0 && f->port > s->port)) {
72,737,233✔
194
        SEp ep1 = {0};
18,441,528✔
195
        epAssign(&ep1, f);
18,443,305✔
196
        epAssign(f, s);
18,443,305✔
197
        epAssign(s, &ep1);
18,443,305✔
198
      }
199
    }
200
  }
201
  if (validIdx == true)
24,886,247✔
202
    for (int i = 0; i < pDst->numOfEps; i++) {
48,334,906✔
203
      int cmp = strncmp(ep.fqdn, pDst->eps[i].fqdn, sizeof(ep.fqdn));
48,334,579✔
204
      if (cmp == 0 && ep.port == pDst->eps[i].port) {
48,332,418✔
205
        pDst->inUse = i;
24,886,892✔
206
        break;
24,886,449✔
207
      }
208
    }
209
}
210

211
void updateEpSet_s(SCorEpSet* pEpSet, SEpSet* pNewEpSet) {
1,007,482✔
212
  taosCorBeginWrite(&pEpSet->version);
1,007,482✔
213
  pEpSet->epSet = *pNewEpSet;
1,007,482✔
214
  taosCorEndWrite(&pEpSet->version);
1,007,482✔
215
}
1,007,482✔
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) {
938,898,590✔
227
  int32_t ret = 0;
938,898,590✔
228
  int32_t nwrite = 0;
938,898,590✔
229

230
  nwrite = snprintf(pBuf + nwrite, cap, "epset:{");
938,898,590✔
231
  if (nwrite <= 0 || nwrite >= cap) {
938,945,915✔
232
    return TSDB_CODE_OUT_OF_BUFFER;
59,635✔
233
  }
234
  cap -= nwrite;
938,886,303✔
235

236
  for (int _i = 0; (_i < pEpSet->numOfEps) && (cap > 0); _i++) {
1,961,487,982✔
237
    if (_i == pEpSet->numOfEps - 1) {
1,022,649,644✔
238
      ret = snprintf(pBuf + nwrite, cap, "%d. %s:%d", _i, pEpSet->eps[_i].fqdn, pEpSet->eps[_i].port);
938,915,227✔
239
    } else {
240
      ret = snprintf(pBuf + nwrite, cap, "%d. %s:%d, ", _i, pEpSet->eps[_i].fqdn, pEpSet->eps[_i].port);
83,750,418✔
241
    }
242

243
    if (ret <= 0 || ret >= cap) {
1,022,601,533✔
244
      return TSDB_CODE_OUT_OF_BUFFER;
×
245
    }
246

247
    nwrite += ret;
1,022,601,679✔
248
    cap -= ret;
1,022,601,679✔
249
  }
250

251
  if (cap <= 0) {
938,895,654✔
252
    return TSDB_CODE_OUT_OF_BUFFER;
×
253
  }
254

255
  ret = snprintf(pBuf + nwrite, cap, "}, inUse:%d", pEpSet->inUse);
938,895,654✔
256
  if (ret <= 0 || ret >= cap) {
938,893,230✔
UNCOV
257
    return TSDB_CODE_OUT_OF_BUFFER;
×
258
  } else {
259
    return TSDB_CODE_SUCCESS;
938,893,452✔
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) {
107,282✔
342
  int32_t  code = 0;
107,282✔
343
  SConfig* pConf = taosGetCfg();
107,282✔
344
  if (pConf == NULL) {
107,282✔
345
    return TSDB_CODE_INVALID_CFG;
×
346
  }
347

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

353
  int8_t locked = 0;
107,282✔
354

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

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

364
  TAOS_CHECK_GOTO(cfgCreateIter(pConf, &pIter), NULL, _exit);
107,282✔
365

366
  cfgLock(pConf);
107,282✔
367
  locked = 1;
107,282✔
368

369
  while ((pItem = cfgNextIter(pIter)) != NULL) {
22,846,876✔
370
  _start:
22,739,594✔
371
    col = startCol;
22,739,594✔
372

373
    // GRANT_CFG_SKIP;
374
    char name[TSDB_CONFIG_OPTION_LEN + VARSTR_HEADER_SIZE] = {0};
22,739,594✔
375
    if (likePattern && rawStrPatternMatch(pItem->name, likePattern) != TSDB_PATTERN_MATCH) {
22,739,594✔
376
      continue;
265,563✔
377
    }
378
    STR_WITH_MAXSIZE_TO_VARSTR(name, pItem->name, TSDB_CONFIG_OPTION_LEN + VARSTR_HEADER_SIZE);
22,474,031✔
379

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

386
    TAOS_CHECK_GOTO(colDataSetVal(pColInfo, numOfRows, name, false), NULL, _exit);
22,474,031✔
387

388
    char      value[TSDB_CONFIG_PATH_LEN + VARSTR_HEADER_SIZE] = {0};
22,474,031✔
389
    int32_t   valueLen = 0;
22,474,031✔
390
    SDiskCfg* pDiskCfg = NULL;
22,474,031✔
391
    if (strcasecmp(pItem->name, "dataDir") == 0 && exSize > 0) {
22,474,031✔
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,
22,474,031✔
398
                      _exit);
399
    }
400
    varDataSetLen(value, valueLen);
22,474,031✔
401

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

408
    TAOS_CHECK_GOTO(colDataSetVal(pColInfo, numOfRows, value, false), NULL, _exit);
22,474,031✔
409

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

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

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

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

433
    char info[TSDB_CONFIG_INFO_LEN + VARSTR_HEADER_SIZE] = {0};
22,474,031✔
434
    if (strcasecmp(pItem->name, "dataDir") == 0 && pDiskCfg) {
22,474,031✔
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;
22,474,031✔
440
    }
441
    varDataSetLen(info, valueLen);
22,474,031✔
442

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

450
    numOfRows++;
22,474,031✔
451
    if (index > 0 && index <= exSize) {
22,474,031✔
452
      goto _start;
×
453
    }
454
  }
455
  pBlock->info.rows = numOfRows;
107,282✔
456
_exit:
107,282✔
457
  if (locked) cfgUnLock(pConf);
107,282✔
458
  cfgDestroyIter(pIter);
107,282✔
459
  TAOS_RETURN(code);
107,282✔
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