Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
怡红公子⭕
TDengine
提交
5c4654fd
T
TDengine
项目概览
怡红公子⭕
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
5c4654fd
编写于
12月 07, 2019
作者:
J
Jeff Tao
提交者:
GitHub
12月 07, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #876 from taosdata/feature/fangstatic
resolve static check warnings
上级
e83174b3
50c85dfd
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
8 deletion
+14
-8
src/client/src/tscJoinProcess.c
src/client/src/tscJoinProcess.c
+7
-1
src/client/src/tscParseInsert.c
src/client/src/tscParseInsert.c
+7
-7
未找到文件。
src/client/src/tscJoinProcess.c
浏览文件 @
5c4654fd
...
@@ -819,6 +819,7 @@ STSBuf* tsBufCreateFromFile(const char* path, bool autoDelete) {
...
@@ -819,6 +819,7 @@ STSBuf* tsBufCreateFromFile(const char* path, bool autoDelete) {
pTSBuf
->
f
=
fopen
(
pTSBuf
->
path
,
"r+"
);
pTSBuf
->
f
=
fopen
(
pTSBuf
->
path
,
"r+"
);
if
(
pTSBuf
->
f
==
NULL
)
{
if
(
pTSBuf
->
f
==
NULL
)
{
free
(
pTSBuf
);
return
NULL
;
return
NULL
;
}
}
...
@@ -860,7 +861,8 @@ STSBuf* tsBufCreateFromFile(const char* path, bool autoDelete) {
...
@@ -860,7 +861,8 @@ STSBuf* tsBufCreateFromFile(const char* path, bool autoDelete) {
size_t
infoSize
=
sizeof
(
STSVnodeBlockInfo
)
*
pTSBuf
->
numOfVnodes
;
size_t
infoSize
=
sizeof
(
STSVnodeBlockInfo
)
*
pTSBuf
->
numOfVnodes
;
STSVnodeBlockInfo
*
buf
=
(
STSVnodeBlockInfo
*
)
calloc
(
1
,
infoSize
);
STSVnodeBlockInfo
*
buf
=
(
STSVnodeBlockInfo
*
)
calloc
(
1
,
infoSize
);
int64_t
pos
=
ftell
(
pTSBuf
->
f
);
//int64_t pos = ftell(pTSBuf->f); //pos not used
fread
(
buf
,
infoSize
,
1
,
pTSBuf
->
f
);
fread
(
buf
,
infoSize
,
1
,
pTSBuf
->
f
);
// the length value for each vnode is not kept in file, so does not set the length value
// the length value for each vnode is not kept in file, so does not set the length value
...
@@ -1365,6 +1367,10 @@ bool tsBufNextPos(STSBuf* pTSBuf) {
...
@@ -1365,6 +1367,10 @@ bool tsBufNextPos(STSBuf* pTSBuf) {
pCur
->
vnodeIndex
=
-
1
;
pCur
->
vnodeIndex
=
-
1
;
return
false
;
return
false
;
}
}
if
(
pBlockInfo
==
NULL
)
{
return
false
;
}
int32_t
blockIndex
=
pCur
->
order
==
TSQL_SO_ASC
?
0
:
pBlockInfo
->
numOfBlocks
-
1
;
int32_t
blockIndex
=
pCur
->
order
==
TSQL_SO_ASC
?
0
:
pBlockInfo
->
numOfBlocks
-
1
;
tsBufGetBlock
(
pTSBuf
,
pCur
->
vnodeIndex
+
step
,
blockIndex
);
tsBufGetBlock
(
pTSBuf
,
pCur
->
vnodeIndex
+
step
,
blockIndex
);
...
...
src/client/src/tscParseInsert.c
浏览文件 @
5c4654fd
...
@@ -74,8 +74,8 @@ static int32_t tscToDouble(SSQLToken *pToken, double *value, char **endPtr) {
...
@@ -74,8 +74,8 @@ static int32_t tscToDouble(SSQLToken *pToken, double *value, char **endPtr) {
}
}
int
tsParseTime
(
SSQLToken
*
pToken
,
int64_t
*
time
,
char
**
next
,
char
*
error
,
int16_t
timePrec
)
{
int
tsParseTime
(
SSQLToken
*
pToken
,
int64_t
*
time
,
char
**
next
,
char
*
error
,
int16_t
timePrec
)
{
char
*
token
;
//char * token; //fang not used
int
tokenlen
;
//int tokenlen; //fang not used
int32_t
index
=
0
;
int32_t
index
=
0
;
SSQLToken
sToken
;
SSQLToken
sToken
;
int64_t
interval
;
int64_t
interval
;
...
@@ -394,7 +394,7 @@ static int32_t tsCheckTimestamp(STableDataBlocks *pDataBlocks, const char *start
...
@@ -394,7 +394,7 @@ static int32_t tsCheckTimestamp(STableDataBlocks *pDataBlocks, const char *start
int
tsParseOneRowData
(
char
**
str
,
STableDataBlocks
*
pDataBlocks
,
SSchema
schema
[],
SParsedDataColInfo
*
spd
,
char
*
error
,
int
tsParseOneRowData
(
char
**
str
,
STableDataBlocks
*
pDataBlocks
,
SSchema
schema
[],
SParsedDataColInfo
*
spd
,
char
*
error
,
int16_t
timePrec
,
int32_t
*
code
,
char
*
tmpTokenBuf
)
{
int16_t
timePrec
,
int32_t
*
code
,
char
*
tmpTokenBuf
)
{
int32_t
index
=
0
;
int32_t
index
=
0
;
bool
isPrevOptr
;
//bool isPrevOptr; //fang, never used
SSQLToken
sToken
=
{
0
};
SSQLToken
sToken
=
{
0
};
char
*
payload
=
pDataBlocks
->
pData
+
pDataBlocks
->
size
;
char
*
payload
=
pDataBlocks
->
pData
+
pDataBlocks
->
size
;
...
@@ -436,9 +436,9 @@ int tsParseOneRowData(char **str, STableDataBlocks *pDataBlocks, SSchema schema[
...
@@ -436,9 +436,9 @@ int tsParseOneRowData(char **str, STableDataBlocks *pDataBlocks, SSchema schema[
char
delim
=
sToken
.
z
[
0
];
char
delim
=
sToken
.
z
[
0
];
int32_t
cnt
=
0
;
int32_t
cnt
=
0
;
int32_t
j
=
0
;
int32_t
j
=
0
;
for
(
int32_t
i
=
1
;
i
<
sToken
.
n
-
1
;
++
i
)
{
for
(
int32_t
k
=
1
;
k
<
sToken
.
n
-
1
;
++
k
)
{
if
(
sToken
.
z
[
i
]
==
delim
||
sToken
.
z
[
i
]
==
'\\'
)
{
if
(
sToken
.
z
[
k
]
==
delim
||
sToken
.
z
[
k
]
==
'\\'
)
{
if
(
sToken
.
z
[
i
+
1
]
==
delim
)
{
if
(
sToken
.
z
[
k
+
1
]
==
delim
)
{
cnt
++
;
cnt
++
;
continue
;
continue
;
}
}
...
@@ -1239,7 +1239,7 @@ static int tscInsertDataFromFile(SSqlObj *pSql, FILE *fp, char *tmpTokenBuf) {
...
@@ -1239,7 +1239,7 @@ static int tscInsertDataFromFile(SSqlObj *pSql, FILE *fp, char *tmpTokenBuf) {
while
((
readLen
=
getline
(
&
line
,
&
n
,
fp
))
!=
-
1
)
{
while
((
readLen
=
getline
(
&
line
,
&
n
,
fp
))
!=
-
1
)
{
// line[--readLen] = '\0';
// line[--readLen] = '\0';
if
((
'\r'
==
line
[
readLen
-
1
])
||
(
'\n'
==
line
[
readLen
-
1
]))
line
[
--
readLen
]
=
0
;
if
((
'\r'
==
line
[
readLen
-
1
])
||
(
'\n'
==
line
[
readLen
-
1
]))
line
[
--
readLen
]
=
0
;
if
(
readLen
<=
0
)
continue
;
if
(
readLen
==
0
)
continue
;
//fang, <= to ==
char
*
lineptr
=
line
;
char
*
lineptr
=
line
;
strtolower
(
line
,
line
);
strtolower
(
line
,
line
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录