Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
loser646
TDengine
提交
2811c96b
T
TDengine
项目概览
loser646
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
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,发现更多精彩内容 >>
提交
2811c96b
编写于
9月 28, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-1530
上级
cb3785d7
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
125 addition
and
24 deletion
+125
-24
cmake/define.inc
cmake/define.inc
+11
-1
src/client/src/TSDBJNIConnector.c
src/client/src/TSDBJNIConnector.c
+5
-5
src/client/src/tscServer.c
src/client/src/tscServer.c
+2
-2
src/client/src/tscStream.c
src/client/src/tscStream.c
+2
-2
src/common/src/tdataformat.c
src/common/src/tdataformat.c
+4
-4
src/connector/go
src/connector/go
+1
-1
src/os/inc/os.h
src/os/inc/os.h
+4
-0
src/os/inc/osArm32.h
src/os/inc/osArm32.h
+90
-0
src/os/inc/osWindows.h
src/os/inc/osWindows.h
+1
-3
src/os/src/detail/osSysinfo.c
src/os/src/detail/osSysinfo.c
+0
-1
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+2
-2
src/rpc/src/rpcMain.c
src/rpc/src/rpcMain.c
+1
-1
src/rpc/src/rpcUdp.c
src/rpc/src/rpcUdp.c
+1
-1
src/util/src/hash.c
src/util/src/hash.c
+1
-1
未找到文件。
cmake/define.inc
浏览文件 @
2811c96b
...
...
@@ -48,6 +48,7 @@ ENDIF ()
IF
(
TD_LINUX_64
)
ADD_DEFINITIONS
(
-
D_M_X64
)
ADD_DEFINITIONS
(
-
D_TD_LINUX_64
)
MESSAGE
(
STATUS
"linux64 is defined"
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -Werror -fPIC -g3 -gdwarf-2 -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
ADD_DEFINITIONS
(
-
DUSE_LIBICONV
)
ENDIF
()
...
...
@@ -55,6 +56,7 @@ ENDIF ()
IF
(
TD_LINUX_32
)
ADD_DEFINITIONS
(
-
D_TD_LINUX_32
)
ADD_DEFINITIONS
(
-
DUSE_LIBICONV
)
MESSAGE
(
STATUS
"linux32 is defined"
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -Werror -fPIC -g -fsigned-char -munaligned-access -fpack-struct=8 -latomic -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
ENDIF
()
...
...
@@ -63,22 +65,26 @@ IF (TD_ARM_64)
ADD_DEFINITIONS
(
-
D_TD_ARM_64_
)
ADD_DEFINITIONS
(
-
D_TD_ARM_
)
ADD_DEFINITIONS
(
-
DUSE_LIBICONV
)
MESSAGE
(
STATUS
"arm64 is defined"
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -Werror -fPIC -g -fsigned-char -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
ENDIF
()
IF
(
TD_ARM_32
)
ADD_DEFINITIONS
(
-
D_TD_ARM_32_
)
ADD_DEFINITIONS
(
-
D_TD_ARM_
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -Werror -fPIC -g -fsigned-char -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
MESSAGE
(
STATUS
"arm32 is defined"
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -Werror -fPIC -g -fsigned-char -fpack-struct=8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -Wno-incompatible-pointer-types "
)
ENDIF
()
IF
(
TD_MIPS_64
)
ADD_DEFINITIONS
(
-
D_TD_MIPS_64_
)
MESSAGE
(
STATUS
"mips64 is defined"
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -Werror -fPIC -g3 -gdwarf-2 -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
ENDIF
()
IF
(
TD_MIPS_32
)
ADD_DEFINITIONS
(
-
D_TD_MIPS_32_
)
MESSAGE
(
STATUS
"mips32 is defined"
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -Werror -fPIC -g3 -gdwarf-2 -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
ENDIF
()
...
...
@@ -86,6 +92,7 @@ IF (TD_APLHINE)
SET
(
COMMON_FLAGS
"${COMMON_FLAGS} -largp"
)
link_libraries
(
/
usr
/
lib
/
libargp
.
a
)
ADD_DEFINITIONS
(
-
D_ALPINE
)
MESSAGE
(
STATUS
"aplhine is defined"
)
ENDIF
()
IF
(
TD_LINUX
)
...
...
@@ -118,6 +125,7 @@ IF (TD_DARWIN_64)
ADD_DEFINITIONS
(
-
DDARWIN
)
ADD_DEFINITIONS
(
-
D_REENTRANT
-
D__USE_POSIX
-
D_LIBC_REENTRANT
)
ADD_DEFINITIONS
(
-
DUSE_LIBICONV
)
MESSAGE
(
STATUS
"darwin64 is defined"
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -Werror -Wno-missing-braces -fPIC -g -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
SET
(
DEBUG_FLAGS
"-O0 -DDEBUG"
)
SET
(
RELEASE_FLAGS
"-O0"
)
...
...
@@ -147,11 +155,13 @@ IF (TD_WINDOWS_64)
ADD_DEFINITIONS
(
-
D_M_X64
)
ADD_DEFINITIONS
(
-
D_TD_WINDOWS_64
)
ADD_DEFINITIONS
(
-
DUSE_LIBICONV
)
MESSAGE
(
STATUS
"windows64 is defined"
)
ENDIF
()
IF
(
TD_WINDOWS_32
)
ADD_DEFINITIONS
(
-
D_TD_WINDOWS_32
)
ADD_DEFINITIONS
(
-
DUSE_LIBICONV
)
MESSAGE
(
STATUS
"windows32 is defined"
)
ENDIF
()
INCLUDE_DIRECTORIES
(
$
{
TD_COMMUNITY_DIR
}
/
src
/
inc
)
...
...
src/client/src/TSDBJNIConnector.c
浏览文件 @
2811c96b
...
...
@@ -149,7 +149,7 @@ JNIEXPORT void JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_initImp(JNIEnv *e
JNIEXPORT
jint
JNICALL
Java_com_taosdata_jdbc_TSDBJNIConnector_setOptions
(
JNIEnv
*
env
,
jobject
jobj
,
jint
optionIndex
,
jstring
optionValue
)
{
if
(
optionValue
==
NULL
)
{
jniDebug
(
"option index:%d value is null"
,
optionIndex
);
jniDebug
(
"option index:%d value is null"
,
(
int32_t
)
optionIndex
);
return
0
;
}
...
...
@@ -183,7 +183,7 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_setOptions(JNIEnv
}
(
*
env
)
->
ReleaseStringUTFChars
(
env
,
optionValue
,
tz1
);
}
else
{
jniError
(
"option index:%d is not found"
,
optionIndex
);
jniError
(
"option index:%d is not found"
,
(
int32_t
)
optionIndex
);
}
return
res
;
...
...
@@ -227,10 +227,10 @@ JNIEXPORT jlong JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_connectImp(JNIEn
ret
=
(
jlong
)
taos_connect
((
char
*
)
host
,
(
char
*
)
user
,
(
char
*
)
pass
,
(
char
*
)
dbname
,
(
uint16_t
)
jport
);
if
(
ret
==
0
)
{
jniError
(
"jobj:%p, conn:%p, connect to database failed, host=%s, user=%s, dbname=%s, port=%d"
,
jobj
,
(
void
*
)
ret
,
(
char
*
)
host
,
(
char
*
)
user
,
(
char
*
)
dbname
,
jport
);
(
char
*
)
host
,
(
char
*
)
user
,
(
char
*
)
dbname
,
(
int32_t
)
jport
);
}
else
{
jniDebug
(
"jobj:%p, conn:%p, connect to database succeed, host=%s, user=%s, dbname=%s, port=%d"
,
jobj
,
(
void
*
)
ret
,
(
char
*
)
host
,
(
char
*
)
user
,
(
char
*
)
dbname
,
jport
);
(
char
*
)
host
,
(
char
*
)
user
,
(
char
*
)
dbname
,
(
int32_t
)
jport
);
}
if
(
host
!=
NULL
)
(
*
env
)
->
ReleaseStringUTFChars
(
env
,
jhost
,
host
);
...
...
@@ -385,7 +385,7 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_getAffectedRowsIm
}
jint
ret
=
taos_affected_rows
((
SSqlObj
*
)
res
);
jniDebug
(
"jobj:%p, conn:%p, sql:%p, res: %p, affect rows:%d"
,
jobj
,
tscon
,
(
void
*
)
con
,
(
void
*
)
res
,
ret
);
jniDebug
(
"jobj:%p, conn:%p, sql:%p, res: %p, affect rows:%d"
,
jobj
,
tscon
,
(
void
*
)
con
,
(
void
*
)
res
,
(
int32_t
)
ret
);
return
ret
;
}
...
...
src/client/src/tscServer.c
浏览文件 @
2811c96b
...
...
@@ -642,14 +642,14 @@ int tscBuildQueryMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
size_t
numOfSrcCols
=
taosArrayGetSize
(
pQueryInfo
->
colList
);
if
(
numOfSrcCols
<=
0
&&
!
tscQueryTags
(
pQueryInfo
))
{
tscError
(
"%p illegal value of numOfCols in query msg: %"
PRIu64
", table cols:%d"
,
pSql
,
numOfSrcCols
,
tscError
(
"%p illegal value of numOfCols in query msg: %"
PRIu64
", table cols:%d"
,
pSql
,
(
int64_t
)
numOfSrcCols
,
tscGetNumOfColumns
(
pTableMeta
));
return
TSDB_CODE_TSC_INVALID_SQL
;
}
if
(
pQueryInfo
->
interval
.
interval
<
0
)
{
tscError
(
"%p illegal value of aggregation time interval in query msg: %
ld"
,
pSql
,
pQueryInfo
->
interval
.
interval
);
tscError
(
"%p illegal value of aggregation time interval in query msg: %
"
PRId64
,
pSql
,
(
int64_t
)
pQueryInfo
->
interval
.
interval
);
return
TSDB_CODE_TSC_INVALID_SQL
;
}
...
...
src/client/src/tscStream.c
浏览文件 @
2811c96b
...
...
@@ -398,8 +398,8 @@ static void tscSetSlidingWindowInfo(SSqlObj *pSql, SSqlStream *pStream) {
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
&
pSql
->
cmd
,
0
);
if
(
pQueryInfo
->
interval
.
intervalUnit
!=
'n'
&&
pQueryInfo
->
interval
.
intervalUnit
!=
'y'
&&
pQueryInfo
->
interval
.
interval
<
minIntervalTime
)
{
tscWarn
(
"%p stream:%p, original sample interval:%
ld
too small, reset to:%"
PRId64
,
pSql
,
pStream
,
pQueryInfo
->
interval
.
interval
,
minIntervalTime
);
tscWarn
(
"%p stream:%p, original sample interval:%
"
PRId64
"
too small, reset to:%"
PRId64
,
pSql
,
pStream
,
(
int64_t
)
pQueryInfo
->
interval
.
interval
,
minIntervalTime
);
pQueryInfo
->
interval
.
interval
=
minIntervalTime
;
}
...
...
src/common/src/tdataformat.c
浏览文件 @
2811c96b
...
...
@@ -313,13 +313,13 @@ void dataColSetOffset(SDataCol *pCol, int nEle) {
SDataCols
*
tdNewDataCols
(
int
maxRowSize
,
int
maxCols
,
int
maxRows
)
{
SDataCols
*
pCols
=
(
SDataCols
*
)
calloc
(
1
,
sizeof
(
SDataCols
));
if
(
pCols
==
NULL
)
{
uDebug
(
"malloc failure, size:%"
PRId64
" failed, reason:%s"
,
sizeof
(
SDataCols
),
strerror
(
errno
));
uDebug
(
"malloc failure, size:%"
PRId64
" failed, reason:%s"
,
(
int64_t
)
sizeof
(
SDataCols
),
strerror
(
errno
));
return
NULL
;
}
pCols
->
cols
=
(
SDataCol
*
)
calloc
(
maxCols
,
sizeof
(
SDataCol
));
if
(
pCols
->
cols
==
NULL
)
{
uDebug
(
"malloc failure, size:%"
PRId64
" failed, reason:%s"
,
sizeof
(
SDataCol
)
*
maxCols
,
strerror
(
errno
));
uDebug
(
"malloc failure, size:%"
PRId64
" failed, reason:%s"
,
(
int64_t
)
sizeof
(
SDataCol
)
*
maxCols
,
strerror
(
errno
));
tdFreeDataCols
(
pCols
);
return
NULL
;
}
...
...
@@ -331,7 +331,7 @@ SDataCols *tdNewDataCols(int maxRowSize, int maxCols, int maxRows) {
pCols
->
buf
=
malloc
(
pCols
->
bufSize
);
if
(
pCols
->
buf
==
NULL
)
{
uDebug
(
"malloc failure, size:%"
PRId64
" failed, reason:%s"
,
sizeof
(
SDataCol
)
*
maxCols
,
strerror
(
errno
));
uDebug
(
"malloc failure, size:%"
PRId64
" failed, reason:%s"
,
(
int64_t
)
sizeof
(
SDataCol
)
*
maxCols
,
strerror
(
errno
));
tdFreeDataCols
(
pCols
);
return
NULL
;
}
...
...
@@ -716,4 +716,4 @@ SKVRow tdGetKVRowFromBuilder(SKVRowBuilder *pBuilder) {
memcpy
(
kvRowValues
(
row
),
pBuilder
->
buf
,
pBuilder
->
size
);
return
row
;
}
\ No newline at end of file
}
go
@
06ec30a0
比较
8d7bf743
...
06ec30a0
Subproject commit
8d7bf743852897110cbdcc7c4322cd7a74d4167b
Subproject commit
06ec30a0f1762e8169bf6b9045c82bcaa52bcdf0
src/os/inc/os.h
浏览文件 @
2811c96b
...
...
@@ -28,6 +28,10 @@ extern "C" {
#include "osArm64.h"
#endif
#ifdef _TD_ARM_32_
#include "osArm32.h"
#endif
#ifdef _TD_LINUX_64
#include "osLinux64.h"
#endif
...
...
src/os/inc/osArm32.h
0 → 100644
浏览文件 @
2811c96b
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TDENGINE_OS_ARM32_H
#define TDENGINE_OS_ARM32_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include <stdio.h>
#include <stdlib.h>
#include <argp.h>
#include <arpa/inet.h>
#include <assert.h>
#include <ctype.h>
#include <dirent.h>
#include <endian.h>
#include <errno.h>
#include <float.h>
#include <ifaddrs.h>
#include <libgen.h>
#include <limits.h>
#include <locale.h>
#include <math.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <netinet/udp.h>
#include <pthread.h>
#include <pwd.h>
#include <regex.h>
#include <semaphore.h>
#include <signal.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <strings.h>
#include <sys/epoll.h>
#include <sys/eventfd.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/sendfile.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/statvfs.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <sys/un.h>
#include <syslog.h>
#include <termios.h>
#include <unistd.h>
#include <wchar.h>
#include <wordexp.h>
#include <wctype.h>
#include <inttypes.h>
#include <fcntl.h>
#include <sys/utsname.h>
#include <sys/resource.h>
#include <error.h>
#define TAOS_OS_FUNC_LZ4
#define BUILDIN_CLZL(val) __builtin_clzll(val)
#define BUILDIN_CTZL(val) __builtin_ctzll(val)
#define BUILDIN_CLZ(val) __builtin_clz(val)
#define BUILDIN_CTZ(val) __builtin_ctz(val)
#ifdef __cplusplus
}
#endif
#endif
src/os/inc/osWindows.h
浏览文件 @
2811c96b
...
...
@@ -51,8 +51,6 @@
extern
"C"
{
#endif
#define TAOS_OS_FUNC_ATOMIC
#define TAOS_OS_FUNC_LZ4
int32_t
BUILDIN_CLZL
(
uint64_t
val
);
int32_t
BUILDIN_CLZ
(
uint32_t
val
);
...
...
@@ -351,4 +349,4 @@ void wordfree(wordexp_t *pwordexp);
#ifdef __cplusplus
}
#endif
#endif
\ No newline at end of file
#endif
src/os/src/detail/osSysinfo.c
浏览文件 @
2811c96b
...
...
@@ -569,7 +569,6 @@ int taosSystem(const char *cmd) {
}
}
int
_sysctl
(
struct
__sysctl_args
*
args
);
void
taosSetCoreDump
()
{
if
(
0
==
tsEnableCoreFile
)
{
return
;
...
...
src/query/src/qExecutor.c
浏览文件 @
2811c96b
...
...
@@ -5050,8 +5050,8 @@ static void sequentialTableProcess(SQInfo *pQInfo) {
}
qDebug
(
"QInfo %p numOfTables:%"
PRIu64
", index:%d, numOfGroups:%"
PRIzu
", %"
PRId64
" points returned, total:%"
PRId64
", offset:%"
PRId64
,
pQInfo
,
pQInfo
->
tableqinfoGroupInfo
.
numOfTables
,
pQInfo
->
tableIndex
,
numOfGroups
,
pQuery
->
rec
.
rows
,
pQuery
->
rec
.
total
,
"QInfo %p numOfTables:%"
PRIu64
", index:%d, numOfGroups:%"
PRIzu
", %"
PRId64
" points returned, total:%"
PRId64
", offset:%"
PRId64
,
pQInfo
,
(
uint64_t
)
pQInfo
->
tableqinfoGroupInfo
.
numOfTables
,
pQInfo
->
tableIndex
,
numOfGroups
,
pQuery
->
rec
.
rows
,
pQuery
->
rec
.
total
,
pQuery
->
limit
.
offset
);
}
...
...
src/rpc/src/rpcMain.c
浏览文件 @
2811c96b
...
...
@@ -240,7 +240,7 @@ void *rpcOpen(const SRpcInit *pInit) {
size_t
size
=
sizeof
(
SRpcConn
)
*
pRpc
->
sessions
;
pRpc
->
connList
=
(
SRpcConn
*
)
calloc
(
1
,
size
);
if
(
pRpc
->
connList
==
NULL
)
{
tError
(
"%s failed to allocate memory for taos connections, size:%
ld"
,
pRpc
->
label
,
size
);
tError
(
"%s failed to allocate memory for taos connections, size:%
"
PRId64
,
pRpc
->
label
,
(
int64_t
)
size
);
rpcClose
(
pRpc
);
return
NULL
;
}
...
...
src/rpc/src/rpcUdp.c
浏览文件 @
2811c96b
...
...
@@ -211,7 +211,7 @@ static void *taosRecvUdpData(void *param) {
char
*
tmsg
=
malloc
(
dataLen
+
tsRpcOverhead
);
if
(
NULL
==
tmsg
)
{
tError
(
"%s failed to allocate memory, size:%
ld"
,
pConn
->
label
,
dataLen
);
tError
(
"%s failed to allocate memory, size:%
"
PRId64
,
pConn
->
label
,
(
int64_t
)
dataLen
);
continue
;
}
else
{
tDebug
(
"UDP malloc mem: %p"
,
tmsg
);
...
...
src/util/src/hash.c
浏览文件 @
2811c96b
...
...
@@ -738,7 +738,7 @@ void taosHashTableResize(SHashObj *pHashObj) {
int64_t
et
=
taosGetTimestampUs
();
uDebug
(
"hash table resize completed, new capacity:%
"
PRId64
", load factor:%f, elapsed time:%fms"
,
pHashObj
->
capacity
,
uDebug
(
"hash table resize completed, new capacity:%
d, load factor:%f, elapsed time:%fms"
,
(
int32_t
)
pHashObj
->
capacity
,
((
double
)
pHashObj
->
size
)
/
pHashObj
->
capacity
,
(
et
-
st
)
/
1000
.
0
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录