Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
da4d0f4e
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
da4d0f4e
编写于
10月 27, 2021
作者:
G
Ganlin Zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[schemaless] modified test cases
上级
8a8b7d71
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
130 addition
and
123 deletion
+130
-123
tests/examples/c/apitest.c
tests/examples/c/apitest.c
+17
-2
tests/pytest/insert/insertTelnetLines.py
tests/pytest/insert/insertTelnetLines.py
+57
-61
tests/script/api/openTSDBTest.c
tests/script/api/openTSDBTest.c
+56
-60
未找到文件。
tests/examples/c/apitest.c
浏览文件 @
da4d0f4e
...
...
@@ -15,7 +15,7 @@ static void prepare_data(TAOS* taos) {
result
=
taos_query
(
taos
,
"drop database if exists test;"
);
taos_free_result
(
result
);
usleep
(
100000
);
result
=
taos_query
(
taos
,
"create database test precision '
u
s';"
);
result
=
taos_query
(
taos
,
"create database test precision '
n
s';"
);
taos_free_result
(
result
);
usleep
(
100000
);
taos_select_db
(
taos
,
"test"
);
...
...
@@ -293,7 +293,7 @@ void verify_schema_less(TAOS* taos) {
result
=
taos_query
(
taos
,
"drop database if exists test;"
);
taos_free_result
(
result
);
usleep
(
100000
);
result
=
taos_query
(
taos
,
"create database test precision '
us' update 1
;"
);
result
=
taos_query
(
taos
,
"create database test precision '
ns' update 1 keep 36500
;"
);
taos_free_result
(
result
);
usleep
(
100000
);
...
...
@@ -401,6 +401,21 @@ void verify_schema_less(TAOS* taos) {
}
taos_free_result
(
result
);
//Test timestamp precision
char
*
lines7
[]
=
{
"stts,t1=10i64,t2=4f64,t3=
\"
t3
\"
c1=3i64,c3=L
\"
passit
\"
,c2=false,c4=4f64 1"
,
};
for
(
int
precision
=
TSDB_SML_TIMESTAMP_HOURS
;
precision
<=
TSDB_SML_TIMESTAMP_NANO_SECONDS
;
++
precision
)
{
result
=
taos_schemaless_insert
(
taos
,
lines7
,
1
,
TSDB_SML_LINE_PROTOCOL
,
precision
);
code
=
taos_errno
(
result
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
affected_rows
=
taos_affected_rows
(
result
);
printf
(
"
\033
[31m [lines7_%d]taos_schemaless_insert failed, code: %d,%s, affected rows:%d
\033
[0m
\n
"
,
precision
,
code
,
taos_errstr
(
result
),
affected_rows
);
}
taos_free_result
(
result
);
}
}
int
main
(
int
argc
,
char
*
argv
[])
{
...
...
tests/pytest/insert/insertTelnetLines.py
浏览文件 @
da4d0f4e
...
...
@@ -32,10 +32,10 @@ class TDTestCase:
### metric ###
print
(
"============= step1 : test metric ================"
)
lines0
=
[
"stb0_0 1626006833639
000000ns
4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
"stb0_1 1626006833639
000000ns
4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
"stb0_2 1626006833639
000000ns
4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
"`.stb0.3.` 1626006833639
000000ns
4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
"stb0_0 1626006833639 4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
"stb0_1 1626006833639 4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
"stb0_2 1626006833639 4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
"`.stb0.3.` 1626006833639 4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
]
code
=
self
.
_conn
.
schemaless_insert
(
lines0
,
TDSmlProtocolType
.
TELNET
.
value
,
TDSmlTimestampType
.
NOT_CONFIGURED
.
value
)
...
...
@@ -59,28 +59,24 @@ class TDTestCase:
### timestamp ###
print
(
"============= step2 : test timestamp ================"
)
lines1
=
[
"stb1 1626006833s 1i8 host=
\"
host0
\"
"
,
"stb1 1626006833639000000ns 2i8 host=
\"
host0
\"
"
,
"stb1 1626006833640000us 3i8 host=
\"
host0
\"
"
,
"stb1 1626006833641 4i8 host=
\"
host0
\"
"
,
"stb1 1626006834 5i8 host=
\"
host0
\"
"
,
"stb1 1626006833651ms 6i8 host=
\"
host0
\"
"
,
"stb1 0 7i8 host=
\"
host0
\"
"
,
"stb1 1626006833641 1i8 host=
\"
host0
\"
"
,
"stb1 1626006834 2i8 host=
\"
host0
\"
"
,
"stb1 0 3i8 host=
\"
host0
\"
"
,
]
code
=
self
.
_conn
.
schemaless_insert
(
lines1
,
TDSmlProtocolType
.
TELNET
.
value
,
TDSmlTimestampType
.
NOT_CONFIGURED
.
value
)
print
(
"schemaless_insert result {}"
.
format
(
code
))
tdSql
.
query
(
"select * from stb1"
)
tdSql
.
checkRows
(
7
)
tdSql
.
checkRows
(
3
)
### metric value ###
print
(
"============= step3 : test metric value ================"
)
#tinyint
lines2_0
=
[
"stb2_0 1626006833651
ms
-127i8 host=
\"
host0
\"
"
,
"stb2_0 1626006833652
ms
127i8 host=
\"
host0
\"
"
"stb2_0 1626006833651 -127i8 host=
\"
host0
\"
"
,
"stb2_0 1626006833652 127i8 host=
\"
host0
\"
"
]
code
=
self
.
_conn
.
schemaless_insert
(
lines2_0
,
TDSmlProtocolType
.
TELNET
.
value
,
TDSmlTimestampType
.
NOT_CONFIGURED
.
value
)
print
(
"schemaless_insert result {}"
.
format
(
code
))
...
...
@@ -94,8 +90,8 @@ class TDTestCase:
#smallint
lines2_1
=
[
"stb2_1 1626006833651
ms
-32767i16 host=
\"
host0
\"
"
,
"stb2_1 1626006833652
ms
32767i16 host=
\"
host0
\"
"
"stb2_1 1626006833651 -32767i16 host=
\"
host0
\"
"
,
"stb2_1 1626006833652 32767i16 host=
\"
host0
\"
"
]
code
=
self
.
_conn
.
schemaless_insert
(
lines2_1
,
TDSmlProtocolType
.
TELNET
.
value
,
TDSmlTimestampType
.
NOT_CONFIGURED
.
value
)
print
(
"schemaless_insert result {}"
.
format
(
code
))
...
...
@@ -109,8 +105,8 @@ class TDTestCase:
#int
lines2_2
=
[
"stb2_2 1626006833651
ms
-2147483647i32 host=
\"
host0
\"
"
,
"stb2_2 1626006833652
ms
2147483647i32 host=
\"
host0
\"
"
"stb2_2 1626006833651 -2147483647i32 host=
\"
host0
\"
"
,
"stb2_2 1626006833652 2147483647i32 host=
\"
host0
\"
"
]
code
=
self
.
_conn
.
schemaless_insert
(
lines2_2
,
TDSmlProtocolType
.
TELNET
.
value
,
TDSmlTimestampType
.
NOT_CONFIGURED
.
value
)
...
...
@@ -125,8 +121,8 @@ class TDTestCase:
#bigint
lines2_3
=
[
"stb2_3 1626006833651
ms
-9223372036854775807i64 host=
\"
host0
\"
"
,
"stb2_3 1626006833652
ms
9223372036854775807i64 host=
\"
host0
\"
"
"stb2_3 1626006833651 -9223372036854775807i64 host=
\"
host0
\"
"
,
"stb2_3 1626006833652 9223372036854775807i64 host=
\"
host0
\"
"
]
code
=
self
.
_conn
.
schemaless_insert
(
lines2_3
,
TDSmlProtocolType
.
TELNET
.
value
,
TDSmlTimestampType
.
NOT_CONFIGURED
.
value
)
...
...
@@ -141,16 +137,16 @@ class TDTestCase:
#float
lines2_4
=
[
"stb2_4 1626006833610
ms
3f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833620
ms
-3f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833630
ms
3.4f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833640
ms
-3.4f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833650
ms
3.4E10f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833660
ms
-3.4e10f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833670
ms
3.4E+2f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833680
ms
-3.4e-2f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833700
ms
3.4E38f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833710
ms
-3.4E38f32 host=
\"
host0
\"
"
"stb2_4 1626006833610 3f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833620 -3f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833630 3.4f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833640 -3.4f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833650 3.4E10f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833660 -3.4e10f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833670 3.4E+2f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833680 -3.4e-2f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833700 3.4E38f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833710 -3.4E38f32 host=
\"
host0
\"
"
]
code
=
self
.
_conn
.
schemaless_insert
(
lines2_4
,
TDSmlProtocolType
.
TELNET
.
value
,
TDSmlTimestampType
.
NOT_CONFIGURED
.
value
)
...
...
@@ -165,17 +161,17 @@ class TDTestCase:
#double
lines2_5
=
[
"stb2_5 1626006833610
ms
3f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833620
ms
-3f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833630
ms
3.4f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833640
ms
-3.4f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833650
ms
3.4E10f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833660
ms
-3.4e10f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833670
ms
3.4E+2f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833680
ms
-3.4e-2f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833690
ms
1.7E308f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833700
ms
-1.7E308f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833710
ms
3 host=
\"
host0
\"
"
"stb2_5 1626006833610 3f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833620 -3f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833630 3.4f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833640 -3.4f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833650 3.4E10f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833660 -3.4e10f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833670 3.4E+2f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833680 -3.4e-2f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833690 1.7E308f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833700 -1.7E308f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833710 3 host=
\"
host0
\"
"
]
code
=
self
.
_conn
.
schemaless_insert
(
lines2_5
,
TDSmlProtocolType
.
TELNET
.
value
,
TDSmlTimestampType
.
NOT_CONFIGURED
.
value
)
...
...
@@ -190,16 +186,16 @@ class TDTestCase:
#bool
lines2_6
=
[
"stb2_6 1626006833610
ms
t host=
\"
host0
\"
"
,
"stb2_6 1626006833620
ms
T host=
\"
host0
\"
"
,
"stb2_6 1626006833630
ms
true host=
\"
host0
\"
"
,
"stb2_6 1626006833640
ms
True host=
\"
host0
\"
"
,
"stb2_6 1626006833650
ms
TRUE host=
\"
host0
\"
"
,
"stb2_6 1626006833660
ms
f host=
\"
host0
\"
"
,
"stb2_6 1626006833670
ms
F host=
\"
host0
\"
"
,
"stb2_6 1626006833680
ms
false host=
\"
host0
\"
"
,
"stb2_6 1626006833690
ms
False host=
\"
host0
\"
"
,
"stb2_6 1626006833700
ms
FALSE host=
\"
host0
\"
"
"stb2_6 1626006833610 t host=
\"
host0
\"
"
,
"stb2_6 1626006833620 T host=
\"
host0
\"
"
,
"stb2_6 1626006833630 true host=
\"
host0
\"
"
,
"stb2_6 1626006833640 True host=
\"
host0
\"
"
,
"stb2_6 1626006833650 TRUE host=
\"
host0
\"
"
,
"stb2_6 1626006833660 f host=
\"
host0
\"
"
,
"stb2_6 1626006833670 F host=
\"
host0
\"
"
,
"stb2_6 1626006833680 false host=
\"
host0
\"
"
,
"stb2_6 1626006833690 False host=
\"
host0
\"
"
,
"stb2_6 1626006833700 FALSE host=
\"
host0
\"
"
]
code
=
self
.
_conn
.
schemaless_insert
(
lines2_6
,
TDSmlProtocolType
.
TELNET
.
value
,
TDSmlTimestampType
.
NOT_CONFIGURED
.
value
)
...
...
@@ -214,9 +210,9 @@ class TDTestCase:
#binary
lines2_7
=
[
"stb2_7 1626006833610
ms
\"
binary_val .!@#$%^&*
\"
host=
\"
host0
\"
"
,
"stb2_7 1626006833620
ms
\"
binary_val.:;,./?|+-=
\"
host=
\"
host0
\"
"
,
"stb2_7 1626006833630
ms
\"
binary_val.()[]{}<>
\"
host=
\"
host0
\"
"
"stb2_7 1626006833610
\"
binary_val .!@#$%^&*
\"
host=
\"
host0
\"
"
,
"stb2_7 1626006833620
\"
binary_val.:;,./?|+-=
\"
host=
\"
host0
\"
"
,
"stb2_7 1626006833630
\"
binary_val.()[]{}<>
\"
host=
\"
host0
\"
"
]
code
=
self
.
_conn
.
schemaless_insert
(
lines2_7
,
TDSmlProtocolType
.
TELNET
.
value
,
TDSmlTimestampType
.
NOT_CONFIGURED
.
value
)
...
...
@@ -231,8 +227,8 @@ class TDTestCase:
#nchar
lines2_8
=
[
"stb2_8 1626006833610
ms
L
\"
nchar_val 数值一
\"
host=
\"
host0
\"
"
,
"stb2_8 1626006833620
ms
L
\"
nchar_val数值二
\"
host=
\"
host0
\"
"
"stb2_8 1626006833610 L
\"
nchar_val 数值一
\"
host=
\"
host0
\"
"
,
"stb2_8 1626006833620 L
\"
nchar_val数值二
\"
host=
\"
host0
\"
"
]
code
=
self
.
_conn
.
schemaless_insert
(
lines2_8
,
TDSmlProtocolType
.
TELNET
.
value
,
TDSmlTimestampType
.
NOT_CONFIGURED
.
value
)
...
...
@@ -249,8 +245,8 @@ class TDTestCase:
print
(
"============= step3 : test tags ================"
)
#tag value types
lines3_0
=
[
"stb3_0 1626006833610
ms
1 t1=127i8 t2=32767i16 t3=2147483647i32 t4=9223372036854775807i64 t5=3.4E38f32 t6=1.7E308f64 t7=true t8=
\"
binary_val_1
\"
t9=L
\"
标签值1
\"
"
,
"stb3_0 1626006833610
ms
2 t1=-127i8 t2=-32767i16 t3=-2147483647i32 t4=-9223372036854775807i64 t5=-3.4E38f32 t6=-1.7E308f64 t7=false t8=
\"
binary_val_2
\"
t9=L
\"
标签值2
\"
"
"stb3_0 1626006833610 1 t1=127i8 t2=32767i16 t3=2147483647i32 t4=9223372036854775807i64 t5=3.4E38f32 t6=1.7E308f64 t7=true t8=
\"
binary_val_1
\"
t9=L
\"
标签值1
\"
"
,
"stb3_0 1626006833610 2 t1=-127i8 t2=-32767i16 t3=-2147483647i32 t4=-9223372036854775807i64 t5=-3.4E38f32 t6=-1.7E308f64 t7=false t8=
\"
binary_val_2
\"
t9=L
\"
标签值2
\"
"
]
code
=
self
.
_conn
.
schemaless_insert
(
lines3_0
,
TDSmlProtocolType
.
TELNET
.
value
,
TDSmlTimestampType
.
NOT_CONFIGURED
.
value
)
...
...
@@ -292,9 +288,9 @@ class TDTestCase:
#tag ID as child table name
lines3_1
=
[
"stb3_1 1626006833610
ms
1 id=child_table1 host=host1"
,
"stb3_1 1626006833610
ms
2 host=host2 iD=child_table2"
,
"stb3_1 1626006833610
ms
3 ID=child_table3 host=host3"
"stb3_1 1626006833610 1 id=child_table1 host=host1"
,
"stb3_1 1626006833610 2 host=host2 iD=child_table2"
,
"stb3_1 1626006833610 3 ID=child_table3 host=host3"
]
code
=
self
.
_conn
.
schemaless_insert
(
lines3_1
,
TDSmlProtocolType
.
TELNET
.
value
,
TDSmlTimestampType
.
NOT_CONFIGURED
.
value
)
...
...
tests/script/api/openTSDBTest.c
浏览文件 @
da4d0f4e
...
...
@@ -22,9 +22,9 @@ void verify_telnet_insert(TAOS* taos) {
/* metric */
char
*
lines0
[]
=
{
"stb0_0 1626006833639
000000ns
4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
"stb0_1 1626006833639
000000ns
4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
"stb0_2 1626006833639
000000ns
4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
"stb0_0 1626006833639 4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
"stb0_1 1626006833639 4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
"stb0_2 1626006833639 4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
};
result
=
taos_schemaless_insert
(
taos
,
lines0
,
3
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
...
...
@@ -35,15 +35,11 @@ void verify_telnet_insert(TAOS* taos) {
/* timestamp */
char
*
lines1
[]
=
{
"stb1 1626006833s 1i8 host=
\"
host0
\"
"
,
"stb1 1626006833639000000ns 2i8 host=
\"
host0
\"
"
,
"stb1 1626006833640000us 3i8 host=
\"
host0
\"
"
,
"stb1 1626006833641 4i8 host=
\"
host0
\"
"
,
"stb1 1626006832 5i8 host=
\"
host0
\"
"
,
"stb1 1626006833651ms 6i8 host=
\"
host0
\"
"
,
"stb1 0 7i8 host=
\"
host0
\"
"
,
"stb1 1626006833641 1i8 host=
\"
host0
\"
"
,
"stb1 1626006832 2i8 host=
\"
host0
\"
"
,
"stb1 0 3i8 host=
\"
host0
\"
"
,
};
result
=
taos_schemaless_insert
(
taos
,
lines1
,
7
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
lines1
,
3
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"lines1 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -53,8 +49,8 @@ void verify_telnet_insert(TAOS* taos) {
/* metric value */
//tinyint
char
*
lines2_0
[]
=
{
"stb2_0 1626006833651
ms
-127i8 host=
\"
host0
\"
"
,
"stb2_0 1626006833652
ms
127i8 host=
\"
host0
\"
"
"stb2_0 1626006833651 -127i8 host=
\"
host0
\"
"
,
"stb2_0 1626006833652 127i8 host=
\"
host0
\"
"
};
result
=
taos_schemaless_insert
(
taos
,
lines2_0
,
2
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
...
...
@@ -65,8 +61,8 @@ void verify_telnet_insert(TAOS* taos) {
//smallint
char
*
lines2_1
[]
=
{
"stb2_1 1626006833651
ms
-32767i16 host=
\"
host0
\"
"
,
"stb2_1 1626006833652
ms
32767i16 host=
\"
host0
\"
"
"stb2_1 1626006833651 -32767i16 host=
\"
host0
\"
"
,
"stb2_1 1626006833652 32767i16 host=
\"
host0
\"
"
};
result
=
taos_schemaless_insert
(
taos
,
lines2_1
,
2
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
...
...
@@ -77,8 +73,8 @@ void verify_telnet_insert(TAOS* taos) {
//int
char
*
lines2_2
[]
=
{
"stb2_2 1626006833651
ms
-2147483647i32 host=
\"
host0
\"
"
,
"stb2_2 1626006833652
ms
2147483647i32 host=
\"
host0
\"
"
"stb2_2 1626006833651 -2147483647i32 host=
\"
host0
\"
"
,
"stb2_2 1626006833652 2147483647i32 host=
\"
host0
\"
"
};
result
=
taos_schemaless_insert
(
taos
,
lines2_2
,
2
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
...
...
@@ -89,8 +85,8 @@ void verify_telnet_insert(TAOS* taos) {
//bigint
char
*
lines2_3
[]
=
{
"stb2_3 1626006833651
ms
-9223372036854775807i64 host=
\"
host0
\"
"
,
"stb2_3 1626006833652
ms
9223372036854775807i64 host=
\"
host0
\"
"
"stb2_3 1626006833651 -9223372036854775807i64 host=
\"
host0
\"
"
,
"stb2_3 1626006833652 9223372036854775807i64 host=
\"
host0
\"
"
};
result
=
taos_schemaless_insert
(
taos
,
lines2_3
,
2
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
...
...
@@ -101,16 +97,16 @@ void verify_telnet_insert(TAOS* taos) {
//float
char
*
lines2_4
[]
=
{
"stb2_4 1626006833610
ms
3f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833620
ms
-3f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833630
ms
3.4f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833640
ms
-3.4f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833650
ms
3.4E10f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833660
ms
-3.4e10f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833670
ms
3.4E+2f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833680
ms
-3.4e-2f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833700
ms
3.4E38f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833710
ms
-3.4E38f32 host=
\"
host0
\"
"
"stb2_4 1626006833610 3f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833620 -3f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833630 3.4f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833640 -3.4f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833650 3.4E10f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833660 -3.4e10f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833670 3.4E+2f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833680 -3.4e-2f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833700 3.4E38f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833710 -3.4E38f32 host=
\"
host0
\"
"
};
result
=
taos_schemaless_insert
(
taos
,
lines2_4
,
10
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
...
...
@@ -121,17 +117,17 @@ void verify_telnet_insert(TAOS* taos) {
//double
char
*
lines2_5
[]
=
{
"stb2_5 1626006833610
ms
3f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833620
ms
-3f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833630
ms
3.4f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833640
ms
-3.4f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833650
ms
3.4E10f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833660
ms
-3.4e10f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833670
ms
3.4E+2f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833680
ms
-3.4e-2f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833690
ms
1.7E308f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833700
ms
-1.7E308f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833710
ms
3.15 host=
\"
host0
\"
"
"stb2_5 1626006833610 3f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833620 -3f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833630 3.4f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833640 -3.4f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833650 3.4E10f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833660 -3.4e10f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833670 3.4E+2f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833680 -3.4e-2f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833690 1.7E308f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833700 -1.7E308f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833710 3.15 host=
\"
host0
\"
"
};
result
=
taos_schemaless_insert
(
taos
,
lines2_5
,
11
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
...
...
@@ -142,16 +138,16 @@ void verify_telnet_insert(TAOS* taos) {
//bool
char
*
lines2_6
[]
=
{
"stb2_6 1626006833610
ms
t host=
\"
host0
\"
"
,
"stb2_6 1626006833620
ms
T host=
\"
host0
\"
"
,
"stb2_6 1626006833630
ms
true host=
\"
host0
\"
"
,
"stb2_6 1626006833640
ms
True host=
\"
host0
\"
"
,
"stb2_6 1626006833650
ms
TRUE host=
\"
host0
\"
"
,
"stb2_6 1626006833660
ms
f host=
\"
host0
\"
"
,
"stb2_6 1626006833670
ms
F host=
\"
host0
\"
"
,
"stb2_6 1626006833680
ms
false host=
\"
host0
\"
"
,
"stb2_6 1626006833690
ms
False host=
\"
host0
\"
"
,
"stb2_6 1626006833700
ms
FALSE host=
\"
host0
\"
"
"stb2_6 1626006833610 t host=
\"
host0
\"
"
,
"stb2_6 1626006833620 T host=
\"
host0
\"
"
,
"stb2_6 1626006833630 true host=
\"
host0
\"
"
,
"stb2_6 1626006833640 True host=
\"
host0
\"
"
,
"stb2_6 1626006833650 TRUE host=
\"
host0
\"
"
,
"stb2_6 1626006833660 f host=
\"
host0
\"
"
,
"stb2_6 1626006833670 F host=
\"
host0
\"
"
,
"stb2_6 1626006833680 false host=
\"
host0
\"
"
,
"stb2_6 1626006833690 False host=
\"
host0
\"
"
,
"stb2_6 1626006833700 FALSE host=
\"
host0
\"
"
};
result
=
taos_schemaless_insert
(
taos
,
lines2_6
,
10
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
...
...
@@ -162,9 +158,9 @@ void verify_telnet_insert(TAOS* taos) {
//binary
char
*
lines2_7
[]
=
{
"stb2_7 1626006833610
ms
\"
binary_val.!@#$%^&*
\"
host=
\"
host0
\"
"
,
"stb2_7 1626006833620
ms
\"
binary_val.:;,./?|+-=
\"
host=
\"
host0
\"
"
,
"stb2_7 1626006833630
ms
\"
binary_val.()[]{}<>
\"
host=
\"
host0
\"
"
"stb2_7 1626006833610
\"
binary_val.!@#$%^&*
\"
host=
\"
host0
\"
"
,
"stb2_7 1626006833620
\"
binary_val.:;,./?|+-=
\"
host=
\"
host0
\"
"
,
"stb2_7 1626006833630
\"
binary_val.()[]{}<>
\"
host=
\"
host0
\"
"
};
result
=
taos_schemaless_insert
(
taos
,
lines2_7
,
3
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
...
...
@@ -175,8 +171,8 @@ void verify_telnet_insert(TAOS* taos) {
//nchar
char
*
lines2_8
[]
=
{
"stb2_8 1626006833610
ms
L
\"
nchar_val数值一
\"
host=
\"
host0
\"
"
,
"stb2_8 1626006833620
ms
L
\"
nchar_val数值二
\"
host=
\"
host0
\"
"
"stb2_8 1626006833610 L
\"
nchar_val数值一
\"
host=
\"
host0
\"
"
,
"stb2_8 1626006833620 L
\"
nchar_val数值二
\"
host=
\"
host0
\"
"
};
result
=
taos_schemaless_insert
(
taos
,
lines2_8
,
2
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
...
...
@@ -188,8 +184,8 @@ void verify_telnet_insert(TAOS* taos) {
/* tags */
//tag value types
char
*
lines3_0
[]
=
{
"stb3_0 1626006833610
ms
1 t1=127i8 t2=32767i16 t3=2147483647i32 t4=9223372036854775807i64 t5=3.4E38f32 t6=1.7E308f64 t7=true t8=
\"
binary_val_1
\"
t9=L
\"
标签值1
\"
"
,
"stb3_0 1626006833610
ms
2 t1=-127i8 t2=-32767i16 t3=-2147483647i32 t4=-9223372036854775807i64 t5=-3.4E38f32 t6=-1.7E308f64 t7=false t8=
\"
binary_val_2
\"
t9=L
\"
标签值2
\"
"
"stb3_0 1626006833610 1 t1=127i8 t2=32767i16 t3=2147483647i32 t4=9223372036854775807i64 t5=3.4E38f32 t6=1.7E308f64 t7=true t8=
\"
binary_val_1
\"
t9=L
\"
标签值1
\"
"
,
"stb3_0 1626006833610 2 t1=-127i8 t2=-32767i16 t3=-2147483647i32 t4=-9223372036854775807i64 t5=-3.4E38f32 t6=-1.7E308f64 t7=false t8=
\"
binary_val_2
\"
t9=L
\"
标签值2
\"
"
};
result
=
taos_schemaless_insert
(
taos
,
lines3_0
,
2
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
...
...
@@ -200,9 +196,9 @@ void verify_telnet_insert(TAOS* taos) {
//tag ID as child table name
char
*
lines3_1
[]
=
{
"stb3_1 1626006833610
ms
1 id=child_table1 host=host1"
,
"stb3_1 1626006833610
ms
2 host=host2 iD=child_table2"
,
"stb3_1 1626006833610
ms
3 ID=child_table3 host=host3"
"stb3_1 1626006833610 1 id=child_table1 host=host1"
,
"stb3_1 1626006833610 2 host=host2 iD=child_table2"
,
"stb3_1 1626006833610 3 ID=child_table3 host=host3"
};
result
=
taos_schemaless_insert
(
taos
,
lines3_1
,
3
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录