Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
0b91c2cf
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
0b91c2cf
编写于
5月 09, 2021
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix bug
上级
6aba3f5e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
74 addition
and
3 deletion
+74
-3
src/client/src/tscPrepare.c
src/client/src/tscPrepare.c
+3
-3
tests/script/api/batchprepare.c
tests/script/api/batchprepare.c
+71
-0
未找到文件。
src/client/src/tscPrepare.c
浏览文件 @
0b91c2cf
...
...
@@ -1374,9 +1374,6 @@ int taos_stmt_set_tbname(TAOS_STMT* stmt, const char* name) {
int
taos_stmt_close
(
TAOS_STMT
*
stmt
)
{
STscStmt
*
pStmt
=
(
STscStmt
*
)
stmt
;
if
(
!
pStmt
->
isInsert
)
{
taosHashCleanup
(
pStmt
->
mtb
.
pTableHash
);
taosHashCleanup
(
pStmt
->
mtb
.
pTableBlockHashList
);
SNormalStmt
*
normal
=
&
pStmt
->
normal
;
if
(
normal
->
params
!=
NULL
)
{
for
(
uint16_t
i
=
0
;
i
<
normal
->
numParams
;
i
++
)
{
...
...
@@ -1386,6 +1383,9 @@ int taos_stmt_close(TAOS_STMT* stmt) {
}
free
(
normal
->
parts
);
free
(
normal
->
sql
);
}
else
{
taosHashCleanup
(
pStmt
->
mtb
.
pTableHash
);
taosHashCleanup
(
pStmt
->
mtb
.
pTableBlockHashList
);
}
taos_free_result
(
pStmt
->
pSql
);
...
...
tests/script/api/batchprepare.c
浏览文件 @
0b91c2cf
...
...
@@ -548,6 +548,12 @@ int stmt_funcb1(TAOS_STMT *stmt) {
unsigned
long
long
endtime
=
getCurrentTime
();
printf
(
"insert total %d records, used %u seconds, avg:%u useconds
\n
"
,
3000
*
300
*
60
,
(
endtime
-
starttime
)
/
1000000UL
,
(
endtime
-
starttime
)
/
(
3000
*
300
*
60
));
free
(
v
.
ts
);
free
(
lb
);
free
(
params
);
free
(
is_null
);
free
(
no_null
);
return
0
;
}
...
...
@@ -700,6 +706,12 @@ int stmt_funcb2(TAOS_STMT *stmt) {
unsigned
long
long
endtime
=
getCurrentTime
();
printf
(
"insert total %d records, used %u seconds, avg:%u useconds
\n
"
,
3000
*
300
*
60
,
(
endtime
-
starttime
)
/
1000000UL
,
(
endtime
-
starttime
)
/
(
3000
*
300
*
60
));
free
(
v
.
ts
);
free
(
lb
);
free
(
params
);
free
(
is_null
);
free
(
no_null
);
return
0
;
}
...
...
@@ -857,6 +869,12 @@ int stmt_funcb3(TAOS_STMT *stmt) {
unsigned
long
long
endtime
=
getCurrentTime
();
printf
(
"insert total %d records, used %u seconds, avg:%u useconds
\n
"
,
3000
*
300
*
60
,
(
endtime
-
starttime
)
/
1000000UL
,
(
endtime
-
starttime
)
/
(
3000
*
300
*
60
));
free
(
v
.
ts
);
free
(
lb
);
free
(
params
);
free
(
is_null
);
free
(
no_null
);
return
0
;
}
...
...
@@ -1010,6 +1028,12 @@ int stmt_funcb4(TAOS_STMT *stmt) {
unsigned
long
long
endtime
=
getCurrentTime
();
printf
(
"insert total %d records, used %u seconds, avg:%u useconds
\n
"
,
3000
*
300
*
60
,
(
endtime
-
starttime
)
/
1000000UL
,
(
endtime
-
starttime
)
/
(
3000
*
300
*
60
));
free
(
v
.
ts
);
free
(
lb
);
free
(
params
);
free
(
is_null
);
free
(
no_null
);
return
0
;
}
...
...
@@ -1157,6 +1181,12 @@ int stmt_funcb5(TAOS_STMT *stmt) {
unsigned
long
long
endtime
=
getCurrentTime
();
printf
(
"insert total %d records, used %u seconds, avg:%u useconds
\n
"
,
3000
*
300
*
60
,
(
endtime
-
starttime
)
/
1000000UL
,
(
endtime
-
starttime
)
/
(
3000
*
300
*
60
));
free
(
v
.
ts
);
free
(
lb
);
free
(
params
);
free
(
is_null
);
free
(
no_null
);
return
0
;
}
...
...
@@ -1236,6 +1266,11 @@ int stmt_funcb_ssz1(TAOS_STMT *stmt) {
unsigned
long
long
endtime
=
getCurrentTime
();
printf
(
"insert total %d records, used %u seconds, avg:%u useconds
\n
"
,
3000
*
300
*
60
,
(
endtime
-
starttime
)
/
1000000UL
,
(
endtime
-
starttime
)
/
(
3000
*
300
*
60
));
free
(
v
.
ts
);
free
(
lb
);
free
(
params
);
free
(
no_null
);
return
0
;
}
...
...
@@ -1388,6 +1423,12 @@ int stmt_funcb_s1(TAOS_STMT *stmt) {
unsigned
long
long
endtime
=
getCurrentTime
();
printf
(
"insert total %d records, used %u seconds, avg:%u useconds
\n
"
,
3000
*
300
*
60
,
(
endtime
-
starttime
)
/
1000000UL
,
(
endtime
-
starttime
)
/
(
3000
*
300
*
60
));
free
(
v
.
ts
);
free
(
lb
);
free
(
params
);
free
(
is_null
);
free
(
no_null
);
return
0
;
}
...
...
@@ -1544,6 +1585,12 @@ int stmt_funcb_sc1(TAOS_STMT *stmt) {
unsigned
long
long
endtime
=
getCurrentTime
();
printf
(
"insert total %d records, used %u seconds, avg:%u useconds
\n
"
,
3000
*
300
*
60
,
(
endtime
-
starttime
)
/
1000000UL
,
(
endtime
-
starttime
)
/
(
3000
*
300
*
60
));
free
(
v
.
ts
);
free
(
lb
);
free
(
params
);
free
(
is_null
);
free
(
no_null
);
return
0
;
}
...
...
@@ -1698,6 +1745,12 @@ int stmt_funcb_sc2(TAOS_STMT *stmt) {
unsigned
long
long
endtime
=
getCurrentTime
();
printf
(
"insert total %d records, used %u seconds, avg:%u useconds
\n
"
,
3000
*
300
*
60
,
(
endtime
-
starttime
)
/
1000000UL
,
(
endtime
-
starttime
)
/
(
3000
*
300
*
60
));
free
(
v
.
ts
);
free
(
lb
);
free
(
params
);
free
(
is_null
);
free
(
no_null
);
return
0
;
}
...
...
@@ -1849,6 +1902,12 @@ int stmt_funcb_sc3(TAOS_STMT *stmt) {
unsigned
long
long
endtime
=
getCurrentTime
();
printf
(
"insert total %d records, used %u seconds, avg:%u useconds
\n
"
,
3000
*
300
*
60
,
(
endtime
-
starttime
)
/
1000000UL
,
(
endtime
-
starttime
)
/
(
3000
*
300
*
60
));
free
(
v
.
ts
);
free
(
lb
);
free
(
params
);
free
(
is_null
);
free
(
no_null
);
return
0
;
}
...
...
@@ -1934,6 +1993,10 @@ int sql_perf1(TAOS *taos) {
unsigned
long
long
endtime
=
getCurrentTime
();
printf
(
"insert total %d records, used %u seconds, avg:%.1f useconds
\n
"
,
3000
*
120
*
60
,
(
endtime
-
starttime
)
/
1000000UL
,
(
endtime
-
starttime
)
/
(
3000
*
120
*
60
));
for
(
int
i
=
0
;
i
<
3000
;
i
++
)
{
free
(
sql
[
i
]);
}
return
0
;
}
...
...
@@ -1983,6 +2046,10 @@ int sql_perf_s1(TAOS *taos) {
unsigned
long
long
endtime
=
getCurrentTime
();
printf
(
"insert total %d records, used %u seconds, avg:%.1f useconds
\n
"
,
3000
*
120
*
60
,
(
endtime
-
starttime
)
/
1000000UL
,
(
endtime
-
starttime
)
/
(
3000
*
120
*
60
));
for
(
int
i
=
0
;
i
<
360000
;
i
++
)
{
free
(
sql
[
i
]);
}
return
0
;
}
...
...
@@ -2024,6 +2091,10 @@ int sql_s_perf1(TAOS *taos) {
unsigned
long
long
endtime
=
getCurrentTime
();
printf
(
"insert total %d records, used %u seconds, avg:%.1f useconds
\n
"
,
3000
*
120
*
60
,
(
endtime
-
starttime
)
/
1000000UL
,
(
endtime
-
starttime
)
/
(
3000
*
120
*
60
));
for
(
int
i
=
0
;
i
<
3000
;
i
++
)
{
free
(
sql
[
i
]);
}
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录