Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
4562a4d4
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
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看板
未验证
提交
4562a4d4
编写于
10月 28, 2021
作者:
Y
Yiqing Liu
提交者:
GitHub
10月 28, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #8462 from taosdata/windows_compile
fix Windows compile
上级
e9dabcbc
b1400459
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
56 addition
and
50 deletion
+56
-50
Jenkinsfile
Jenkinsfile
+30
-30
src/client/inc/tscParseLine.h
src/client/inc/tscParseLine.h
+1
-1
src/client/src/tscParseOpenTSDB.c
src/client/src/tscParseOpenTSDB.c
+3
-3
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+2
-2
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+19
-13
src/vnode/src/vnodeWrite.c
src/vnode/src/vnodeWrite.c
+1
-1
未找到文件。
Jenkinsfile
浏览文件 @
4562a4d4
...
...
@@ -179,9 +179,9 @@ def pre_test_win(){
git clean -dfx
mkdir debug
cd debug
call "C:\\Program Files (x86)\\Microsoft Visual Studio
14.0\\VC
\\vcvarsall.bat" amd64
call "C:\\Program Files (x86)\\Microsoft Visual Studio
\\2017\\Community\\VC\\Auxiliary\\Build
\\vcvarsall.bat" amd64
cmake ../ -G "NMake Makefiles"
nmake || exit 8
set CL=/MP nmake
nmake || exit 8
nmake install || exit 8
xcopy /e/y/i/f C:\\workspace\\TDinternal\\debug\\build\\lib\\taos.dll C:\\Windows\\System32 || exit 8
cd C:\\workspace\\TDinternal\\community\\src\\connector\\python
...
...
@@ -470,35 +470,35 @@ pipeline {
}
}
//
stage('build'){
//
agent{label " wintest "}
//
steps {
//
pre_test()
//
script{
//
while(win_stop == 0){
//
sleep(1)
//
}
//
}
//
}
//
}
//
stage('test'){
//
agent{label "win"}
//
steps{
stage
(
'build'
){
agent
{
label
" wintest "
}
steps
{
pre_test
()
script
{
while
(
win_stop
==
0
){
sleep
(
1
)
}
}
}
}
stage
(
'test'
){
agent
{
label
"win"
}
steps
{
//
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
//
pre_test_win()
//
timeout(time: 20, unit: 'MINUTES'){
//
bat'''
//
cd C:\\workspace\\TDinternal\\community\\tests\\pytest
// .\\test-all.bat W
intest
//
'''
//
}
//
}
//
script{
//
win_stop=1
//
}
//
}
//
}
catchError
(
buildResult:
'FAILURE'
,
stageResult:
'FAILURE'
)
{
pre_test_win
()
timeout
(
time:
20
,
unit:
'MINUTES'
){
bat
'''
cd C:\\workspace\\TDinternal\\community\\tests\\pytest
.\\test-all.bat w
intest
'''
}
}
script
{
win_stop
=
1
}
}
}
}
...
...
src/client/inc/tscParseLine.h
浏览文件 @
4562a4d4
...
...
@@ -64,7 +64,7 @@ typedef struct {
SMLTimeStampType
tsType
;
SHashObj
*
smlDataToSchema
;
int
64
_t
affectedRows
;
int
32
_t
affectedRows
;
}
SSmlLinesInfo
;
void
addEscapeCharToString
(
char
*
str
,
int32_t
len
);
...
...
src/client/src/tscParseOpenTSDB.c
浏览文件 @
4562a4d4
...
...
@@ -509,7 +509,7 @@ static int32_t parseMetricFromJSON(cJSON *root, TAOS_SML_DATA_POINT* pSml, SSmlL
tstrncpy
(
pSml
->
stableName
,
metric
->
valuestring
,
stableLen
+
1
);
strntolower_s
(
pSml
->
stableName
,
pSml
->
stableName
,
(
int32_t
)
stableLen
);
addEscapeCharToString
(
pSml
->
stableName
,
stableLen
);
addEscapeCharToString
(
pSml
->
stableName
,
(
int32_t
)
stableLen
);
return
TSDB_CODE_SUCCESS
;
...
...
@@ -903,7 +903,7 @@ static int32_t parseTagsFromJSON(cJSON *root, TAOS_SML_KV **pKVs, int *num_kvs,
*
childTableName
=
tcalloc
(
idLen
+
TS_ESCAPE_CHAR_SIZE
+
1
,
sizeof
(
char
));
memcpy
(
*
childTableName
,
id
->
valuestring
,
idLen
);
strntolower_s
(
*
childTableName
,
*
childTableName
,
(
int32_t
)
idLen
);
addEscapeCharToString
(
*
childTableName
,
idLen
);
addEscapeCharToString
(
*
childTableName
,
(
int32_t
)
idLen
);
//check duplicate IDs
cJSON_DeleteItemFromObject
(
tags
,
"ID"
);
...
...
@@ -940,7 +940,7 @@ static int32_t parseTagsFromJSON(cJSON *root, TAOS_SML_KV **pKVs, int *num_kvs,
pkv
->
key
=
tcalloc
(
keyLen
+
TS_ESCAPE_CHAR_SIZE
+
1
,
sizeof
(
char
));
strncpy
(
pkv
->
key
,
tag
->
string
,
keyLen
);
strntolower_s
(
pkv
->
key
,
pkv
->
key
,
(
int32_t
)
keyLen
);
addEscapeCharToString
(
pkv
->
key
,
keyLen
);
addEscapeCharToString
(
pkv
->
key
,
(
int32_t
)
keyLen
);
//value
ret
=
parseValueFromJSON
(
tag
,
pkv
,
info
);
if
(
ret
!=
TSDB_CODE_SUCCESS
)
{
...
...
src/client/src/tscSQLParser.c
浏览文件 @
4562a4d4
...
...
@@ -5790,7 +5790,7 @@ int32_t validateOrderbyNode(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SSqlNode* pSq
bool
udf
=
false
;
if
(
pQueryInfo
->
pUdfInfo
&&
taosArrayGetSize
(
pQueryInfo
->
pUdfInfo
)
>
0
)
{
int32_t
usize
=
taosArrayGetSize
(
pQueryInfo
->
pUdfInfo
);
int32_t
usize
=
(
int32_t
)
taosArrayGetSize
(
pQueryInfo
->
pUdfInfo
);
for
(
int32_t
i
=
0
;
i
<
usize
;
++
i
)
{
SUdfInfo
*
pUdfInfo
=
taosArrayGet
(
pQueryInfo
->
pUdfInfo
,
i
);
...
...
@@ -8644,7 +8644,7 @@ int32_t loadAllTableMeta(SSqlObj* pSql, struct SSqlInfo* pInfo) {
for
(
int32_t
j
=
0
;
j
<
usize
;
++
j
)
{
SUdfInfo
*
pUdfInfo
=
taosArrayGet
(
pQueryInfo
->
pUdfInfo
,
j
);
int32_t
len
=
strlen
(
pUdfInfo
->
name
);
int32_t
len
=
(
int32_t
)
strlen
(
pUdfInfo
->
name
);
if
(
len
==
t
->
n
&&
strncasecmp
(
info
.
name
,
pUdfInfo
->
name
,
t
->
n
)
==
0
)
{
exist
=
1
;
break
;
...
...
src/kit/taosdemo/taosdemo.c
浏览文件 @
4562a4d4
...
...
@@ -3554,7 +3554,7 @@ static int postProceSql(char *host, uint16_t port,
do
{
#ifdef WINDOWS
bytes
=
recv
(
pThreadInfo
->
sockfd
s
,
response_buf
+
received
,
resp_len
-
received
,
0
);
bytes
=
recv
(
pThreadInfo
->
sockfd
,
response_buf
+
received
,
resp_len
-
received
,
0
);
#else
bytes
=
read
(
pThreadInfo
->
sockfd
,
response_buf
+
received
,
resp_len
-
received
);
#endif
...
...
@@ -9868,14 +9868,16 @@ static void* syncWriteInterlaceSml(threadInfo *pThreadInfo, uint32_t interlaceRo
batchPerTblTimes
=
1
;
}
char
*
smlHead
[
pThreadInfo
->
ntables
];
char
**
smlHeadList
=
calloc
(
pThreadInfo
->
ntables
,
sizeof
(
char
*
));
assert
(
smlHeadList
);
for
(
int
t
=
0
;
t
<
pThreadInfo
->
ntables
;
t
++
)
{
smlHead
[
t
]
=
(
char
*
)
calloc
(
HEAD_BUFF_LEN
,
1
);
if
(
NULL
==
smlHead
[
t
])
{
char
*
smlHead
=
*
((
char
**
)
smlHeadList
+
t
*
sizeof
(
char
*
));
smlHead
=
(
char
*
)
calloc
(
HEAD_BUFF_LEN
,
1
);
if
(
NULL
==
smlHead
)
{
errorPrint2
(
"calloc failed! size:%d
\n
"
,
HEAD_BUFF_LEN
);
exit
(
EXIT_FAILURE
);
}
generateSmlHead
(
smlHead
[
t
]
,
stbInfo
,
pThreadInfo
,
t
);
generateSmlHead
(
smlHead
,
stbInfo
,
pThreadInfo
,
t
);
}
...
...
@@ -9925,7 +9927,7 @@ static void* syncWriteInterlaceSml(threadInfo *pThreadInfo, uint32_t interlaceRo
errorPrint2
(
"Failed to alloc %d bytes, reason:%s
\n
"
,
BUFFER_SIZE
,
strerror
(
errno
));
}
generateSmlTail
(
pThreadInfo
->
lines
[
j
],
smlHead
[
i
]
,
stbInfo
,
pThreadInfo
,
timestamp
);
generateSmlTail
(
pThreadInfo
->
lines
[
j
],
*
((
char
**
)
smlHeadList
+
i
*
sizeof
(
char
*
))
,
stbInfo
,
pThreadInfo
,
timestamp
);
timestamp
+=
timeStampStep
;
}
tableSeq
++
;
...
...
@@ -10044,8 +10046,9 @@ static void* syncWriteInterlaceSml(threadInfo *pThreadInfo, uint32_t interlaceRo
free_of_interlace:
tmfree
(
pThreadInfo
->
lines
);
for
(
int
index
=
0
;
index
<
pThreadInfo
->
ntables
;
index
++
)
{
free
(
smlHead
[
index
]
);
tmfree
(
*
(
smlHeadList
+
index
*
(
sizeof
(
char
*
)))
);
}
tmfree
(
smlHeadList
);
printStatPerThread
(
pThreadInfo
);
return
NULL
;
}
...
...
@@ -10469,14 +10472,16 @@ static void* syncWriteProgressiveSml(threadInfo *pThreadInfo) {
pThreadInfo
->
samplePos
=
0
;
char
*
smlHead
[
pThreadInfo
->
ntables
];
char
*
smlHeadList
=
calloc
(
pThreadInfo
->
ntables
,
sizeof
(
char
*
));
assert
(
smlHeadList
);
for
(
int
t
=
0
;
t
<
pThreadInfo
->
ntables
;
t
++
)
{
smlHead
[
t
]
=
(
char
*
)
calloc
(
HEAD_BUFF_LEN
,
1
);
if
(
NULL
==
smlHead
[
t
])
{
char
*
smlHead
=
*
((
char
**
)
smlHeadList
+
t
*
sizeof
(
char
*
));
smlHead
=
(
char
*
)
calloc
(
HEAD_BUFF_LEN
,
1
);
if
(
NULL
==
smlHead
)
{
errorPrint2
(
"calloc failed! size:%d
\n
"
,
HEAD_BUFF_LEN
);
exit
(
EXIT_FAILURE
);
}
generateSmlHead
(
smlHead
[
t
]
,
stbInfo
,
pThreadInfo
,
t
);
generateSmlHead
(
smlHead
,
stbInfo
,
pThreadInfo
,
t
);
}
int
currentPercent
=
0
;
...
...
@@ -10503,7 +10508,7 @@ static void* syncWriteProgressiveSml(threadInfo *pThreadInfo) {
errorPrint2
(
"Failed to alloc %d bytes, reason:%s
\n
"
,
BUFFER_SIZE
,
strerror
(
errno
));
}
generateSmlTail
(
pThreadInfo
->
lines
[
k
],
smlHead
[
i
]
,
stbInfo
,
pThreadInfo
,
timestamp
);
generateSmlTail
(
pThreadInfo
->
lines
[
k
],
*
((
char
**
)
smlHeadList
+
i
*
sizeof
(
char
*
))
,
stbInfo
,
pThreadInfo
,
timestamp
);
timestamp
+=
timeStampStep
;
j
++
;
if
(
j
==
insertRows
)
{
...
...
@@ -10559,8 +10564,9 @@ static void* syncWriteProgressiveSml(threadInfo *pThreadInfo) {
}
tmfree
(
pThreadInfo
->
lines
);
for
(
int
index
=
0
;
index
<
pThreadInfo
->
ntables
;
index
++
)
{
free
(
smlHead
[
index
]
);
free
(
*
((
char
**
)
smlHeadList
+
index
*
sizeof
(
char
*
))
);
}
tmfree
(
smlHeadList
);
return
NULL
;
}
...
...
src/vnode/src/vnodeWrite.c
浏览文件 @
4562a4d4
...
...
@@ -170,7 +170,7 @@ static int32_t vnodeProcessSubmitMsg(SVnodeObj *pVnode, void *pCont, SRspRet *pR
static
int32_t
vnodeCheckWal
(
SVnodeObj
*
pVnode
)
{
if
(
pVnode
->
isCommiting
==
0
)
{
return
tsdbCheckWal
(
pVnode
->
tsdb
,
walGetFSize
(
pVnode
->
wal
)
>>
20
);
return
tsdbCheckWal
(
pVnode
->
tsdb
,
(
uint32_t
)(
walGetFSize
(
pVnode
->
wal
)
>>
20
)
);
}
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录