Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
be8e2adc
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看板
提交
be8e2adc
编写于
10月 20, 2021
作者:
G
Ganlin Zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed enum name with prefix TSDB
上级
219023f7
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
74 addition
and
74 deletion
+74
-74
src/client/inc/tscParseLine.h
src/client/inc/tscParseLine.h
+1
-1
src/client/src/tscParseLineProtocol.c
src/client/src/tscParseLineProtocol.c
+13
-13
src/inc/taos.h
src/inc/taos.h
+13
-13
tests/examples/c/apitest.c
tests/examples/c/apitest.c
+8
-8
tests/examples/c/schemaless.c
tests/examples/c/schemaless.c
+2
-2
tests/script/api/openTSDBTest.c
tests/script/api/openTSDBTest.c
+35
-35
tests/tsim/src/simExe.c
tests/tsim/src/simExe.c
+2
-2
未找到文件。
src/client/inc/tscParseLine.h
浏览文件 @
be8e2adc
...
...
@@ -23,7 +23,7 @@ extern "C" {
#define SML_TIMESTAMP_SECOND_DIGITS 10
#define SML_TIMESTAMP_MILLI_SECOND_DIGITS 13
typedef
SML_PROTOCOL_TYPE
SMLProtocolType
;
typedef
TSDB_
SML_PROTOCOL_TYPE
SMLProtocolType
;
typedef
struct
{
char
*
key
;
...
...
src/client/src/tscParseLineProtocol.c
浏览文件 @
be8e2adc
...
...
@@ -1446,13 +1446,13 @@ static bool isTimeStamp(char *pVal, uint16_t len, SMLTimeStampType *tsType, SSml
//Default no appendix
if
(
isdigit
(
pVal
[
len
-
1
])
&&
isdigit
(
pVal
[
len
-
2
]))
{
if
(
info
->
protocol
==
SML_LINE_PROTOCOL
)
{
if
(
info
->
protocol
==
TSDB_
SML_LINE_PROTOCOL
)
{
if
(
info
->
tsType
!=
SML_TIME_STAMP_NOT_CONFIGURED
)
{
*
tsType
=
info
->
tsType
;
}
else
{
*
tsType
=
SML_TIME_STAMP_NANO_SECONDS
;
}
}
else
if
(
info
->
protocol
==
SML_TELNET_PROTOCOL
)
{
}
else
if
(
info
->
protocol
==
TSDB_
SML_TELNET_PROTOCOL
)
{
if
(
len
==
SML_TIMESTAMP_SECOND_DIGITS
)
{
*
tsType
=
SML_TIME_STAMP_SECONDS
;
}
else
if
(
len
==
SML_TIMESTAMP_MILLI_SECOND_DIGITS
)
{
...
...
@@ -2302,25 +2302,25 @@ cleanup:
static
int32_t
convertPrecisionType
(
int
precision
,
SMLTimeStampType
*
tsType
)
{
switch
(
precision
)
{
case
SML_TIMESTAMP_NOT_CONFIGURED
:
case
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
:
*
tsType
=
SML_TIME_STAMP_NOT_CONFIGURED
;
break
;
case
SML_TIMESTAMP_HOURS
:
case
TSDB_
SML_TIMESTAMP_HOURS
:
*
tsType
=
SML_TIME_STAMP_HOURS
;
break
;
case
SML_TIMESTAMP_MILLI_SECONDS
:
case
TSDB_
SML_TIMESTAMP_MILLI_SECONDS
:
*
tsType
=
SML_TIME_STAMP_MILLI_SECONDS
;
break
;
case
SML_TIMESTAMP_NANO_SECONDS
:
case
TSDB_
SML_TIMESTAMP_NANO_SECONDS
:
*
tsType
=
SML_TIME_STAMP_NANO_SECONDS
;
break
;
case
SML_TIMESTAMP_MICRO_SECONDS
:
case
TSDB_
SML_TIMESTAMP_MICRO_SECONDS
:
*
tsType
=
SML_TIME_STAMP_MICRO_SECONDS
;
break
;
case
SML_TIMESTAMP_SECONDS
:
case
TSDB_
SML_TIMESTAMP_SECONDS
:
*
tsType
=
SML_TIME_STAMP_SECONDS
;
break
;
case
SML_TIMESTAMP_MINUTES
:
case
TSDB_
SML_TIMESTAMP_MINUTES
:
*
tsType
=
SML_TIME_STAMP_MINUTES
;
break
;
default:
...
...
@@ -2376,7 +2376,7 @@ TAOS_RES* taos_schemaless_insert(TAOS* taos, char* lines[], int numLines, int pr
int
affected_rows
=
0
;
SMLTimeStampType
tsType
;
if
(
protocol
==
SML_LINE_PROTOCOL
)
{
if
(
protocol
==
TSDB_
SML_LINE_PROTOCOL
)
{
code
=
convertPrecisionType
(
precision
,
&
tsType
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
NULL
;
...
...
@@ -2384,13 +2384,13 @@ TAOS_RES* taos_schemaless_insert(TAOS* taos, char* lines[], int numLines, int pr
}
switch
(
protocol
)
{
case
SML_LINE_PROTOCOL
:
case
TSDB_
SML_LINE_PROTOCOL
:
code
=
taos_insert_lines
(
taos
,
lines
,
numLines
,
protocol
,
tsType
,
&
affected_rows
);
break
;
case
SML_TELNET_PROTOCOL
:
case
TSDB_
SML_TELNET_PROTOCOL
:
code
=
taos_insert_telnet_lines
(
taos
,
lines
,
numLines
,
protocol
,
tsType
,
&
affected_rows
);
break
;
case
SML_JSON_PROTOCOL
:
case
TSDB_
SML_JSON_PROTOCOL
:
code
=
taos_insert_json_payload
(
taos
,
*
lines
,
protocol
,
tsType
,
&
affected_rows
);
break
;
default:
...
...
src/inc/taos.h
浏览文件 @
be8e2adc
...
...
@@ -73,21 +73,21 @@ typedef enum {
}
SET_CONF_RET_CODE
;
typedef
enum
{
SML_UNKNOWN_PROTOCOL
=
0
,
SML_LINE_PROTOCOL
=
1
,
SML_TELNET_PROTOCOL
=
2
,
SML_JSON_PROTOCOL
=
3
,
}
SML_PROTOCOL_TYPE
;
TSDB_
SML_UNKNOWN_PROTOCOL
=
0
,
TSDB_
SML_LINE_PROTOCOL
=
1
,
TSDB_
SML_TELNET_PROTOCOL
=
2
,
TSDB_
SML_JSON_PROTOCOL
=
3
,
}
TSDB_
SML_PROTOCOL_TYPE
;
typedef
enum
{
SML_TIMESTAMP_NOT_CONFIGURED
=
0
,
SML_TIMESTAMP_HOURS
,
SML_TIMESTAMP_MINUTES
,
SML_TIMESTAMP_SECONDS
,
SML_TIMESTAMP_MILLI_SECONDS
,
SML_TIMESTAMP_MICRO_SECONDS
,
SML_TIMESTAMP_NANO_SECONDS
,
}
SML_TIMESTAMP_TYPE
;
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
=
0
,
TSDB_
SML_TIMESTAMP_HOURS
,
TSDB_
SML_TIMESTAMP_MINUTES
,
TSDB_
SML_TIMESTAMP_SECONDS
,
TSDB_
SML_TIMESTAMP_MILLI_SECONDS
,
TSDB_
SML_TIMESTAMP_MICRO_SECONDS
,
TSDB_
SML_TIMESTAMP_NANO_SECONDS
,
}
TSDB_
SML_TIMESTAMP_TYPE
;
#define RET_MSG_LENGTH 1024
typedef
struct
setConfRet
{
...
...
tests/examples/c/apitest.c
浏览文件 @
be8e2adc
...
...
@@ -316,7 +316,7 @@ void verify_schema_less(TAOS* taos) {
"stf,t1=4i64,t3=
\"
t4
\"
,t2=5f64,t4=5f64 c1=3i64,c3=L
\"
passitagin_stf
\"
,c2=false,c5=5f64,c6=7u64 1626006933641000000"
};
result
=
taos_schemaless_insert
(
taos
,
lines
,
sizeof
(
lines
)
/
sizeof
(
char
*
),
SML_LINE_PROTOCOL
,
SML_TIMESTAMP_NANO_SECONDS
);
result
=
taos_schemaless_insert
(
taos
,
lines
,
sizeof
(
lines
)
/
sizeof
(
char
*
),
TSDB_SML_LINE_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NANO_SECONDS
);
code
=
taos_errno
(
result
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
affected_rows
=
taos_affected_rows
(
result
);
...
...
@@ -328,7 +328,7 @@ void verify_schema_less(TAOS* taos) {
"stg,t1=3i64,t2=4f64,t3=
\"
t3
\"
c1=3i64,c3=L
\"
passit
\"
,c2=false,c4=4f64 1626006833639000000"
,
"stg,t1=4i64,t3=
\"
t4
\"
,t2=5f64,t4=5f64 c1=3i64,c3=L
\"
passitagin
\"
,c2=true,c4=5f64,c5=5f64 1626006833641000000"
};
result
=
taos_schemaless_insert
(
taos
,
&
lines2
[
0
],
1
,
SML_LINE_PROTOCOL
,
SML_TIMESTAMP_NANO_SECONDS
);
result
=
taos_schemaless_insert
(
taos
,
&
lines2
[
0
],
1
,
TSDB_SML_LINE_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NANO_SECONDS
);
code
=
taos_errno
(
result
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
affected_rows
=
taos_affected_rows
(
result
);
...
...
@@ -336,7 +336,7 @@ void verify_schema_less(TAOS* taos) {
}
taos_free_result
(
result
);
result
=
taos_schemaless_insert
(
taos
,
&
lines2
[
1
],
1
,
SML_LINE_PROTOCOL
,
SML_TIMESTAMP_NANO_SECONDS
);
result
=
taos_schemaless_insert
(
taos
,
&
lines2
[
1
],
1
,
TSDB_SML_LINE_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NANO_SECONDS
);
code
=
taos_errno
(
result
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
affected_rows
=
taos_affected_rows
(
result
);
...
...
@@ -348,7 +348,7 @@ void verify_schema_less(TAOS* taos) {
"sth,t1=4i64,t2=5f64,t4=5f64,ID=childTable c1=3i64,c3=L
\"
passitagin_stf
\"
,c2=false,c5=5f64,c6=7u64 1626006933641"
,
"sth,t1=4i64,t2=5f64,t4=5f64 c1=3i64,c3=L
\"
passitagin_stf
\"
,c2=false,c5=5f64,c6=7u64 1626006933654"
};
result
=
taos_schemaless_insert
(
taos
,
lines3
,
2
,
SML_LINE_PROTOCOL
,
SML_TIMESTAMP_MILLI_SECONDS
);
result
=
taos_schemaless_insert
(
taos
,
lines3
,
2
,
TSDB_SML_LINE_PROTOCOL
,
TSDB_
SML_TIMESTAMP_MILLI_SECONDS
);
code
=
taos_errno
(
result
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
affected_rows
=
taos_affected_rows
(
result
);
...
...
@@ -360,7 +360,7 @@ void verify_schema_less(TAOS* taos) {
"st123456,t1=3i64,t2=4f64,t3=
\"
t3
\"
c1=3i64,c3=L
\"
passit
\"
,c2=false,c4=4f64 1626006833639000000"
,
"dgtyqodr,t2=5f64,t3=L
\"
ste
\"
c1=tRue,c2=4i64,c3=
\"
iam
\"
1626056811823316532"
};
result
=
taos_schemaless_insert
(
taos
,
lines4
,
2
,
SML_LINE_PROTOCOL
,
SML_TIMESTAMP_NANO_SECONDS
);
result
=
taos_schemaless_insert
(
taos
,
lines4
,
2
,
TSDB_SML_LINE_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NANO_SECONDS
);
code
=
taos_errno
(
result
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
affected_rows
=
taos_affected_rows
(
result
);
...
...
@@ -373,7 +373,7 @@ void verify_schema_less(TAOS* taos) {
"zqlbgs,id=zqlbgs_39302_21680,t0=f,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7=
\"
binaryTagValue
\"
,t8=L
\"
ncharTagValue
\"
c0=f,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7=
\"
binaryColValue
\"
,c8=L
\"
ncharColValue
\"
,c9=7u64 1626006833639000000"
,
"zqlbgs,t9=f,id=zqlbgs_39302_21680,t0=f,t1=127i8,t11=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7=
\"
binaryTagValue
\"
,t8=L
\"
ncharTagValue
\"
,t10=L
\"
ncharTagValue
\"
c10=f,c0=f,c1=127i8,c12=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7=
\"
binaryColValue
\"
,c8=L
\"
ncharColValue
\"
,c9=7u64,c11=L
\"
ncharColValue
\"
1626006833639000000"
};
result
=
taos_schemaless_insert
(
taos
,
&
lines5
[
0
],
1
,
SML_LINE_PROTOCOL
,
SML_TIMESTAMP_NANO_SECONDS
);
result
=
taos_schemaless_insert
(
taos
,
&
lines5
[
0
],
1
,
TSDB_SML_LINE_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NANO_SECONDS
);
code
=
taos_errno
(
result
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
affected_rows
=
taos_affected_rows
(
result
);
...
...
@@ -381,7 +381,7 @@ void verify_schema_less(TAOS* taos) {
}
taos_free_result
(
result
);
result
=
taos_schemaless_insert
(
taos
,
&
lines5
[
1
],
1
,
SML_LINE_PROTOCOL
,
SML_TIMESTAMP_NANO_SECONDS
);
result
=
taos_schemaless_insert
(
taos
,
&
lines5
[
1
],
1
,
TSDB_SML_LINE_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NANO_SECONDS
);
code
=
taos_errno
(
result
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
affected_rows
=
taos_affected_rows
(
result
);
...
...
@@ -393,7 +393,7 @@ void verify_schema_less(TAOS* taos) {
"st123456,t1=3i64,t2=4f64,t3=
\"
t3
\"
c1=3i64,c3=L
\"
passit
\"
,c2=false,c4=4f64 1626006833639000000"
,
"dgtyqodr,t2=5f64,t3=L
\"
ste
\"
c1=tRue,c2=4i64,c3=
\"
iam
\"
1626056811823316532"
};
result
=
taos_schemaless_insert
(
taos
,
lines6
,
2
,
SML_LINE_PROTOCOL
,
SML_TIMESTAMP_NANO_SECONDS
);
result
=
taos_schemaless_insert
(
taos
,
lines6
,
2
,
TSDB_SML_LINE_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NANO_SECONDS
);
code
=
taos_errno
(
result
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
affected_rows
=
taos_affected_rows
(
result
);
...
...
tests/examples/c/schemaless.c
浏览文件 @
be8e2adc
...
...
@@ -99,8 +99,8 @@ int main(int argc, char* argv[]) {
int
numFields
=
13
;
int
maxLinesPerBatch
=
16384
;
int
tsPrecision
=
SML_TIMESTAMP_NOT_CONFIGURED
;
int
lineProtocol
=
SML_UNKNOWN_PROTOCOL
;
int
tsPrecision
=
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
;
int
lineProtocol
=
TSDB_
SML_UNKNOWN_PROTOCOL
;
int
opt
;
while
((
opt
=
getopt
(
argc
,
argv
,
"s:c:r:f:t:m:p:P:h"
))
!=
-
1
)
{
...
...
tests/script/api/openTSDBTest.c
浏览文件 @
be8e2adc
...
...
@@ -26,7 +26,7 @@ void verify_telnet_insert(TAOS* taos) {
"stb0_1 1626006833639000000ns 4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
"stb0_2 1626006833639000000ns 4i8 host=
\"
host0
\"
interface=
\"
eth0
\"
"
,
};
result
=
taos_schemaless_insert
(
taos
,
lines0
,
3
,
SML_TELNET_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
lines0
,
3
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"lines0 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -43,7 +43,7 @@ void verify_telnet_insert(TAOS* taos) {
"stb1 1626006833651ms 6i8 host=
\"
host0
\"
"
,
"stb1 0 7i8 host=
\"
host0
\"
"
,
};
result
=
taos_schemaless_insert
(
taos
,
lines1
,
7
,
SML_TELNET_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
lines1
,
7
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"lines1 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -56,7 +56,7 @@ void verify_telnet_insert(TAOS* taos) {
"stb2_0 1626006833651ms -127i8 host=
\"
host0
\"
"
,
"stb2_0 1626006833652ms 127i8 host=
\"
host0
\"
"
};
result
=
taos_schemaless_insert
(
taos
,
lines2_0
,
2
,
SML_TELNET_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
lines2_0
,
2
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"lines2_0 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -68,7 +68,7 @@ void verify_telnet_insert(TAOS* taos) {
"stb2_1 1626006833651ms -32767i16 host=
\"
host0
\"
"
,
"stb2_1 1626006833652ms 32767i16 host=
\"
host0
\"
"
};
result
=
taos_schemaless_insert
(
taos
,
lines2_1
,
2
,
SML_TELNET_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
lines2_1
,
2
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"lines2_1 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -80,7 +80,7 @@ void verify_telnet_insert(TAOS* taos) {
"stb2_2 1626006833651ms -2147483647i32 host=
\"
host0
\"
"
,
"stb2_2 1626006833652ms 2147483647i32 host=
\"
host0
\"
"
};
result
=
taos_schemaless_insert
(
taos
,
lines2_2
,
2
,
SML_TELNET_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
lines2_2
,
2
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"lines2_2 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -92,7 +92,7 @@ void verify_telnet_insert(TAOS* taos) {
"stb2_3 1626006833651ms -9223372036854775807i64 host=
\"
host0
\"
"
,
"stb2_3 1626006833652ms 9223372036854775807i64 host=
\"
host0
\"
"
};
result
=
taos_schemaless_insert
(
taos
,
lines2_3
,
2
,
SML_TELNET_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
lines2_3
,
2
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"lines2_3 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -112,7 +112,7 @@ void verify_telnet_insert(TAOS* taos) {
"stb2_4 1626006833700ms 3.4E38f32 host=
\"
host0
\"
"
,
"stb2_4 1626006833710ms -3.4E38f32 host=
\"
host0
\"
"
};
result
=
taos_schemaless_insert
(
taos
,
lines2_4
,
10
,
SML_TELNET_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
lines2_4
,
10
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"lines2_4 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -133,7 +133,7 @@ void verify_telnet_insert(TAOS* taos) {
"stb2_5 1626006833700ms -1.7E308f64 host=
\"
host0
\"
"
,
"stb2_5 1626006833710ms 3.15 host=
\"
host0
\"
"
};
result
=
taos_schemaless_insert
(
taos
,
lines2_5
,
11
,
SML_TELNET_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
lines2_5
,
11
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"lines2_5 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -153,7 +153,7 @@ void verify_telnet_insert(TAOS* taos) {
"stb2_6 1626006833690ms False host=
\"
host0
\"
"
,
"stb2_6 1626006833700ms FALSE host=
\"
host0
\"
"
};
result
=
taos_schemaless_insert
(
taos
,
lines2_6
,
10
,
SML_TELNET_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
lines2_6
,
10
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"lines2_6 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -166,7 +166,7 @@ void verify_telnet_insert(TAOS* taos) {
"stb2_7 1626006833620ms
\"
binary_val.:;,./?|+-=
\"
host=
\"
host0
\"
"
,
"stb2_7 1626006833630ms
\"
binary_val.()[]{}<>
\"
host=
\"
host0
\"
"
};
result
=
taos_schemaless_insert
(
taos
,
lines2_7
,
3
,
SML_TELNET_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
lines2_7
,
3
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"lines2_7 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -178,7 +178,7 @@ void verify_telnet_insert(TAOS* taos) {
"stb2_8 1626006833610ms L
\"
nchar_val数值一
\"
host=
\"
host0
\"
"
,
"stb2_8 1626006833620ms L
\"
nchar_val数值二
\"
host=
\"
host0
\"
"
};
result
=
taos_schemaless_insert
(
taos
,
lines2_8
,
2
,
SML_TELNET_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
lines2_8
,
2
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"lines2_8 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -191,7 +191,7 @@ void verify_telnet_insert(TAOS* taos) {
"stb3_0 1626006833610ms 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 1626006833610ms 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
,
SML_TELNET_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
lines3_0
,
2
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"lines3_0 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -204,7 +204,7 @@ void verify_telnet_insert(TAOS* taos) {
"stb3_1 1626006833610ms 2 host=host2 iD=child_table2"
,
"stb3_1 1626006833610ms 3 ID=child_table3 host=host3"
};
result
=
taos_schemaless_insert
(
taos
,
lines3_1
,
3
,
SML_TELNET_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
lines3_1
,
3
,
TSDB_SML_TELNET_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"lines3_1 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -240,7 +240,7 @@ void verify_json_insert(TAOS* taos) {
} \
}"
};
result
=
taos_schemaless_insert
(
taos
,
message
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
message
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload_0 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -273,7 +273,7 @@ void verify_json_insert(TAOS* taos) {
} \
]"
};
result
=
taos_schemaless_insert
(
taos
,
message1
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
message1
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload_1 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -326,7 +326,7 @@ void verify_json_insert(TAOS* taos) {
} \
} \
]"
};
result
=
taos_schemaless_insert
(
taos
,
message2
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
message2
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload_2 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -352,7 +352,7 @@ void verify_json_insert(TAOS* taos) {
*
payload_str
=
cJSON_Print
(
payload
);
//printf("%s\n", payload_str);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload0_0 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -375,7 +375,7 @@ void verify_json_insert(TAOS* taos) {
*
payload_str
=
cJSON_Print
(
payload
);
//printf("%s\n", payload_str);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload0_1 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -398,7 +398,7 @@ void verify_json_insert(TAOS* taos) {
*
payload_str
=
cJSON_Print
(
payload
);
//printf("%s\n", payload_str);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload0_2 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -421,7 +421,7 @@ void verify_json_insert(TAOS* taos) {
*
payload_str
=
cJSON_Print
(
payload
);
//printf("%s\n", payload_str);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload0_3 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -444,7 +444,7 @@ void verify_json_insert(TAOS* taos) {
*
payload_str
=
cJSON_Print
(
payload
);
//printf("%s\n", payload_str);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload0_4 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -475,7 +475,7 @@ void verify_json_insert(TAOS* taos) {
*
payload_str
=
cJSON_Print
(
payload
);
//printf("%s\n", payload_str);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload1_0 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -503,7 +503,7 @@ void verify_json_insert(TAOS* taos) {
*
payload_str
=
cJSON_Print
(
payload
);
//printf("%s\n", payload_str);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload1_1 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -531,7 +531,7 @@ void verify_json_insert(TAOS* taos) {
*
payload_str
=
cJSON_Print
(
payload
);
//printf("%s\n", payload_str);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload1_2 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -559,7 +559,7 @@ void verify_json_insert(TAOS* taos) {
*
payload_str
=
cJSON_Print
(
payload
);
//printf("%s\n", payload_str);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload1_4 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -593,7 +593,7 @@ void verify_json_insert(TAOS* taos) {
*
payload_str
=
cJSON_Print
(
payload
);
//printf("%s\n", payload_str);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload2_0 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -625,7 +625,7 @@ void verify_json_insert(TAOS* taos) {
*
payload_str
=
cJSON_Print
(
payload
);
//printf("%s\n", payload_str);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload2_1 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -657,7 +657,7 @@ void verify_json_insert(TAOS* taos) {
*
payload_str
=
cJSON_Print
(
payload
);
//printf("%s\n", payload_str);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload2_2 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -689,7 +689,7 @@ void verify_json_insert(TAOS* taos) {
*
payload_str
=
cJSON_Print
(
payload
);
//printf("%s\n", payload_str);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload2_3 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -721,7 +721,7 @@ void verify_json_insert(TAOS* taos) {
*
payload_str
=
cJSON_Print
(
payload
);
//printf("%s\n", payload_str);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload2_4 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -753,7 +753,7 @@ void verify_json_insert(TAOS* taos) {
*
payload_str
=
cJSON_Print
(
payload
);
//printf("%s\n", payload_str);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload2_5 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -785,7 +785,7 @@ void verify_json_insert(TAOS* taos) {
*
payload_str
=
cJSON_Print
(
payload
);
//printf("%s\n", payload_str);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload2_6 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -817,7 +817,7 @@ void verify_json_insert(TAOS* taos) {
*
payload_str
=
cJSON_Print
(
payload
);
//printf("%s\n", payload_str);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload2_7 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -849,7 +849,7 @@ void verify_json_insert(TAOS* taos) {
*
payload_str
=
cJSON_Print
(
payload
);
//printf("%s\n", payload_str);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload2_8 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
@@ -931,7 +931,7 @@ void verify_json_insert(TAOS* taos) {
*
payload_str
=
cJSON_Print
(
payload
);
//printf("%s\n", payload_str);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
SML_JSON_PROTOCOL
,
SML_TIMESTAMP_NOT_CONFIGURED
);
result
=
taos_schemaless_insert
(
taos
,
payload_str
,
0
,
TSDB_SML_JSON_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NOT_CONFIGURED
);
code
=
taos_errno
(
result
);
if
(
code
)
{
printf
(
"payload3_0 code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
...
...
tests/tsim/src/simExe.c
浏览文件 @
be8e2adc
...
...
@@ -1085,7 +1085,7 @@ bool simExecuteLineInsertCmd(SScript *script, char *rest) {
simInfo
(
"script:%s, %s"
,
script
->
fileName
,
rest
);
simLogSql
(
buf
,
true
);
char
*
lines
[]
=
{
rest
};
TAOS_RES
*
result
=
taos_schemaless_insert
(
script
->
taos
,
lines
,
1
,
SML_LINE_PROTOCOL
,
SML_TIMESTAMP_NANO_SECONDS
);
TAOS_RES
*
result
=
taos_schemaless_insert
(
script
->
taos
,
lines
,
1
,
TSDB_SML_LINE_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NANO_SECONDS
);
int32_t
code
=
taos_errno
(
result
);
if
(
code
==
TSDB_CODE_SUCCESS
)
{
simDebug
(
"script:%s, taos:%p, %s executed. success."
,
script
->
fileName
,
script
->
taos
,
rest
);
...
...
@@ -1112,7 +1112,7 @@ bool simExecuteLineInsertErrorCmd(SScript *script, char *rest) {
simInfo
(
"script:%s, %s"
,
script
->
fileName
,
rest
);
simLogSql
(
buf
,
true
);
char
*
lines
[]
=
{
rest
};
TAOS_RES
*
result
=
taos_schemaless_insert
(
script
->
taos
,
lines
,
1
,
SML_LINE_PROTOCOL
,
SML_TIMESTAMP_NANO_SECONDS
);
TAOS_RES
*
result
=
taos_schemaless_insert
(
script
->
taos
,
lines
,
1
,
TSDB_SML_LINE_PROTOCOL
,
TSDB_
SML_TIMESTAMP_NANO_SECONDS
);
int32_t
code
=
taos_errno
(
result
);
if
(
code
==
TSDB_CODE_SUCCESS
)
{
sprintf
(
script
->
error
,
"script:%s, taos:%p, %s executed. expect failed, but success."
,
script
->
fileName
,
script
->
taos
,
rest
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录