Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
ad6681b4
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
未验证
提交
ad6681b4
编写于
1月 05, 2023
作者:
D
dapan1121
提交者:
GitHub
1月 05, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #19366 from taosdata/refact/submit_req_marks
fix:memory leak in schemaless
上级
936f282e
3645ae86
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
74 addition
and
41 deletion
+74
-41
source/client/inc/clientSml.h
source/client/inc/clientSml.h
+2
-0
source/client/src/clientSml.c
source/client/src/clientSml.c
+18
-0
source/client/src/clientSmlJson.c
source/client/src/clientSmlJson.c
+15
-7
source/client/src/clientSmlLine.c
source/client/src/clientSmlLine.c
+5
-4
source/client/src/clientSmlTelnet.c
source/client/src/clientSmlTelnet.c
+3
-2
source/libs/parser/src/parInsertSml.c
source/libs/parser/src/parInsertSml.c
+19
-2
tests/parallel_test/cases.task
tests/parallel_test/cases.task
+2
-2
utils/test/c/sml_test.c
utils/test/c/sml_test.c
+10
-24
未找到文件。
source/client/inc/clientSml.h
浏览文件 @
ad6681b4
...
...
@@ -182,6 +182,7 @@ typedef struct {
int8_t
offset
[
OTD_JSON_FIELDS_NUM
];
SSmlLineInfo
*
lines
;
// element is SSmlLineInfo
bool
parseJsonByLib
;
SArray
*
tagJsonArray
;
//
SArray
*
preLineTagKV
;
...
...
@@ -230,6 +231,7 @@ int64_t smlParseOpenTsdbTime(SSmlHandle *info, const char *data, int32
int32_t
smlClearForRerun
(
SSmlHandle
*
info
);
int32_t
smlParseValue
(
SSmlKv
*
pVal
,
SSmlMsgBuf
*
msg
);
uint8_t
smlGetTimestampLen
(
int64_t
num
);
void
clearColValArray
(
SArray
*
pCols
);
int32_t
smlParseInfluxString
(
SSmlHandle
*
info
,
char
*
sql
,
char
*
sqlEnd
,
SSmlLineInfo
*
elements
);
int32_t
smlParseTelnetString
(
SSmlHandle
*
info
,
char
*
sql
,
char
*
sqlEnd
,
SSmlLineInfo
*
elements
);
...
...
source/client/src/clientSml.c
浏览文件 @
ad6681b4
...
...
@@ -1024,6 +1024,16 @@ static void smlDestroyTableInfo(SSmlHandle *info, SSmlTableInfo *tag) {
taosMemoryFree
(
tag
);
}
void
clearColValArray
(
SArray
*
pCols
)
{
int32_t
num
=
taosArrayGetSize
(
pCols
);
for
(
int32_t
i
=
0
;
i
<
num
;
++
i
)
{
SColVal
*
pCol
=
taosArrayGet
(
pCols
,
i
);
if
(
TSDB_DATA_TYPE_NCHAR
==
pCol
->
type
)
{
taosMemoryFreeClear
(
pCol
->
value
.
pData
);
}
}
}
void
smlDestroyInfo
(
SSmlHandle
*
info
)
{
if
(
!
info
)
return
;
qDestroyQuery
(
info
->
pQuery
);
...
...
@@ -1053,6 +1063,12 @@ void smlDestroyInfo(SSmlHandle *info) {
// destroy info->pVgHash
taosHashCleanup
(
info
->
pVgHash
);
for
(
int
i
=
0
;
i
<
taosArrayGetSize
(
info
->
tagJsonArray
);
i
++
){
cJSON
*
tags
=
(
cJSON
*
)
taosArrayGetP
(
info
->
tagJsonArray
,
i
);
cJSON_Delete
(
tags
);
}
taosArrayDestroy
(
info
->
tagJsonArray
);
taosArrayDestroy
(
info
->
preLineTagKV
);
taosArrayDestroy
(
info
->
maxTagKVs
);
taosArrayDestroy
(
info
->
preLineColKV
);
...
...
@@ -1067,6 +1083,7 @@ void smlDestroyInfo(SSmlHandle *info) {
taosMemoryFree
(
info
->
lines
);
}
cJSON_Delete
(
info
->
root
);
taosMemoryFreeClear
(
info
);
}
...
...
@@ -1090,6 +1107,7 @@ SSmlHandle *smlBuildSmlInfo(TAOS *taos) {
info
->
pQuery
=
smlInitHandle
();
info
->
dataFormat
=
true
;
info
->
tagJsonArray
=
taosArrayInit
(
8
,
POINTER_BYTES
);
info
->
preLineTagKV
=
taosArrayInit
(
8
,
sizeof
(
SSmlKv
));
info
->
maxTagKVs
=
taosArrayInit
(
8
,
sizeof
(
SSmlKv
));
info
->
preLineColKV
=
taosArrayInit
(
8
,
sizeof
(
SSmlKv
));
...
...
source/client/src/clientSmlJson.c
浏览文件 @
ad6681b4
...
...
@@ -335,6 +335,9 @@ int smlJsonParseObjFirst(char **start, SSmlLineInfo *element, int8_t *offset){
(
*
start
)
++
;
}
}
if
(
*
(
*
start
)
==
'\0'
){
break
;
}
if
(
*
(
*
start
)
==
'}'
){
(
*
start
)
++
;
break
;
...
...
@@ -655,14 +658,14 @@ static int32_t smlParseTagsFromJSON(SSmlHandle *info, cJSON *tags, SSmlLineInfo
SSmlSTableMeta
*
sMeta
=
(
SSmlSTableMeta
*
)
nodeListGet
(
info
->
superTables
,
elements
->
measure
,
elements
->
measureLen
,
NULL
);
if
(
unlikely
(
sMeta
==
NULL
)){
sMeta
=
smlBuildSTableMeta
(
info
->
dataFormat
);
STableMeta
*
pTableMeta
=
smlGetMeta
(
info
,
elements
->
measure
,
elements
->
measureLen
);
sMeta
->
tableMeta
=
pTableMeta
;
if
(
pTableMeta
==
NULL
){
info
->
dataFormat
=
false
;
info
->
reRun
=
true
;
return
TSDB_CODE_SUCCESS
;
}
sMeta
=
smlBuildSTableMeta
(
info
->
dataFormat
);
sMeta
->
tableMeta
=
pTableMeta
;
nodeListSet
(
&
info
->
superTables
,
elements
->
measure
,
elements
->
measureLen
,
sMeta
,
NULL
);
}
info
->
currSTableMeta
=
sMeta
->
tableMeta
;
...
...
@@ -923,9 +926,6 @@ static int32_t smlParseJSONStringExt(SSmlHandle *info, cJSON *root, SSmlLineInfo
cJSON
*
tsJson
=
NULL
;
cJSON
*
valueJson
=
NULL
;
cJSON
*
tagsJson
=
NULL
;
char
*
rootStr
=
cJSON_PrintUnformatted
(
root
);
uError
(
"rootStr:%s"
,
rootStr
);
taosMemoryFree
(
rootStr
);
int32_t
size
=
cJSON_GetArraySize
(
root
);
// outmost json fields has to be exactly 4
...
...
@@ -956,6 +956,7 @@ static int32_t smlParseJSONStringExt(SSmlHandle *info, cJSON *root, SSmlLineInfo
}
// Parse tags
bool
needFree
=
info
->
dataFormat
;
elements
->
tags
=
cJSON_PrintUnformatted
(
tagsJson
);
elements
->
tagsLen
=
strlen
(
elements
->
tags
);
if
(
is_same_child_table_telnet
(
elements
,
&
info
->
preLine
)
!=
0
)
{
...
...
@@ -968,7 +969,7 @@ static int32_t smlParseJSONStringExt(SSmlHandle *info, cJSON *root, SSmlLineInfo
}
}
if
(
info
->
dataFormat
){
if
(
needFree
){
taosMemoryFree
(
elements
->
tags
);
elements
->
tags
=
NULL
;
}
...
...
@@ -994,6 +995,7 @@ static int32_t smlParseJSONStringExt(SSmlHandle *info, cJSON *root, SSmlLineInfo
if
(
ret
==
TSDB_CODE_SUCCESS
){
ret
=
smlBuildRow
(
info
->
currTableDataCtx
);
}
clearColValArray
(
info
->
currTableDataCtx
->
pValues
);
if
(
unlikely
(
ret
!=
TSDB_CODE_SUCCESS
))
{
smlBuildInvalidDataMsg
(
&
info
->
msgBuf
,
"smlBuildCol error"
,
NULL
);
return
ret
;
...
...
@@ -1095,6 +1097,11 @@ static int32_t smlParseJSONString(SSmlHandle *info, char **start, SSmlLineInfo *
if
(
unlikely
(
**
start
==
'\0'
&&
elements
->
measure
==
NULL
))
return
TSDB_CODE_SUCCESS
;
if
(
unlikely
(
IS_INVALID_TABLE_LEN
(
elements
->
measureLen
)))
{
smlBuildInvalidDataMsg
(
&
info
->
msgBuf
,
"measure is empty or too large than 192"
,
NULL
);
return
TSDB_CODE_TSC_INVALID_TABLE_ID_LENGTH
;
}
SSmlKv
kv
=
{.
key
=
VALUE
,
.
keyLen
=
VALUE_LEN
,
.
value
=
elements
->
cols
,
.
length
=
(
size_t
)
elements
->
colsLen
};
if
(
elements
->
colsLen
==
0
||
smlParseValue
(
&
kv
,
&
info
->
msgBuf
)
!=
TSDB_CODE_SUCCESS
)
{
uError
(
"SML:cols invalidate:%s"
,
elements
->
cols
);
...
...
@@ -1112,8 +1119,8 @@ static int32_t smlParseJSONString(SSmlHandle *info, char **start, SSmlLineInfo *
return
TSDB_CODE_TSC_INVALID_JSON
;
}
taosArrayPush
(
info
->
tagJsonArray
,
&
tagsJson
);
ret
=
smlParseTagsFromJSON
(
info
,
tagsJson
,
elements
);
cJSON_free
(
tagsJson
);
if
(
unlikely
(
ret
))
{
uError
(
"OTD:0x%"
PRIx64
" Unable to parse tags from JSON payload"
,
info
->
id
);
return
ret
;
...
...
@@ -1141,6 +1148,7 @@ static int32_t smlParseJSONString(SSmlHandle *info, char **start, SSmlLineInfo *
if
(
ret
==
TSDB_CODE_SUCCESS
){
ret
=
smlBuildRow
(
info
->
currTableDataCtx
);
}
clearColValArray
(
info
->
currTableDataCtx
->
pValues
);
if
(
unlikely
(
ret
!=
TSDB_CODE_SUCCESS
))
{
smlBuildInvalidDataMsg
(
&
info
->
msgBuf
,
"smlBuildCol error"
,
NULL
);
return
ret
;
...
...
source/client/src/clientSmlLine.c
浏览文件 @
ad6681b4
...
...
@@ -151,14 +151,14 @@ static int32_t smlParseTagKv(SSmlHandle *info, char **sql, char *sqlEnd,
SSmlSTableMeta
*
sMeta
=
(
SSmlSTableMeta
*
)
nodeListGet
(
info
->
superTables
,
currElement
->
measure
,
currElement
->
measureLen
,
NULL
);
if
(
unlikely
(
sMeta
==
NULL
)){
sMeta
=
smlBuildSTableMeta
(
info
->
dataFormat
);
STableMeta
*
pTableMeta
=
smlGetMeta
(
info
,
currElement
->
measure
,
currElement
->
measureLen
);
sMeta
->
tableMeta
=
pTableMeta
;
if
(
pTableMeta
==
NULL
){
info
->
dataFormat
=
false
;
info
->
reRun
=
true
;
return
TSDB_CODE_SUCCESS
;
}
sMeta
=
smlBuildSTableMeta
(
info
->
dataFormat
);
sMeta
->
tableMeta
=
pTableMeta
;
nodeListSet
(
&
info
->
superTables
,
currElement
->
measure
,
currElement
->
measureLen
,
sMeta
,
NULL
);
}
info
->
currSTableMeta
=
sMeta
->
tableMeta
;
...
...
@@ -353,14 +353,14 @@ static int32_t smlParseColKv(SSmlHandle *info, char **sql, char *sqlEnd,
SSmlSTableMeta
*
sMeta
=
(
SSmlSTableMeta
*
)
nodeListGet
(
info
->
superTables
,
currElement
->
measure
,
currElement
->
measureLen
,
NULL
);
if
(
unlikely
(
sMeta
==
NULL
)){
sMeta
=
smlBuildSTableMeta
(
info
->
dataFormat
);
STableMeta
*
pTableMeta
=
smlGetMeta
(
info
,
currElement
->
measure
,
currElement
->
measureLen
);
sMeta
->
tableMeta
=
pTableMeta
;
if
(
pTableMeta
==
NULL
){
info
->
dataFormat
=
false
;
info
->
reRun
=
true
;
return
TSDB_CODE_SUCCESS
;
}
sMeta
=
smlBuildSTableMeta
(
info
->
dataFormat
);
sMeta
->
tableMeta
=
pTableMeta
;
nodeListSet
(
&
info
->
superTables
,
currElement
->
measure
,
currElement
->
measureLen
,
sMeta
,
NULL
);
}
info
->
currSTableMeta
=
sMeta
->
tableMeta
;
...
...
@@ -646,6 +646,7 @@ int32_t smlParseInfluxString(SSmlHandle *info, char *sql, char *sqlEnd, SSmlLine
if
(
info
->
dataFormat
){
smlBuildCol
(
info
->
currTableDataCtx
,
info
->
currSTableMeta
->
schema
,
&
kv
,
0
);
smlBuildRow
(
info
->
currTableDataCtx
);
clearColValArray
(
info
->
currTableDataCtx
->
pValues
);
}
else
{
taosArraySet
(
elements
->
colArray
,
0
,
&
kv
);
}
...
...
source/client/src/clientSmlTelnet.c
浏览文件 @
ad6681b4
...
...
@@ -86,14 +86,14 @@ static int32_t smlParseTelnetTags(SSmlHandle *info, char *data, char *sqlEnd, SS
SSmlSTableMeta
*
sMeta
=
(
SSmlSTableMeta
*
)
nodeListGet
(
info
->
superTables
,
elements
->
measure
,
elements
->
measureLen
,
NULL
);
if
(
unlikely
(
sMeta
==
NULL
)){
sMeta
=
smlBuildSTableMeta
(
info
->
dataFormat
);
STableMeta
*
pTableMeta
=
smlGetMeta
(
info
,
elements
->
measure
,
elements
->
measureLen
);
sMeta
->
tableMeta
=
pTableMeta
;
if
(
pTableMeta
==
NULL
){
info
->
dataFormat
=
false
;
info
->
reRun
=
true
;
return
TSDB_CODE_SUCCESS
;
}
sMeta
=
smlBuildSTableMeta
(
info
->
dataFormat
);
sMeta
->
tableMeta
=
pTableMeta
;
nodeListSet
(
&
info
->
superTables
,
elements
->
measure
,
elements
->
measureLen
,
sMeta
,
NULL
);
}
info
->
currSTableMeta
=
sMeta
->
tableMeta
;
...
...
@@ -324,6 +324,7 @@ int32_t smlParseTelnetString(SSmlHandle *info, char *sql, char *sqlEnd, SSmlLine
if
(
ret
==
TSDB_CODE_SUCCESS
){
ret
=
smlBuildRow
(
info
->
currTableDataCtx
);
}
clearColValArray
(
info
->
currTableDataCtx
->
pValues
);
if
(
unlikely
(
ret
!=
TSDB_CODE_SUCCESS
))
{
smlBuildInvalidDataMsg
(
&
info
->
msgBuf
,
"smlBuildCol error"
,
NULL
);
return
ret
;
...
...
source/libs/parser/src/parInsertSml.c
浏览文件 @
ad6681b4
...
...
@@ -18,6 +18,16 @@
#include "parToken.h"
#include "ttime.h"
static
void
clearColValArray
(
SArray
*
pCols
)
{
int32_t
num
=
taosArrayGetSize
(
pCols
);
for
(
int32_t
i
=
0
;
i
<
num
;
++
i
)
{
SColVal
*
pCol
=
taosArrayGet
(
pCols
,
i
);
if
(
TSDB_DATA_TYPE_NCHAR
==
pCol
->
type
)
{
taosMemoryFreeClear
(
pCol
->
value
.
pData
);
}
}
}
int32_t
qCreateSName
(
SName
*
pName
,
const
char
*
pTableName
,
int32_t
acctId
,
char
*
dbName
,
char
*
msgBuf
,
int32_t
msgBufLen
)
{
SMsgBuf
msg
=
{.
buf
=
msgBuf
,
.
len
=
msgBufLen
};
...
...
@@ -189,7 +199,7 @@ int32_t smlBuildCol(STableDataCxt* pTableCxt, SSchema* schema, void* data, int32
SSchema
*
pColSchema
=
schema
+
index
;
SColVal
*
pVal
=
taosArrayGet
(
pTableCxt
->
pValues
,
index
);
SSmlKv
*
kv
=
(
SSmlKv
*
)
data
;
if
(
kv
->
keyLen
!=
strlen
(
pColSchema
->
name
)
||
memcmp
(
kv
->
key
,
pColSchema
->
name
,
kv
->
keyLen
)
!=
0
){
if
(
kv
->
keyLen
!=
strlen
(
pColSchema
->
name
)
||
memcmp
(
kv
->
key
,
pColSchema
->
name
,
kv
->
keyLen
)
!=
0
||
kv
->
type
!=
pColSchema
->
type
){
ret
=
TSDB_CODE_SML_INVALID_DATA
;
goto
end
;
}
...
...
@@ -207,9 +217,11 @@ int32_t smlBuildCol(STableDataCxt* pTableCxt, SSchema* schema, void* data, int32
}
if
(
!
taosMbsToUcs4
(
kv
->
value
,
kv
->
length
,
(
TdUcs4
*
)
pUcs4
,
size
,
&
len
))
{
if
(
errno
==
E2BIG
)
{
taosMemoryFree
(
pUcs4
);
ret
=
TSDB_CODE_PAR_VALUE_TOO_LONG
;
goto
end
;
}
taosMemoryFree
(
pUcs4
);
ret
=
TSDB_CODE_TSC_INVALID_VALUE
;
goto
end
;
}
...
...
@@ -316,7 +328,10 @@ int32_t smlBindData(SQuery* query, bool dataFormat, SArray* tags, SArray* colsSc
continue
;
}
SSmlKv
*
kv
=
*
(
SSmlKv
**
)
p
;
if
(
kv
->
type
!=
pColSchema
->
type
){
ret
=
buildInvalidOperationMsg
(
&
pBuf
,
"kv type not equal to col type"
);
goto
end
;
}
if
(
pColSchema
->
type
==
TSDB_DATA_TYPE_TIMESTAMP
)
{
kv
->
i
=
convertTimePrecision
(
kv
->
i
,
TSDB_TIME_PRECISION_NANO
,
pTableMeta
->
tableInfo
.
precision
);
}
...
...
@@ -354,10 +369,12 @@ int32_t smlBindData(SQuery* query, bool dataFormat, SArray* tags, SArray* colsSc
goto
end
;
}
insCheckTableDataOrder
(
pTableCxt
,
TD_ROW_KEY
(
*
pRow
));
clearColValArray
(
pTableCxt
->
pValues
);
}
end:
insDestroyBoundColInfo
(
&
bindTags
);
tdDestroySVCreateTbReq
(
pCreateTblReq
);
taosMemoryFree
(
pCreateTblReq
);
taosArrayDestroy
(
tagName
);
return
ret
;
...
...
tests/parallel_test/cases.task
浏览文件 @
ad6681b4
...
...
@@ -426,8 +426,8 @@
,,n,system-test,python3 ./test.py -f 0-others/compatibility.py
,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_database.py
,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/influxdb_line_taosc_insert.py
,,
n
,system-test,./pytest.sh python3 ./test.py -f 1-insert/opentsdb_telnet_line_taosc_insert.py
,,
n
,system-test,./pytest.sh python3 ./test.py -f 1-insert/opentsdb_json_taosc_insert.py
,,
y
,system-test,./pytest.sh python3 ./test.py -f 1-insert/opentsdb_telnet_line_taosc_insert.py
,,
y
,system-test,./pytest.sh python3 ./test.py -f 1-insert/opentsdb_json_taosc_insert.py
,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_stmt_muti_insert_query.py
,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_stmt_set_tbname_tag.py
,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_stable.py
...
...
utils/test/c/sml_test.c
浏览文件 @
ad6681b4
...
...
@@ -211,8 +211,7 @@ int smlProcess_json3_Test() {
taos_free_result
(
pRes
);
const
char
*
sql
[]
=
{
// "[{\"metric\":\"sys.cpu.nice3\",\"timestamp\":0,\"value\":\"18\",\"tags\":{\"host\":\"web01\",\"id\":\"t1\",\"dc\":\"lga\"}}]"
"{
\"
metric
\"
:
\"
dcxnmr
\"
,
\"
timestamp
\"
: {
\"
value
\"
: 1626006833639000000,
\"
type
\"
:
\"
ns
\"
},
\"
value
\"
: {
\"
value
\"
: false,
\"
type
\"
:
\"
bool
\"
},
\"
tags
\"
: {
\"
t0
\"
: {
\"
value
\"
: false,
\"
type
\"
:
\"
bool
\"
},
\"
t1
\"
: {
\"
value
\"
: 127,
\"
type
\"
:
\"
tinyint
\"
},
\"
t2
\"
: {
\"
value
\"
: 32767,
\"
type
\"
:
\"
smallint
\"
},
\"
t3
\"
: {
\"
value
\"
: 2147483647,
\"
type
\"
:
\"
int
\"
},
\"
t4
\"
: {
\"
value
\"
: 9223372036854775807,
\"
type
\"
:
\"
bigint
\"
},
\"
t5
\"
: {
\"
value
\"
: 11.12345027923584,
\"
type
\"
:
\"
float
\"
},
\"
t6
\"
: {
\"
value
\"
: 22.123456789,
\"
type
\"
:
\"
double
\"
},
\"
t7
\"
: {
\"
value
\"
:
\"
binaryTagValue
\"
,
\"
type
\"
:
\"
binary
\"
},
\"
t8
\"
: {
\"
value
\"
:
\"
abc{aaa
\"
,
\"
type
\"
:
\"
nchar
\"
}}}"
"[{
\"
metric
\"
:
\"
sys.cpu.nice3
\"
,
\"
timestamp
\"
:0,
\"
value
\"
:
\"
18
\"
,
\"
tags
\"
:{
\"
host
\"
:
\"
web01
\"
,
\"
id
\"
:
\"
t1
\"
,
\"
dc
\"
:
\"
lga
\"
}}]"
};
char
*
sql1
[
1
]
=
{
0
};
for
(
int
i
=
0
;
i
<
1
;
i
++
){
...
...
@@ -741,26 +740,11 @@ int sml_dup_time_Test() {
taos_free_result
(
pRes
);
const
char
*
sql
[]
=
{
//"test_ms,t0=t c0=f 1626006833641",
"ubzlsr,id=qmtcvgd,t0=t,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11."
"12345f32,t6=22.123456789f64,t7=
\"
binaryTagValue
\"
,t8=L
\"
ncharTagValue
\"
"
"c0=false,c1=1i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22."
"123456789f64,c7=
\"
xcxvwjvf
\"
,c8=L
\"
ncharColValue
\"
,c9=7u64 1626006833639000000"
,
"ubzlsr,id=qmtcvgd,t0=t,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11."
"12345f32,t6=22.123456789f64,t7=
\"
binaryTagValue
\"
,t8=L
\"
ncharTagValue
\"
"
"c0=T,c1=2i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22."
"123456789f64,c7=
\"
fixrzcuq
\"
,c8=L
\"
ncharColValue
\"
,c9=7u64 1626006834639000000"
,
"ubzlsr,id=qmtcvgd,t0=t,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11."
"12345f32,t6=22.123456789f64,t7=
\"
binaryTagValue
\"
,t8=L
\"
ncharTagValue
\"
"
"c0=t,c1=3i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22."
"123456789f64,c7=
\"
iupzdqub
\"
,c8=L
\"
ncharColValue
\"
,c9=7u64 1626006835639000000"
,
"ubzlsr,id=qmtcvgd,t0=t,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11."
"12345f32,t6=22.123456789f64,t7=
\"
binaryTagValue
\"
,t8=L
\"
ncharTagValue
\"
"
"c0=t,c1=4i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22."
"123456789f64,c7=
\"
yvvtzzof
\"
,c8=L
\"
ncharColValue
\"
,c9=7u64 1626006836639000000"
,
"ubzlsr,id=qmtcvgd,t0=t,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11."
"12345f32,t6=22.123456789f64,t7=
\"
binaryTagValue
\"
,t8=L
\"
ncharTagValue
\"
"
"c0=t,c1=5i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22."
"123456789f64,c7=
\"
vbxpilkj
\"
,c8=L
\"
ncharColValue
\"
,c9=7u64 1626006837639000000"
};
"ubzlsr,id=qmtcvgd,t0=t,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7=
\"
binaryTagValue
\"
,t8=L
\"
ncharTagValue
\"
c0=f,c1=1i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7=
\"
xcxvwjvf
\"
,c8=L
\"
ncharColValue
\"
,c9=7u64 1626006833639000000"
,
"ubzlsr,id=qmtcvgd,t0=t,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7=
\"
binaryTagValue
\"
,t8=L
\"
ncharTagValue
\"
c0=T,c1=2i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7=
\"
fixrzcuq
\"
,c8=L
\"
ncharColValue
\"
,c9=7u64 1626006834639000000"
,
"ubzlsr,id=qmtcvgd,t0=t,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7=
\"
binaryTagValue
\"
,t8=L
\"
ncharTagValue
\"
c0=t,c1=3i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7=
\"
iupzdqub
\"
,c8=L
\"
ncharColValue
\"
,c9=7u64 1626006835639000000"
,
"ubzlsr,id=qmtcvgd,t0=t,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7=
\"
binaryTagValue
\"
,t8=L
\"
ncharTagValue
\"
c0=t,c1=4i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7=
\"
yvvtzzof
\"
,c8=L
\"
ncharColValue
\"
,c9=7u64 1626006836639000000"
,
"ubzlsr,id=qmtcvgd,t0=t,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7=
\"
binaryTagValue
\"
,t8=L
\"
ncharTagValue
\"
c0=t,c1=5i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7=
\"
vbxpilkj
\"
,c8=L
\"
ncharColValue
\"
,c9=7u64 1626006837639000000"
};
pRes
=
taos_query
(
taos
,
"use sml_db"
);
taos_free_result
(
pRes
);
...
...
@@ -943,8 +927,10 @@ int sml_ttl_Test() {
pRes
=
taos_query
(
taos
,
"select `ttl` from information_schema.ins_tables where table_name='t_be97833a0e1f523fcdaeb6291d6fdf27'"
);
printf
(
"%s result2:%s
\n
"
,
__FUNCTION__
,
taos_errstr
(
pRes
));
TAOS_ROW
row
=
taos_fetch_row
(
pRes
);
int32_t
ttl
=
*
(
int32_t
*
)
row
[
0
];
ASSERT
(
ttl
==
20
);
if
(
row
!=
NULL
&&
*
row
!=
NULL
){
int32_t
ttl
=
*
(
int32_t
*
)
row
[
0
];
ASSERT
(
ttl
==
20
);
}
int
code
=
taos_errno
(
pRes
);
taos_free_result
(
pRes
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录