Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
4883bfb4
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看板
提交
4883bfb4
编写于
11月 10, 2021
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into feature/TD-10748
上级
148b9034
e1c81f6d
变更
33
展开全部
隐藏空白更改
内联
并排
Showing
33 changed file
with
12879 addition
and
43 deletion
+12879
-43
Jenkinsfile
Jenkinsfile
+76
-0
cmake/define.inc
cmake/define.inc
+7
-4
cmake/platform.inc
cmake/platform.inc
+10
-5
documentation20/cn/02.getting-started/02.taosdemo/docs.md
documentation20/cn/02.getting-started/02.taosdemo/docs.md
+2
-2
documentation20/en/02.getting-started/02.taosdemo/docs.md
documentation20/en/02.getting-started/02.taosdemo/docs.md
+1
-1
src/client/src/tscParseLineProtocol.c
src/client/src/tscParseLineProtocol.c
+5
-5
src/client/src/tscServer.c
src/client/src/tscServer.c
+2
-1
src/connector/jdbc/src/main/java/com/taosdata/jdbc/SchemalessStatement.java
.../src/main/java/com/taosdata/jdbc/SchemalessStatement.java
+31
-4
src/connector/jdbc/src/main/java/com/taosdata/jdbc/enums/SchemalessProtocolType.java
.../java/com/taosdata/jdbc/enums/SchemalessProtocolType.java
+8
-0
src/connector/jdbc/src/main/java/com/taosdata/jdbc/enums/SchemalessTimestampType.java
...java/com/taosdata/jdbc/enums/SchemalessTimestampType.java
+1
-1
src/connector/jdbc/src/test/java/com/taosdata/jdbc/SchemalessInsertTest.java
...src/test/java/com/taosdata/jdbc/SchemalessInsertTest.java
+21
-3
src/inc/taosmsg.h
src/inc/taosmsg.h
+1
-1
src/kit/shell/src/shellImport.c
src/kit/shell/src/shellImport.c
+1
-1
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+1
-1
src/kit/taosdump/taosdump.c
src/kit/taosdump/taosdump.c
+2
-2
src/plugins/CMakeLists.txt
src/plugins/CMakeLists.txt
+1
-1
src/query/src/tdigest.c
src/query/src/tdigest.c
+1
-1
src/sync/src/syncRetrieve.c
src/sync/src/syncRetrieve.c
+1
-1
src/tsdb/src/tsdbCommit.c
src/tsdb/src/tsdbCommit.c
+2
-2
src/tsdb/src/tsdbRead.c
src/tsdb/src/tsdbRead.c
+1
-1
src/util/src/talgo.c
src/util/src/talgo.c
+1
-1
src/util/src/tlog.c
src/util/src/tlog.c
+1
-1
src/util/src/tqueue.c
src/util/src/tqueue.c
+1
-1
src/util/src/tworker.c
src/util/src/tworker.c
+1
-1
tests/pytest/functions/queryTestCases-td3690.py
tests/pytest/functions/queryTestCases-td3690.py
+1588
-0
tests/pytest/functions/queryTestCases-td4082.py
tests/pytest/functions/queryTestCases-td4082.py
+1586
-0
tests/pytest/functions/queryTestCases-td4097.py
tests/pytest/functions/queryTestCases-td4097.py
+1587
-0
tests/pytest/functions/queryTestCases-td4288.py
tests/pytest/functions/queryTestCases-td4288.py
+1587
-0
tests/pytest/functions/queryTestCases-td4724.py
tests/pytest/functions/queryTestCases-td4724.py
+1587
-0
tests/pytest/functions/queryTestCases-td5790.py
tests/pytest/functions/queryTestCases-td5790.py
+1588
-0
tests/pytest/functions/queryTestCases-td5935.py
tests/pytest/functions/queryTestCases-td5935.py
+1587
-0
tests/pytest/functions/queryTestCases-td6068.py
tests/pytest/functions/queryTestCases-td6068.py
+1588
-0
tests/tsim/inc/sim.h
tests/tsim/inc/sim.h
+2
-2
未找到文件。
Jenkinsfile
浏览文件 @
4883bfb4
...
...
@@ -181,6 +181,76 @@ def pre_test_noinstall(){
'''
return
1
}
def
pre_test_mac
(){
sh
'hostname'
sh
'''
cd ${WKC}
git reset --hard HEAD~10 >/dev/null
'''
script
{
if
(
env
.
CHANGE_TARGET
==
'master'
)
{
sh
'''
cd ${WKC}
git checkout master
'''
}
else
if
(
env
.
CHANGE_TARGET
==
'2.0'
){
sh
'''
cd ${WKC}
git checkout 2.0
'''
}
else
{
sh
'''
cd ${WKC}
git checkout develop
'''
}
}
sh
'''
cd ${WKC}
git pull >/dev/null
git fetch origin +refs/pull/${CHANGE_ID}/merge
git checkout -qf FETCH_HEAD
git clean -dfx
git submodule update --init --recursive
cd ${WK}
git reset --hard HEAD~10
'''
script
{
if
(
env
.
CHANGE_TARGET
==
'master'
)
{
sh
'''
cd ${WK}
git checkout master
'''
}
else
if
(
env
.
CHANGE_TARGET
==
'2.0'
){
sh
'''
cd ${WK}
git checkout 2.0
'''
}
else
{
sh
'''
cd ${WK}
git checkout develop
'''
}
}
sh
'''
cd ${WK}
git pull >/dev/null
export TZ=Asia/Harbin
date
git clean -dfx
mkdir debug
cd debug
cmake .. > /dev/null
cmake --build .
'''
return
1
}
def
pre_test_win
(){
bat
'''
taskkill /f /t /im python.exe
...
...
@@ -581,6 +651,12 @@ pipeline {
pre_test_noinstall
()
}
}
stage
(
'Mac_build'
)
{
agent
{
label
" catalina "
}
steps
{
pre_test_mac
()
}
}
stage
(
'build'
){
agent
{
label
" wintest "
}
...
...
cmake/define.inc
浏览文件 @
4883bfb4
...
...
@@ -121,7 +121,7 @@ IF (TD_MIPS_32)
SET
(
COMMON_FLAGS
"-Wall -Werror -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
ENDIF
()
IF
(
TD_A
PLH
INE
)
IF
(
TD_A
LP
INE
)
SET
(
COMMON_FLAGS
"${COMMON_FLAGS} -largp"
)
link_libraries
(
/
usr
/
lib
/
libargp
.
a
)
ADD_DEFINITIONS
(
-
D_ALPINE
)
...
...
@@ -172,11 +172,14 @@ IF (TD_LINUX)
ENDIF
()
IF
(
TD_MEMORY_SANITIZER
)
SET
(
DEBUG_FLAGS
"-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fno-sanitize=null -fno-sanitize=alignment -static-libasan -O0 -g3 -DDEBUG"
)
MESSAGE
(
STATUS
"memory sanitizer detected as true"
)
IF
(
TD_ARCHLINUX
)
SET
(
DEBUG_FLAGS
"-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fno-sanitize=null -fno-sanitize=alignment -O0 -g3 -DDEBUG"
)
ELSE
()
SET
(
DEBUG_FLAGS
"-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fno-sanitize=null -fno-sanitize=alignment -static-libasan -O0 -g3 -DDEBUG"
)
ENDIF
()
MESSAGE
(
STATUS
"${BoldRed}Will compile with memory sanitizer! ${ColourReset}"
)
ELSE
()
SET
(
DEBUG_FLAGS
"-O0 -g3 -DDEBUG"
)
MESSAGE
(
STATUS
"memory sanitizer detected as false"
)
ENDIF
()
SET
(
RELEASE_FLAGS
"-O3 -Wno-error"
)
...
...
cmake/platform.inc
浏览文件 @
4883bfb4
...
...
@@ -21,7 +21,7 @@ SET(TD_LINUX FALSE)
SET
(
TD_ARM_32
FALSE
)
SET
(
TD_MIPS_64
FALSE
)
SET
(
TD_MIPS_32
FALSE
)
SET
(
TD_A
PLH
INE
FALSE
)
SET
(
TD_A
LP
INE
FALSE
)
SET
(
TD_NINGSI
FALSE
)
SET
(
TD_NINGSI_60
FALSE
)
SET
(
TD_NINGSI_80
FALSE
)
...
...
@@ -36,7 +36,7 @@ IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
# Get OS information and store in variable TD_OS_INFO.
#
execute_process
(
COMMAND
chmod
777
$
{
TD_COMMUNITY_DIR
}
/
packaging
/
tools
/
get_os
.
sh
)
execute_process
(
COMMAND
$
{
TD_COMMUNITY_DIR
}
/
packaging
/
tools
/
get_os
.
sh
""
OUTPUT_VARIABLE
TD_OS_INFO
)
execute_process
(
COMMAND
sh
$
{
TD_COMMUNITY_DIR
}
/
packaging
/
tools
/
get_os
.
sh
""
OUTPUT_VARIABLE
TD_OS_INFO
)
MESSAGE
(
STATUS
"The current os is "
$
{
TD_OS_INFO
})
SET
(
TD_LINUX
TRUE
)
...
...
@@ -52,8 +52,13 @@ IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
ENDIF
()
IF
(
$
{
TD_OS_INFO
}
MATCHES
"Alpine"
)
SET
(
TD_APLHINE
TRUE
)
MESSAGE
(
STATUS
"The current OS is Alpine, append extra flags"
)
SET
(
TD_ALPINE
TRUE
)
MESSAGE
(
STATUS
"The current OS is Alpine Linux, append extra flags"
)
ELSEIF
(
$
{
TD_OS_INFO
}
MATCHES
"Arch"
)
SET
(
TD_ARCHLINUX
TRUE
)
MESSAGE
(
STATUS
"The current OS is Arch Linux"
)
ELSE
()
MESSAGE
(
STATUS
"Ths distro is "
$
{
TD_OS_INFO
})
ENDIF
()
ELSEIF
(
$
{
CMAKE_SYSTEM_NAME
}
MATCHES
"Darwin"
)
SET
(
TD_DARWIN
TRUE
)
...
...
@@ -155,7 +160,7 @@ ELSEIF (${OSTYPE} MATCHES "Linux")
MESSAGE
(
STATUS
"input osType: Linux"
)
ELSEIF
(
$
{
OSTYPE
}
MATCHES
"Alpine"
)
MESSAGE
(
STATUS
"input osType: Alpine"
)
SET
(
TD_A
PLH
INE
TRUE
)
SET
(
TD_A
LP
INE
TRUE
)
ELSE
()
MESSAGE
(
STATUS
"The user specified osType is unknown: "
$
{
OSTYPE
})
ENDIF
()
documentation20/cn/02.getting-started/02.taosdemo/docs.md
浏览文件 @
4883bfb4
...
...
@@ -145,7 +145,7 @@ insert delay, avg: 8.31ms, max: 860.12ms, min: 2.00ms
```
$ taosdemo --help
-f, --file=FILE The meta file to the execution procedure.
-f, --file=FILE The meta file to the execution procedure.
Currently, we support standard UTF-8 (without BOM) encoded files only.
-u, --user=USER The user name to use when connecting to the server.
-p, --password The password to use when connecting to the server.
-c, --config-dir=CONFIG_DIR Configuration directory.
...
...
@@ -442,7 +442,7 @@ TDengine是涛思数据专为物联网、车联网、工业互联网、IT运维
taosdemo支持两种配置参数的模式,一种是命令行参数,一种是使用json格式的配置文件。
一、命令行参数
-f:指定taosdemo所需参数的meta文件。当使用该参数时,其他所有命令行参数都失效。可选项,缺省是NULL。
-f:指定taosdemo所需参数的meta文件。当使用该参数时,其他所有命令行参数都失效。可选项,缺省是NULL。
目前仅支持不含 BOM(byte-order mark)的标准 UTF-8 编码文件。
-u: 用户名。可选项,缺省是“root“。
...
...
documentation20/en/02.getting-started/02.taosdemo/docs.md
浏览文件 @
4883bfb4
...
...
@@ -154,7 +154,7 @@ The complete list of taosdemo command-line arguments can be displayed via taosde
```
$ taosdemo --help
-f, --file=FILE The meta file to the execution procedure.
-f, --file=FILE The meta file to the execution procedure.
Currently, we support standard UTF-8 (without BOM) encoded files only.
-u, --user=USER The user name to use when connecting to the server.
-p, --password The password to use when connecting to the server.
-c, --config-dir=CONFIG_DIR Configuration directory.
...
...
src/client/src/tscParseLineProtocol.c
浏览文件 @
4883bfb4
...
...
@@ -1512,9 +1512,9 @@ static bool convertStrToNumber(TAOS_SML_KV *pVal, char *str, SSmlLinesInfo* info
errno
=
0
;
uint8_t
type
=
pVal
->
type
;
int16_t
length
=
pVal
->
length
;
int64_t
val_s
;
uint64_t
val_u
;
double
val_d
;
int64_t
val_s
=
0
;
uint64_t
val_u
=
0
;
double
val_d
=
0
.
0
;
strntolower_s
(
str
,
str
,
(
int32_t
)
strlen
(
str
));
if
(
IS_FLOAT_TYPE
(
type
))
{
...
...
@@ -1814,7 +1814,7 @@ static int32_t getTimeStampValue(char *value, uint16_t len,
int32_t
convertSmlTimeStamp
(
TAOS_SML_KV
*
pVal
,
char
*
value
,
uint16_t
len
,
SSmlLinesInfo
*
info
)
{
int32_t
ret
;
SMLTimeStampType
type
;
SMLTimeStampType
type
=
SML_TIME_STAMP_NOW
;
int64_t
tsVal
;
ret
=
isTimeStamp
(
value
,
len
,
&
type
,
info
);
...
...
@@ -2413,7 +2413,7 @@ static SSqlObj* createSmlQueryObj(TAOS* taos, int32_t affected_rows, int32_t cod
TAOS_RES
*
taos_schemaless_insert
(
TAOS
*
taos
,
char
*
lines
[],
int
numLines
,
int
protocol
,
int
precision
)
{
int
code
=
TSDB_CODE_SUCCESS
;
int
affected_rows
=
0
;
SMLTimeStampType
tsType
;
SMLTimeStampType
tsType
=
SML_TIME_STAMP_NOW
;
if
(
protocol
==
TSDB_SML_LINE_PROTOCOL
)
{
code
=
convertPrecisionType
(
precision
,
&
tsType
);
...
...
src/client/src/tscServer.c
浏览文件 @
4883bfb4
...
...
@@ -2957,7 +2957,8 @@ int32_t tscGetTableMetaImpl(SSqlObj* pSql, STableMetaInfo *pTableMetaInfo, bool
// in case of child table, here only get the
if
(
pMeta
->
tableType
==
TSDB_CHILD_TABLE
)
{
int32_t
code
=
tscCreateTableMetaFromSTableMeta
(
pSql
,
&
pTableMetaInfo
->
pTableMeta
,
name
,
&
pTableMetaInfo
->
tableMetaCapacity
,
(
STableMeta
**
)(
&
pSTMeta
));
pSql
->
pBuf
=
(
void
*
)(
pSTMeta
);
pSql
->
pBuf
=
(
void
*
)(
pSTMeta
);
pMeta
=
pTableMetaInfo
->
pTableMeta
;
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
getTableMetaFromMnode
(
pSql
,
pTableMetaInfo
,
autocreate
);
}
...
...
src/connector/jdbc/src/main/java/com/taosdata/jdbc/SchemalessStatement.java
浏览文件 @
4883bfb4
...
...
@@ -8,16 +8,35 @@ import java.sql.Connection;
import
java.sql.SQLException
;
import
java.sql.Statement
;
/**
* @author huolibo@qq.com
* @version v1.0.0
* @JDK: 1.8
* @description: this class is an extension of {@link Statement}. use like:
* Statement statement = conn.createStatement();
* SchemalessStatement schemalessStatement = new SchemalessStatement(statement);
* schemalessStatement.execute(sql);
* schemalessStatement.executeSchemaless(lines, SchemalessProtocolType, SchemalessTimestampType);
* @since 2021-11-03 17:10
*/
public
class
SchemalessStatement
extends
AbstractStatementWrapper
{
public
SchemalessStatement
(
Statement
statement
)
{
super
(
statement
);
}
public
void
executeSchemaless
(
String
[]
strings
,
SchemalessProtocolType
protocolType
,
SchemalessTimestampType
timestampType
)
throws
SQLException
{
/**
* batch insert schemaless lines
*
* @param lines schemaless data
* @param protocolType schemaless type {@link SchemalessProtocolType}
* @param timestampType Time precision {@link SchemalessTimestampType}
* @throws SQLException execute insert exception
*/
public
void
executeSchemaless
(
String
[]
lines
,
SchemalessProtocolType
protocolType
,
SchemalessTimestampType
timestampType
)
throws
SQLException
{
Connection
connection
=
this
.
getConnection
();
if
(
connection
instanceof
TSDBConnection
)
{
TSDBConnection
tsdbConnection
=
(
TSDBConnection
)
connection
;
tsdbConnection
.
getConnector
().
insertLines
(
string
s
,
protocolType
,
timestampType
);
tsdbConnection
.
getConnector
().
insertLines
(
line
s
,
protocolType
,
timestampType
);
}
else
if
(
connection
instanceof
RestfulConnection
)
{
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
,
"restful connection is not supported currently"
);
}
else
{
...
...
@@ -25,7 +44,15 @@ public class SchemalessStatement extends AbstractStatementWrapper {
}
}
public
void
executeSchemaless
(
String
sql
,
SchemalessProtocolType
protocolType
,
SchemalessTimestampType
timestampType
)
throws
SQLException
{
executeSchemaless
(
new
String
[]{
sql
},
protocolType
,
timestampType
);
/**
* only one insert
*
* @param line schemaless line
* @param protocolType schemaless type {@link SchemalessProtocolType}
* @param timestampType Time precision {@link SchemalessTimestampType}
* @throws SQLException execute insert exception
*/
public
void
executeSchemaless
(
String
line
,
SchemalessProtocolType
protocolType
,
SchemalessTimestampType
timestampType
)
throws
SQLException
{
executeSchemaless
(
new
String
[]{
line
},
protocolType
,
timestampType
);
}
}
src/connector/jdbc/src/main/java/com/taosdata/jdbc/enums/SchemalessProtocolType.java
浏览文件 @
4883bfb4
package
com.taosdata.jdbc.enums
;
import
java.util.Arrays
;
public
enum
SchemalessProtocolType
{
UNKNOWN
,
LINE
,
...
...
@@ -7,4 +9,10 @@ public enum SchemalessProtocolType {
JSON
,
;
public
static
SchemalessProtocolType
parse
(
String
type
)
{
return
Arrays
.
stream
(
SchemalessProtocolType
.
values
())
.
filter
(
protocol
->
type
.
equalsIgnoreCase
(
protocol
.
name
()))
.
findFirst
().
orElse
(
UNKNOWN
);
}
}
src/connector/jdbc/src/main/java/com/taosdata/jdbc/enums/SchemalessTimestampType.java
浏览文件 @
4883bfb4
package
com.taosdata.jdbc.enums
;
public
enum
SchemalessTimestampType
{
// Let the database decide
NOT_CONFIGURED
,
HOURS
,
MINUTES
,
...
...
src/connector/jdbc/src/test/java/com/taosdata/jdbc/SchemalessInsertTest.java
浏览文件 @
4883bfb4
package
com.taosdata.jdbc
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.taosdata.jdbc.enums.SchemalessProtocolType
;
import
com.taosdata.jdbc.enums.SchemalessTimestampType
;
import
org.junit.After
;
...
...
@@ -10,10 +12,14 @@ import org.junit.Test;
import
java.sql.*
;
public
class
SchemalessInsertTest
{
private
String
host
=
"127.0.0.1"
;
private
String
dbname
=
"test_schemaless_insert"
;
private
final
String
dbname
=
"test_schemaless_insert"
;
private
Connection
conn
;
/**
* schemaless insert compatible with influxdb
*
* @throws SQLException execute error
*/
@Test
public
void
schemalessInsert
()
throws
SQLException
{
// given
...
...
@@ -41,6 +47,11 @@ public class SchemalessInsertTest {
statement
.
close
();
}
/**
* telnet insert compatible with opentsdb
*
* @throws SQLException execute error
*/
@Test
public
void
telnetInsert
()
throws
SQLException
{
// given
...
...
@@ -71,6 +82,11 @@ public class SchemalessInsertTest {
statement
.
close
();
}
/**
* json insert compatible with opentsdb json format
*
* @throws SQLException execute error
*/
@Test
public
void
jsonInsert
()
throws
SQLException
{
// given
...
...
@@ -113,13 +129,15 @@ public class SchemalessInsertTest {
while
(
rs
.
next
())
{
rowCnt
++;
}
// Assert.assertEquals(json.length, rowCnt);
Assert
.
assertEquals
(((
JSONArray
)
JSONObject
.
parse
(
json
)).
size
(),
rowCnt
);
rs
.
close
();
statement
.
close
();
}
@Before
public
void
before
()
{
String
host
=
"127.0.0.1"
;
final
String
url
=
"jdbc:TAOS://"
+
host
+
":6030/?user=root&password=taosdata"
;
try
{
conn
=
DriverManager
.
getConnection
(
url
);
...
...
src/inc/taosmsg.h
浏览文件 @
4883bfb4
...
...
@@ -400,7 +400,7 @@ typedef struct SColIndex {
int16_t
colId
;
// column id
int16_t
colIndex
;
// column index in colList if it is a normal column or index in tagColList if a tag
uint16_t
flag
;
// denote if it is a tag or a normal column
char
name
[
TSDB_COL_NAME_LEN
+
TSDB_
DB
_NAME_LEN
+
1
];
char
name
[
TSDB_COL_NAME_LEN
+
TSDB_
TABLE
_NAME_LEN
+
1
];
}
SColIndex
;
typedef
struct
SColumnFilterInfo
{
...
...
src/kit/shell/src/shellImport.c
浏览文件 @
4883bfb4
...
...
@@ -25,7 +25,7 @@
static
char
**
shellSQLFiles
=
NULL
;
static
int32_t
shellSQLFileNum
=
0
;
static
char
shellTablesSQLFile
[
TSDB_FILENAME_LEN
]
=
{
0
};
static
char
shellTablesSQLFile
[
4096
]
=
{
0
};
typedef
struct
{
pthread_t
threadID
;
...
...
src/kit/taosdemo/taosdemo.c
浏览文件 @
4883bfb4
...
...
@@ -10969,7 +10969,7 @@ static void startMultiThreadInsertData(int threads, char* db_name,
}
int64_t
ntables
=
0
;
uint64_t
tableFrom
;
uint64_t
tableFrom
=
0
;
if
(
stbInfo
)
{
if
(
stbInfo
->
iface
!=
SML_IFACE
)
{
...
...
src/kit/taosdump/taosdump.c
浏览文件 @
4883bfb4
...
...
@@ -1293,7 +1293,7 @@ static int getTableDes(
length
[
0
],
tbuf
,
COL_VALUEBUF_LEN
-
2
);
sprintf
(
tableDes
->
cols
[
i
].
value
,
"%s"
,
tbuf
);
}
else
{
tableDes
->
cols
[
i
].
var_value
=
calloc
(
1
,
len
*
4
);
tableDes
->
cols
[
i
].
var_value
=
calloc
(
1
,
n
len
*
4
);
if
(
tableDes
->
cols
[
i
].
var_value
==
NULL
)
{
errorPrint
(
"%s() LN%d, memory alalocation failed!
\n
"
,
__func__
,
__LINE__
);
...
...
@@ -1303,7 +1303,7 @@ static int getTableDes(
converStringToReadable
(
(
char
*
)
row
[
TSDB_SHOW_TABLES_NAME_INDEX
],
length
[
0
],
(
char
*
)(
tableDes
->
cols
[
i
].
var_value
),
len
);
(
char
*
)(
tableDes
->
cols
[
i
].
var_value
),
n
len
);
}
break
;
case
TSDB_DATA_TYPE_TIMESTAMP
:
...
...
src/plugins/CMakeLists.txt
浏览文件 @
4883bfb4
...
...
@@ -41,7 +41,7 @@ ELSE ()
COMMAND git clean -f -d
BUILD_COMMAND CGO_CFLAGS=-I
${
CMAKE_CURRENT_SOURCE_DIR
}
/../inc CGO_LDFLAGS=-L
${
CMAKE_BINARY_DIR
}
/build/lib go build -ldflags
"-s -w -X github.com/taosdata/taosadapter/version.CommitID=
${
taosadapter_commit_sha1
}
"
INSTALL_COMMAND
COMMAND curl -sL https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz -o upx.tar.xz && tar xvJf upx.tar.xz --strip-components 1
&& ./upx taosadapter
COMMAND curl -sL https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz -o upx.tar.xz && tar xvJf upx.tar.xz --strip-components 1
> /dev/null && ./upx taosadapter || :
COMMAND cmake -E copy taosadapter
${
CMAKE_BINARY_DIR
}
/build/bin
COMMAND cmake -E make_directory
${
CMAKE_BINARY_DIR
}
/test/cfg/
COMMAND cmake -E copy ./example/config/taosadapter.toml
${
CMAKE_BINARY_DIR
}
/test/cfg/
...
...
src/query/src/tdigest.c
浏览文件 @
4883bfb4
...
...
@@ -296,7 +296,7 @@ double tdigestQuantile(TDigest *t, double q) {
a
=
b
;
right
=
t
->
max
;
if
(
idx
<
weight_so_far
+
a
->
weight
)
{
if
(
idx
<
weight_so_far
+
a
->
weight
&&
a
->
weight
!=
0
)
{
double
p
=
(
idx
-
weight_so_far
)
/
a
->
weight
;
return
left
*
(
1
-
p
)
+
right
*
p
;
}
...
...
src/sync/src/syncRetrieve.c
浏览文件 @
4883bfb4
...
...
@@ -233,7 +233,7 @@ static int64_t syncProcessLastWal(SSyncPeer *pPeer, char *wname, int64_t index)
int32_t
once
=
0
;
// last WAL has once ever been processed
int64_t
offset
=
0
;
uint64_t
fversion
=
0
;
char
fname
[
TSDB_FILENAME_LEN
*
2
]
=
{
0
};
// full path to wal file
char
fname
[
TSDB_FILENAME_LEN
*
3
]
=
{
0
};
// full path to wal file
// get full path to wal file
snprintf
(
fname
,
sizeof
(
fname
),
"%s/%s"
,
pNode
->
path
,
wname
);
...
...
src/tsdb/src/tsdbCommit.c
浏览文件 @
4883bfb4
...
...
@@ -229,7 +229,7 @@ int tsdbWriteBlockIdx(SDFile *pHeadf, SArray *pIdxA, void **ppBuf) {
SBlockIdx
*
pBlkIdx
;
size_t
nidx
=
taosArrayGetSize
(
pIdxA
);
int
tlen
=
0
,
size
;
int64_t
offset
;
int64_t
offset
=
0
;
if
(
nidx
<=
0
)
{
// All data are deleted
...
...
@@ -1186,7 +1186,7 @@ int tsdbWriteBlockImpl(STsdbRepo *pRepo, STable *pTable, SDFile *pDFile, SDFile
return
-
1
;
}
uint32_t
aggrStatus
=
((
nColsNotAllNull
>
0
)
&&
(
rowsToWrite
>
8
))
?
1
:
0
;
// TODO: How to make the decision?
uint32_t
aggrStatus
=
nColsNotAllNull
>
0
?
1
:
0
;
if
(
aggrStatus
>
0
)
{
taosCalcChecksumAppend
(
0
,
(
uint8_t
*
)
pAggrBlkData
,
tsizeAggr
);
...
...
src/tsdb/src/tsdbRead.c
浏览文件 @
4883bfb4
...
...
@@ -1544,7 +1544,7 @@ static void mergeTwoRowFromMem(STsdbQueryHandle* pQueryHandle, int32_t capacity,
int16_t
offset
;
bool
isRow1DataRow
=
isDataRow
(
row1
);
bool
isRow2DataRow
;
bool
isRow2DataRow
=
false
;
bool
isChosenRowDataRow
;
int32_t
chosen_itr
;
void
*
value
;
...
...
src/util/src/talgo.c
浏览文件 @
4883bfb4
...
...
@@ -230,7 +230,7 @@ void taosheapadjust(void *base, int32_t size, int32_t start, int32_t end, const
{
int32_t
parent
;
int32_t
child
;
char
*
buf
;
char
*
buf
=
NULL
;
if
(
base
&&
size
>
0
&&
compar
)
{
parent
=
start
;
...
...
src/util/src/tlog.c
浏览文件 @
4883bfb4
...
...
@@ -566,7 +566,7 @@ static int32_t taosPushLogBuffer(SLogBuff *tLogBuff, char *msg, int32_t msgLen)
int32_t
end
=
0
;
int32_t
remainSize
=
0
;
static
int64_t
lostLine
=
0
;
char
tmpBuf
[
4
0
]
=
{
0
};
char
tmpBuf
[
6
0
]
=
{
0
};
int32_t
tmpBufLen
=
0
;
if
(
tLogBuff
==
NULL
||
tLogBuff
->
stop
)
return
-
1
;
...
...
src/util/src/tqueue.c
浏览文件 @
4883bfb4
...
...
@@ -258,9 +258,9 @@ void taosCloseQset(taos_qset param) {
pthread_mutex_unlock
(
&
qset
->
mutex
);
pthread_mutex_destroy
(
&
qset
->
mutex
);
uTrace
(
"qset:%p is closed"
,
qset
);
tsem_destroy
(
&
qset
->
sem
);
free
(
qset
);
uTrace
(
"qset:%p is closed"
,
qset
);
}
// tsem_post 'qset->sem', so that reader threads waiting for it
...
...
src/util/src/tworker.c
浏览文件 @
4883bfb4
...
...
@@ -91,6 +91,6 @@ void *tWorkerAllocQueue(SWorkerPool *pPool, void *ahandle) {
}
void
tWorkerFreeQueue
(
SWorkerPool
*
pPool
,
void
*
pQueue
)
{
taosCloseQueue
(
pQueue
);
uDebug
(
"worker:%s, queue:%p is freed"
,
pPool
->
name
,
pQueue
);
taosCloseQueue
(
pQueue
);
}
tests/pytest/functions/queryTestCases-td3690.py
0 → 100644
浏览文件 @
4883bfb4
此差异已折叠。
点击以展开。
tests/pytest/functions/queryTestCases-td4082.py
0 → 100644
浏览文件 @
4883bfb4
此差异已折叠。
点击以展开。
tests/pytest/functions/queryTestCases-td4097.py
0 → 100644
浏览文件 @
4883bfb4
此差异已折叠。
点击以展开。
tests/pytest/functions/queryTestCases-td4288.py
0 → 100644
浏览文件 @
4883bfb4
此差异已折叠。
点击以展开。
tests/pytest/functions/queryTestCases-td4724.py
0 → 100644
浏览文件 @
4883bfb4
此差异已折叠。
点击以展开。
tests/pytest/functions/queryTestCases-td5790.py
0 → 100644
浏览文件 @
4883bfb4
此差异已折叠。
点击以展开。
tests/pytest/functions/queryTestCases-td5935.py
0 → 100644
浏览文件 @
4883bfb4
此差异已折叠。
点击以展开。
tests/pytest/functions/queryTestCases-td6068.py
0 → 100644
浏览文件 @
4883bfb4
此差异已折叠。
点击以展开。
tests/tsim/inc/sim.h
浏览文件 @
4883bfb4
...
...
@@ -135,7 +135,7 @@ typedef struct _script_t {
int32_t
numOfLines
;
// number of lines in the script
int32_t
bgScriptLen
;
char
fileName
[
MAX_FILE_NAME_LEN
];
// script file name
char
error
[
MAX_ERROR_LEN
];
char
error
[
TSDB_MAX_BINARY_LEN
+
100
];
char
*
optionBuffer
;
SCmdLine
*
lines
;
// command list
SVariable
variables
[
MAX_VAR_LEN
];
...
...
@@ -178,4 +178,4 @@ bool simExecuteLineInsertCmd(SScript *script, char *option);
bool
simExecuteLineInsertErrorCmd
(
SScript
*
script
,
char
*
option
);
void
simVisuallizeOption
(
SScript
*
script
,
char
*
src
,
char
*
dst
);
#endif
\ No newline at end of file
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录