Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
a18e287c
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
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看板
提交
a18e287c
编写于
8月 08, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-1057
上级
d593a905
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
48 addition
and
12 deletion
+48
-12
deps/iconv/relocatable.c
deps/iconv/relocatable.c
+1
-1
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+1
-0
src/kit/shell/src/shellDarwin.c
src/kit/shell/src/shellDarwin.c
+1
-1
src/kit/shell/src/shellEngine.c
src/kit/shell/src/shellEngine.c
+4
-5
src/kit/shell/src/shellWindows.c
src/kit/shell/src/shellWindows.c
+7
-3
src/kit/taosdemo/CMakeLists.txt
src/kit/taosdemo/CMakeLists.txt
+3
-1
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+1
-1
src/os/inc/osWindows.h
src/os/inc/osWindows.h
+1
-0
src/os/src/windows/w64Time.c
src/os/src/windows/w64Time.c
+12
-0
src/util/inc/tscompression.h
src/util/inc/tscompression.h
+16
-0
src/util/src/tcompression.c
src/util/src/tcompression.c
+1
-0
未找到文件。
deps/iconv/relocatable.c
浏览文件 @
a18e287c
...
...
@@ -360,7 +360,7 @@ find_shared_library_fullname ()
ungetc
(
c
,
fp
);
shared_library_fullname
=
NULL
;
size
=
0
;
len
=
getline
(
&
shared_library_fullname
,
&
size
,
fp
);
len
=
taosGetline
(
&
shared_library_fullname
,
&
size
,
fp
);
if
(
len
>=
0
)
{
/* Success: filled shared_library_fullname. */
...
...
src/client/src/tscUtil.c
浏览文件 @
a18e287c
...
...
@@ -1931,6 +1931,7 @@ int16_t tscGetJoinTagColIdByUid(STagCond* pTagCond, uint64_t uid) {
return
pTagCond
->
joinInfo
.
right
.
tagColId
;
}
else
{
assert
(
0
);
return
-
1
;
}
}
...
...
src/kit/shell/src/shellDarwin.c
浏览文件 @
a18e287c
...
...
@@ -62,7 +62,7 @@ void printHelp() {
exit
(
EXIT_SUCCESS
);
}
void
shellParseArgument
(
int
argc
,
char
*
argv
[],
struct
a
rguments
*
arguments
)
{
void
shellParseArgument
(
int
argc
,
char
*
argv
[],
SShellA
rguments
*
arguments
)
{
wordexp_t
full_path
;
for
(
int
i
=
1
;
i
<
argc
;
i
++
)
{
// for host
...
...
src/kit/shell/src/shellEngine.c
浏览文件 @
a18e287c
...
...
@@ -577,7 +577,7 @@ static int verticalPrintResult(TAOS_RES* tres) {
int
maxColNameLen
=
0
;
for
(
int
col
=
0
;
col
<
num_fields
;
col
++
)
{
int
len
=
strlen
(
fields
[
col
].
name
);
int
len
=
(
int
)
strlen
(
fields
[
col
].
name
);
if
(
len
>
maxColNameLen
)
{
maxColNameLen
=
len
;
}
...
...
@@ -604,9 +604,8 @@ static int verticalPrintResult(TAOS_RES* tres) {
return
numOfRows
;
}
static
int
calcColWidth
(
TAOS_FIELD
*
field
,
int
precision
)
{
int
width
=
strlen
(
field
->
name
);
int
width
=
(
int
)
strlen
(
field
->
name
);
switch
(
field
->
type
)
{
case
TSDB_DATA_TYPE_BOOL
:
...
...
@@ -741,7 +740,7 @@ void read_history() {
return
;
}
while
((
read_size
=
g
etline
(
&
line
,
&
line_size
,
f
))
!=
-
1
)
{
while
((
read_size
=
taosG
etline
(
&
line
,
&
line_size
,
f
))
!=
-
1
)
{
line
[
read_size
-
1
]
=
'\0'
;
history
.
hist
[
history
.
hend
]
=
strdup
(
line
);
...
...
@@ -822,7 +821,7 @@ void source_file(TAOS *con, char *fptr) {
return
;
}
while
((
read_len
=
g
etline
(
&
line
,
&
line_len
,
f
))
!=
-
1
)
{
while
((
read_len
=
taosG
etline
(
&
line
,
&
line_len
,
f
))
!=
-
1
)
{
if
(
read_len
>=
tsMaxSQLStringLen
)
continue
;
line
[
--
read_len
]
=
'\0'
;
...
...
src/kit/shell/src/shellWindows.c
浏览文件 @
a18e287c
...
...
@@ -9,12 +9,16 @@
*
* ****************************************************************/
#include "shell.h"
#include <assert.h>
#include <regex.h>
#include <stdio.h>
#include "os.h"
#include "shell.h"
#include "taos.h"
#include "shellCommand.h"
extern
char
configDir
[];
void
printHelp
()
{
char
indent
[
10
]
=
" "
;
printf
(
"taos shell is used to test the TDEngine database
\n
"
);
...
...
@@ -43,7 +47,7 @@ void printHelp() {
exit
(
EXIT_SUCCESS
);
}
void
shellParseArgument
(
int
argc
,
char
*
argv
[],
struct
a
rguments
*
arguments
)
{
void
shellParseArgument
(
int
argc
,
char
*
argv
[],
SShellA
rguments
*
arguments
)
{
for
(
int
i
=
1
;
i
<
argc
;
i
++
)
{
// for host
if
(
strcmp
(
argv
[
i
],
"-h"
)
==
0
)
{
...
...
@@ -81,7 +85,7 @@ void shellParseArgument(int argc, char *argv[], struct arguments *arguments) {
fprintf
(
stderr
,
"config file path: %s overflow max len %d
\n
"
,
argv
[
i
],
TSDB_FILENAME_LEN
-
1
);
exit
(
EXIT_FAILURE
);
}
strcpy
(
configDir
,
argv
[
i
]);
strcpy
(
configDir
,
argv
[
++
i
]);
}
else
{
fprintf
(
stderr
,
"Option -c requires an argument
\n
"
);
exit
(
EXIT_FAILURE
);
...
...
src/kit/taosdemo/CMakeLists.txt
浏览文件 @
a18e287c
...
...
@@ -13,5 +13,7 @@ IF (TD_LINUX)
# ELSE ()
# TARGET_LINK_LIBRARIES(taosdemo taos_static)
# ENDIF ()
ELSEIF
(
TD_WINDOWS
)
AUX_SOURCE_DIRECTORY
(
. SRC
)
ADD_EXECUTABLE
(
taosdemo
${
SRC
}
)
ENDIF
()
src/kit/taosdemo/taosdemo.c
浏览文件 @
a18e287c
/*
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
...
...
src/os/inc/osWindows.h
浏览文件 @
a18e287c
...
...
@@ -145,6 +145,7 @@ int flock(int fd, int option);
int
fsync
(
int
filedes
);
char
*
strndup
(
const
char
*
s
,
size_t
n
);
char
*
dirname
(
char
*
pszPathname
);
int
gettimeofday
(
struct
timeval
*
ptv
,
void
*
pTimeZone
);
// for access function in io.h
#define F_OK 00 //Existence only
...
...
src/os/src/windows/w64Time.c
浏览文件 @
a18e287c
...
...
@@ -16,6 +16,18 @@
#include <time.h>
#include <winsock2.h>
int
gettimeofday
(
struct
timeval
*
tv
,
struct
timezone
*
tz
)
{
time_t
t
;
t
=
time
(
NULL
);
SYSTEMTIME
st
;
GetLocalTime
(
&
st
);
tv
->
tv_sec
=
(
long
)
t
;
tv
->
tv_usec
=
st
.
wMilliseconds
*
1000
;
return
0
;
}
struct
tm
*
localtime_r
(
const
time_t
*
timep
,
struct
tm
*
result
)
{
localtime_s
(
result
,
timep
);
return
result
;
...
...
src/util/inc/tscompression.h
浏览文件 @
a18e287c
...
...
@@ -56,6 +56,7 @@ static FORCE_INLINE int tsCompressTinyint(const char *const input, int inputSize
return
tsCompressStringImp
(
buffer
,
len
,
output
,
outputSize
);
}
else
{
assert
(
0
);
return
-
1
;
}
}
...
...
@@ -68,6 +69,7 @@ static FORCE_INLINE int tsDecompressTinyint(const char *const input, int compres
return
tsDecompressINTImp
(
buffer
,
nelements
,
output
,
TSDB_DATA_TYPE_TINYINT
);
}
else
{
assert
(
0
);
return
-
1
;
}
}
...
...
@@ -80,6 +82,7 @@ static FORCE_INLINE int tsCompressSmallint(const char *const input, int inputSiz
return
tsCompressStringImp
(
buffer
,
len
,
output
,
outputSize
);
}
else
{
assert
(
0
);
return
-
1
;
}
}
...
...
@@ -92,6 +95,7 @@ static FORCE_INLINE int tsDecompressSmallint(const char *const input, int compre
return
tsDecompressINTImp
(
buffer
,
nelements
,
output
,
TSDB_DATA_TYPE_SMALLINT
);
}
else
{
assert
(
0
);
return
-
1
;
}
}
...
...
@@ -104,6 +108,7 @@ static FORCE_INLINE int tsCompressInt(const char *const input, int inputSize, co
return
tsCompressStringImp
(
buffer
,
len
,
output
,
outputSize
);
}
else
{
assert
(
0
);
return
-
1
;
}
}
...
...
@@ -116,6 +121,7 @@ static FORCE_INLINE int tsDecompressInt(const char *const input, int compressedS
return
tsDecompressINTImp
(
buffer
,
nelements
,
output
,
TSDB_DATA_TYPE_INT
);
}
else
{
assert
(
0
);
return
-
1
;
}
}
...
...
@@ -128,6 +134,7 @@ static FORCE_INLINE int tsCompressBigint(const char *const input, int inputSize,
return
tsCompressStringImp
(
buffer
,
len
,
output
,
outputSize
);
}
else
{
assert
(
0
);
return
-
1
;
}
}
...
...
@@ -140,6 +147,7 @@ static FORCE_INLINE int tsDecompressBigint(const char *const input, int compress
return
tsDecompressINTImp
(
buffer
,
nelements
,
output
,
TSDB_DATA_TYPE_BIGINT
);
}
else
{
assert
(
0
);
return
-
1
;
}
}
...
...
@@ -152,6 +160,7 @@ static FORCE_INLINE int tsCompressBool(const char *const input, int inputSize, c
return
tsCompressStringImp
(
buffer
,
len
,
output
,
outputSize
);
}
else
{
assert
(
0
);
return
-
1
;
}
}
...
...
@@ -164,6 +173,7 @@ static FORCE_INLINE int tsDecompressBool(const char *const input, int compressed
return
tsDecompressBoolImp
(
buffer
,
nelements
,
output
);
}
else
{
assert
(
0
);
return
-
1
;
}
}
...
...
@@ -186,6 +196,7 @@ static FORCE_INLINE int tsCompressFloat(const char *const input, int inputSize,
return
tsCompressStringImp
(
buffer
,
len
,
output
,
outputSize
);
}
else
{
assert
(
0
);
return
-
1
;
}
}
...
...
@@ -198,6 +209,7 @@ static FORCE_INLINE int tsDecompressFloat(const char *const input, int compresse
return
tsDecompressFloatImp
(
buffer
,
nelements
,
output
);
}
else
{
assert
(
0
);
return
-
1
;
}
}
...
...
@@ -210,6 +222,7 @@ static FORCE_INLINE int tsCompressDouble(const char *const input, int inputSize,
return
tsCompressStringImp
(
buffer
,
len
,
output
,
outputSize
);
}
else
{
assert
(
0
);
return
-
1
;
}
}
...
...
@@ -222,6 +235,7 @@ static FORCE_INLINE int tsDecompressDouble(const char *const input, int compress
return
tsDecompressDoubleImp
(
buffer
,
nelements
,
output
);
}
else
{
assert
(
0
);
return
-
1
;
}
}
...
...
@@ -234,6 +248,7 @@ static FORCE_INLINE int tsCompressTimestamp(const char *const input, int inputSi
return
tsCompressStringImp
(
buffer
,
len
,
output
,
outputSize
);
}
else
{
assert
(
0
);
return
-
1
;
}
}
...
...
@@ -246,6 +261,7 @@ static FORCE_INLINE int tsDecompressTimestamp(const char *const input, int compr
return
tsDecompressTimestampImp
(
buffer
,
nelements
,
output
);
}
else
{
assert
(
0
);
return
-
1
;
}
}
...
...
src/util/src/tcompression.c
浏览文件 @
a18e287c
...
...
@@ -591,6 +591,7 @@ int tsDecompressTimestampImp(const char *const input, const int nelements, char
}
else
{
assert
(
0
);
return
-
1
;
}
}
/* --------------------------------------------Double Compression
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录