未验证 提交 33704f49 编写于 作者: J Jason-Jia 提交者: GitHub

Merge branch 'develop' into jiachenyang

......@@ -7,6 +7,7 @@
[![TDengine](TDenginelogo.png)](https://www.taosdata.com)
简体中文 | [English](./README.md)
很多职位正在热招中,请看[这里](https://www.taosdata.com/cn/careers/)
# TDengine 简介
......
......@@ -7,6 +7,7 @@
[![TDengine](TDenginelogo.png)](https://www.taosdata.com)
English | [简体中文](./README-CN.md)
We are hiring, check [here](https://www.taosdata.com/en/careers/)
# What is TDengine?
......
......@@ -6717,7 +6717,7 @@ static int generateSampleFromRand(
case TSDB_DATA_TYPE_NCHAR:
dataLen = (columns)?columns[c].dataLen:g_args.binwidth;
rand_string(data, dataLen);
rand_string(data, dataLen - 1);
pos += sprintf(buff + pos, "%s,", data);
break;
......
......@@ -346,7 +346,7 @@ static int64_t taosDumpTableData(FILE *fp, char *tbName,
TAOS* taos, char* dbName,
int precision,
char *jsonAvroSchema);
static int taosCheckParam(struct arguments *arguments);
static int checkParam();
static void taosFreeDbInfos();
struct arguments g_args = {
......@@ -2178,17 +2178,23 @@ static int64_t taosDumpTableData(FILE *fp, char *tbName,
return totalRows;
}
static int taosCheckParam(struct arguments *arguments) {
static int checkParam() {
if (g_args.all_databases && g_args.databases) {
fprintf(stderr, "conflict option --all-databases and --databases\n");
errorPrint("%s", "conflict option --all-databases and --databases\n");
return -1;
}
if (g_args.start_time > g_args.end_time) {
fprintf(stderr, "start time is larger than end time\n");
errorPrint("%s", "start time is larger than end time\n");
return -1;
}
if (g_args.arg_list_len == 0) {
if ((!g_args.all_databases) && (!g_args.databases) && (!g_args.isDumpIn)) {
errorPrint("%s", "taosdump requires parameters\n");
return -1;
}
}
/*
if (g_args.isDumpIn && (strcmp(g_args.outpath, DEFAULT_DUMP_FILE) != 0)) {
fprintf(stderr, "duplicate parameter input and output file path\n");
......@@ -2768,7 +2774,7 @@ int main(int argc, char *argv[]) {
}
}
printf("==============================\n");
if (taosCheckParam(&g_args) < 0) {
if (checkParam(&g_args) < 0) {
exit(EXIT_FAILURE);
}
......
此差异已折叠。
......@@ -7,6 +7,7 @@ LFLAGS = '-Wl,-rpath,/usr/local/taos/driver/' -ltaos -lpthread -lm -lrt
CFLAGS = -O3 -g -Wall -Wno-deprecated -fPIC -Wno-unused-result -Wconversion \
-Wno-char-subscripts -D_REENTRANT -Wno-format -D_REENTRANT -DLINUX \
-Wno-unused-function -D_M_X64 -I/usr/local/taos/include -std=gnu99 \
-I../../../deps/cJson/inc
all: $(TARGET)
......@@ -29,4 +30,6 @@ clean:
rm $(ROOT)subscribe
rm $(ROOT)apitest
......@@ -7,9 +7,11 @@ LFLAGS = '-Wl,-rpath,/usr/local/taos/driver/' -ltaos -lpthread -lm -lrt
CFLAGS = -O3 -g -Wall -Wno-deprecated -fPIC -Wno-unused-result -Wconversion \
-Wno-char-subscripts -D_REENTRANT -Wno-format -D_REENTRANT -DLINUX \
-Wno-unused-function -D_M_X64 -I/usr/local/taos/include -std=gnu99 \
-I../../../deps/cJson/inc\
-I../../../src/os/inc/ -I../../../src/inc -I../../../src/util/inc \
-I../../../src/common/inc
-I../../../src/common/inc -I../../../deps/cJson/inc
all: $(TARGET)
......@@ -18,11 +20,19 @@ exe:
gcc $(CFLAGS) ./stmtBatchTest.c -o $(ROOT)stmtBatchTest $(LFLAGS)
gcc $(CFLAGS) ./stmtTest.c -o $(ROOT)stmtTest $(LFLAGS)
gcc $(CFLAGS) ./stmt_function.c -o $(ROOT)stmt_function $(LFLAGS)
gcc $(CFLAGS) ./clientcfgtest.c -o $(ROOT)clientcfgtest $(LFLAGS)
gcc $(CFLAGS) ./openTSDBTest.c -o $(ROOT)openTSDBTest $(LFLAGS)
clean:
rm $(ROOT)batchprepare
rm $(ROOT)stmtBatchTest
rm $(ROOT)stmtTest
rm $(ROOT)stmt_function
rm $(ROOT)clientcfgtest
rm $(ROOT)openTSDBTest
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册