Skip to content

Commit

Permalink
fix: benchUtil.c extern variant not declare
Browse files Browse the repository at this point in the history
  • Loading branch information
DuanKuanJun committed Jan 19, 2025
1 parent c80a203 commit f13b50b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions inc/bench.h
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,7 @@ extern bool g_fail;
extern char configDir[];
extern tools_cJSON * root;
extern uint64_t g_memoryUsage;
extern int32_t g_majorVersionOfClient;

#define min(a, b) (((a) < (b)) ? (a) : (b))
#define BARRAY_GET_ELEM(array, index) \
Expand Down
2 changes: 1 addition & 1 deletion src/benchMain.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ tools_cJSON* root;
#define CLIENT_INFO_LEN 20
static char g_client_info[CLIENT_INFO_LEN] = {0};

int g_majorVersionOfClient = 0;
int32_t g_majorVersionOfClient = 0;
// set flag if command passed, see ARG_OPT_ ???
uint64_t g_argFlag = 0;

Expand Down
6 changes: 3 additions & 3 deletions src/benchUtil.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ int32_t replaceChildTblName(char *inSql, char *outSql, int tblIndex) {
char mark[32] = "xxxx";
char *pos = strstr(inSql, mark);
if (0 == pos) {
errorPrint("sql format error, super table query not found child table replace mark string '%s'", mark);
errorPrint("sql format error, sql not found mark string '%s'", mark);
return -1;
}

Expand All @@ -256,7 +256,7 @@ int32_t replaceChildTblName(char *inSql, char *outSql, int tblIndex) {

tstrncpy(outSql, inSql, pos - inSql + 1);
snprintf(outSql + strlen(outSql), TSDB_MAX_ALLOWED_SQL_LEN -1,
"%s%s", subTblName, pos + strlen(sourceString));
"%s%s", subTblName, pos + strlen(mark));
return 0;
}

Expand Down Expand Up @@ -846,7 +846,7 @@ int64_t fetchResult(TAOS_RES *res, char * filePath) {
if (toFile) {
if (totalLen >= (FETCH_BUFFER_SIZE - HEAD_BUFF_LEN * 2)) {
// buff is full
appendResultBufToFile(databuf, pThreadInfo->filePath);
appendResultBufToFile(databuf, filePath);
totalLen = 0;
memset(databuf, 0, FETCH_BUFFER_SIZE);
}
Expand Down

0 comments on commit f13b50b

Please sign in to comment.