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

Merge branch 'develop' into jiachenyang

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