未验证 提交 c8377631 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #2366 from taosdata/hotfix/test

[add init]
...@@ -425,6 +425,7 @@ int taosGetTableRecordInfo(char *table, STableRecordInfo *pTableRecordInfo) { ...@@ -425,6 +425,7 @@ int taosGetTableRecordInfo(char *table, STableRecordInfo *pTableRecordInfo) {
int taosDumpOut(SDumpArguments *arguments) { int taosDumpOut(SDumpArguments *arguments) {
TAOS_ROW row; TAOS_ROW row;
TAOS_RES* result = NULL;
char *temp = NULL; char *temp = NULL;
FILE *fp = NULL; FILE *fp = NULL;
int count = 0; int count = 0;
...@@ -464,7 +465,7 @@ int taosDumpOut(SDumpArguments *arguments) { ...@@ -464,7 +465,7 @@ int taosDumpOut(SDumpArguments *arguments) {
taosDumpCharset(fp); taosDumpCharset(fp);
sprintf(command, "show databases"); sprintf(command, "show databases");
TAOS_RES* result = taos_query(taos, command); result = taos_query(taos, command);
int32_t code = taos_errno(result); int32_t code = taos_errno(result);
if (code != 0) { if (code != 0) {
fprintf(stderr, "failed to run command: %s, reason: %s\n", command, taos_errstr(result)); fprintf(stderr, "failed to run command: %s, reason: %s\n", command, taos_errstr(result));
...@@ -571,7 +572,7 @@ int taosDumpOut(SDumpArguments *arguments) { ...@@ -571,7 +572,7 @@ int taosDumpOut(SDumpArguments *arguments) {
fclose(fp); fclose(fp);
taos_close(taos); taos_close(taos);
taos_free_result(result); taos_free_result(result);
free(temp); tfree(temp);
taosFreeDbInfos(); taosFreeDbInfos();
return 0; return 0;
...@@ -579,7 +580,7 @@ _exit_failure: ...@@ -579,7 +580,7 @@ _exit_failure:
fclose(fp); fclose(fp);
taos_close(taos); taos_close(taos);
taos_free_result(result); taos_free_result(result);
free(temp); tfree(temp);
taosFreeDbInfos(); taosFreeDbInfos();
return -1; return -1;
} }
......
...@@ -36,6 +36,7 @@ uint32_t taosRand(void) ...@@ -36,6 +36,7 @@ uint32_t taosRand(void)
#else #else
uint32_t taosRand(void) uint32_t taosRand(void)
{ {
/*
int fd; int fd;
int seed; int seed;
...@@ -51,6 +52,8 @@ uint32_t taosRand(void) ...@@ -51,6 +52,8 @@ uint32_t taosRand(void)
} }
return (uint32_t)seed; return (uint32_t)seed;
*/
return rand();
} }
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册