Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
ec7fdb87
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ec7fdb87
编写于
6月 23, 2021
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master' into hotfix/tmq
上级
20abb07e
8e9282ba
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
7 deletion
+10
-7
src/client/src/tscSystem.c
src/client/src/tscSystem.c
+2
-1
src/kit/taosdump/taosdump.c
src/kit/taosdump/taosdump.c
+6
-3
src/os/inc/osDef.h
src/os/inc/osDef.h
+2
-3
未找到文件。
src/client/src/tscSystem.c
浏览文件 @
ec7fdb87
...
...
@@ -45,6 +45,7 @@ int32_t tscNumOfObj = 0; // number of sqlObj in current process.
static
void
*
tscCheckDiskUsageTmr
;
void
*
tscRpcCache
;
// cache to keep rpc obj
int32_t
tscNumOfThreads
=
1
;
// num of rpc threads
char
tscLogFileName
[
12
]
=
"taoslog"
;
static
pthread_mutex_t
rpcObjMutex
;
// mutex to protect open the rpc obj concurrently
static
pthread_once_t
tscinit
=
PTHREAD_ONCE_INIT
;
static
volatile
int
tscInitRes
=
0
;
...
...
@@ -132,7 +133,7 @@ void taos_init_imp(void) {
printf
(
"failed to create log dir:%s
\n
"
,
tsLogDir
);
}
sprintf
(
temp
,
"%s/
taoslog"
,
tsLogDir
);
sprintf
(
temp
,
"%s/
%s"
,
tsLogDir
,
tscLogFileName
);
if
(
taosInitLog
(
temp
,
tsNumOfLogLines
,
10
)
<
0
)
{
printf
(
"failed to open log file in directory:%s
\n
"
,
tsLogDir
);
}
...
...
src/kit/taosdump/taosdump.c
浏览文件 @
ec7fdb87
...
...
@@ -1858,13 +1858,13 @@ int taosDumpTableData(FILE *fp, char *tbname, struct arguments *arguments, TAOS*
converStringToReadable
((
char
*
)
row
[
col
],
length
[
col
],
tbuf
,
COMMAND_SIZE
);
//pstr = stpcpy(pstr, tbuf);
//*(pstr++) = '\'';
pstr
+=
sprintf
(
pstr
+
curr_sqlstr_len
,
"
\'
%s
\'
"
,
tbuf
);
curr_sqlstr_len
+=
sprintf
(
pstr
+
curr_sqlstr_len
,
"
\'
%s
\'
"
,
tbuf
);
break
;
}
case
TSDB_DATA_TYPE_NCHAR
:
{
char
tbuf
[
COMMAND_SIZE
]
=
{
0
};
convertNCharToReadable
((
char
*
)
row
[
col
],
length
[
col
],
tbuf
,
COMMAND_SIZE
);
pstr
+=
sprintf
(
pstr
+
curr_sqlstr_len
,
"
\'
%s
\'
"
,
tbuf
);
curr_sqlstr_len
+=
sprintf
(
pstr
+
curr_sqlstr_len
,
"
\'
%s
\'
"
,
tbuf
);
break
;
}
case
TSDB_DATA_TYPE_TIMESTAMP
:
...
...
@@ -1897,7 +1897,8 @@ int taosDumpTableData(FILE *fp, char *tbname, struct arguments *arguments, TAOS*
total_sqlstr_len
+=
curr_sqlstr_len
;
if
((
count
>=
arguments
->
data_batch
)
||
(
sql_buf_len
-
total_sqlstr_len
<
TSDB_MAX_BYTES_PER_ROW
))
{
if
((
count
>=
arguments
->
data_batch
)
||
(
sql_buf_len
-
total_sqlstr_len
<
TSDB_MAX_BYTES_PER_ROW
))
{
fprintf
(
fp
,
";
\n
"
);
count
=
0
;
}
//else {
...
...
@@ -1905,6 +1906,8 @@ int taosDumpTableData(FILE *fp, char *tbname, struct arguments *arguments, TAOS*
//}
}
printf
(
"total_sqlstr_len: %d
\n
"
,
total_sqlstr_len
);
fprintf
(
fp
,
"
\n
"
);
atomic_add_fetch_64
(
&
totalDumpOutRows
,
totalRows
);
...
...
src/os/inc/osDef.h
浏览文件 @
ec7fdb87
...
...
@@ -40,10 +40,9 @@ extern "C" {
#define ASSERT(x)
#endif
#ifdef UNUSED
#undefine UNUSED
#endif
#ifndef UNUSED
#define UNUSED(x) ((void)(x))
#endif
#ifdef UNUSED_FUNC
#undefine UNUSED_FUNC
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录