Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
176b5abb
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看板
未验证
提交
176b5abb
编写于
1月 03, 2023
作者:
wmmhello
提交者:
GitHub
1月 03, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #19341 from taosdata/refact/submit_req_marks
fix:Refact/submit req marks
上级
0260512d
d4f69eb5
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
14 addition
and
8 deletion
+14
-8
source/client/src/clientSml.c
source/client/src/clientSml.c
+1
-0
source/client/src/clientSmlJson.c
source/client/src/clientSmlJson.c
+10
-4
tests/parallel_test/cases.task
tests/parallel_test/cases.task
+2
-2
utils/test/c/sml_test.c
utils/test/c/sml_test.c
+1
-2
未找到文件。
source/client/src/clientSml.c
浏览文件 @
176b5abb
...
@@ -1067,6 +1067,7 @@ void smlDestroyInfo(SSmlHandle *info) {
...
@@ -1067,6 +1067,7 @@ void smlDestroyInfo(SSmlHandle *info) {
taosMemoryFree
(
info
->
lines
);
taosMemoryFree
(
info
->
lines
);
}
}
cJSON_Delete
(
info
->
root
);
taosMemoryFreeClear
(
info
);
taosMemoryFreeClear
(
info
);
}
}
...
...
source/client/src/clientSmlJson.c
浏览文件 @
176b5abb
...
@@ -335,6 +335,9 @@ int smlJsonParseObjFirst(char **start, SSmlLineInfo *element, int8_t *offset){
...
@@ -335,6 +335,9 @@ int smlJsonParseObjFirst(char **start, SSmlLineInfo *element, int8_t *offset){
(
*
start
)
++
;
(
*
start
)
++
;
}
}
}
}
if
(
*
(
*
start
)
==
'\0'
){
break
;
}
if
(
*
(
*
start
)
==
'}'
){
if
(
*
(
*
start
)
==
'}'
){
(
*
start
)
++
;
(
*
start
)
++
;
break
;
break
;
...
@@ -923,9 +926,6 @@ static int32_t smlParseJSONStringExt(SSmlHandle *info, cJSON *root, SSmlLineInfo
...
@@ -923,9 +926,6 @@ static int32_t smlParseJSONStringExt(SSmlHandle *info, cJSON *root, SSmlLineInfo
cJSON
*
tsJson
=
NULL
;
cJSON
*
tsJson
=
NULL
;
cJSON
*
valueJson
=
NULL
;
cJSON
*
valueJson
=
NULL
;
cJSON
*
tagsJson
=
NULL
;
cJSON
*
tagsJson
=
NULL
;
char
*
rootStr
=
cJSON_PrintUnformatted
(
root
);
uError
(
"rootStr:%s"
,
rootStr
);
taosMemoryFree
(
rootStr
);
int32_t
size
=
cJSON_GetArraySize
(
root
);
int32_t
size
=
cJSON_GetArraySize
(
root
);
// outmost json fields has to be exactly 4
// outmost json fields has to be exactly 4
...
@@ -956,6 +956,7 @@ static int32_t smlParseJSONStringExt(SSmlHandle *info, cJSON *root, SSmlLineInfo
...
@@ -956,6 +956,7 @@ static int32_t smlParseJSONStringExt(SSmlHandle *info, cJSON *root, SSmlLineInfo
}
}
// Parse tags
// Parse tags
bool
needFree
=
info
->
dataFormat
;
elements
->
tags
=
cJSON_PrintUnformatted
(
tagsJson
);
elements
->
tags
=
cJSON_PrintUnformatted
(
tagsJson
);
elements
->
tagsLen
=
strlen
(
elements
->
tags
);
elements
->
tagsLen
=
strlen
(
elements
->
tags
);
if
(
is_same_child_table_telnet
(
elements
,
&
info
->
preLine
)
!=
0
)
{
if
(
is_same_child_table_telnet
(
elements
,
&
info
->
preLine
)
!=
0
)
{
...
@@ -968,7 +969,7 @@ static int32_t smlParseJSONStringExt(SSmlHandle *info, cJSON *root, SSmlLineInfo
...
@@ -968,7 +969,7 @@ static int32_t smlParseJSONStringExt(SSmlHandle *info, cJSON *root, SSmlLineInfo
}
}
}
}
if
(
info
->
dataFormat
){
if
(
needFree
){
taosMemoryFree
(
elements
->
tags
);
taosMemoryFree
(
elements
->
tags
);
elements
->
tags
=
NULL
;
elements
->
tags
=
NULL
;
}
}
...
@@ -1095,6 +1096,11 @@ static int32_t smlParseJSONString(SSmlHandle *info, char **start, SSmlLineInfo *
...
@@ -1095,6 +1096,11 @@ static int32_t smlParseJSONString(SSmlHandle *info, char **start, SSmlLineInfo *
if
(
unlikely
(
**
start
==
'\0'
&&
elements
->
measure
==
NULL
))
return
TSDB_CODE_SUCCESS
;
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
};
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
)
{
if
(
elements
->
colsLen
==
0
||
smlParseValue
(
&
kv
,
&
info
->
msgBuf
)
!=
TSDB_CODE_SUCCESS
)
{
uError
(
"SML:cols invalidate:%s"
,
elements
->
cols
);
uError
(
"SML:cols invalidate:%s"
,
elements
->
cols
);
...
...
tests/parallel_test/cases.task
浏览文件 @
176b5abb
...
@@ -423,8 +423,8 @@
...
@@ -423,8 +423,8 @@
,,n,system-test,python3 ./test.py -f 0-others/compatibility.py
,,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/alter_database.py
,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/influxdb_line_taosc_insert.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
,,
y
,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_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_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/test_stmt_set_tbname_tag.py
,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_stable.py
,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_stable.py
...
...
utils/test/c/sml_test.c
浏览文件 @
176b5abb
...
@@ -211,8 +211,7 @@ int smlProcess_json3_Test() {
...
@@ -211,8 +211,7 @@ int smlProcess_json3_Test() {
taos_free_result
(
pRes
);
taos_free_result
(
pRes
);
const
char
*
sql
[]
=
{
const
char
*
sql
[]
=
{
// "[{\"metric\":\"sys.cpu.nice3\",\"timestamp\":0,\"value\":\"18\",\"tags\":{\"host\":\"web01\",\"id\":\"t1\",\"dc\":\"lga\"}}]"
"[{
\"
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
\"
}}}"
};
};
char
*
sql1
[
1
]
=
{
0
};
char
*
sql1
[
1
]
=
{
0
};
for
(
int
i
=
0
;
i
<
1
;
i
++
){
for
(
int
i
=
0
;
i
<
1
;
i
++
){
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录