Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
15fae241
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看板
提交
15fae241
编写于
8月 11, 2022
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enh: show command optimize
上级
4155a3be
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
56 addition
and
56 deletion
+56
-56
tests/pytest/insert/insert_locking.py
tests/pytest/insert/insert_locking.py
+1
-1
tests/script/tmp/data.sim
tests/script/tmp/data.sim
+2
-2
tests/script/tmp/prepare.sim
tests/script/tmp/prepare.sim
+1
-1
tests/script/tsim/stable/alter_comment.sim
tests/script/tsim/stable/alter_comment.sim
+8
-8
tests/script/tsim/stable/column_add.sim
tests/script/tsim/stable/column_add.sim
+4
-4
tests/script/tsim/stable/column_drop.sim
tests/script/tsim/stable/column_drop.sim
+4
-4
tests/script/tsim/stable/metrics.sim
tests/script/tsim/stable/metrics.sim
+3
-3
tests/script/tsim/stable/tag_add.sim
tests/script/tsim/stable/tag_add.sim
+4
-4
tests/script/tsim/stable/tag_drop.sim
tests/script/tsim/stable/tag_drop.sim
+5
-5
tests/script/tsim/table/autocreate.sim
tests/script/tsim/table/autocreate.sim
+3
-3
tests/script/tsim/table/basic3.sim
tests/script/tsim/table/basic3.sim
+4
-4
tests/script/tsim/table/createmulti.sim
tests/script/tsim/table/createmulti.sim
+4
-4
tests/script/tsim/user/privilege_sysinfo.sim
tests/script/tsim/user/privilege_sysinfo.sim
+2
-2
tests/script/tsim/valgrind/checkError5.sim
tests/script/tsim/valgrind/checkError5.sim
+2
-2
tests/system-test/1-insert/table_comment.py
tests/system-test/1-insert/table_comment.py
+2
-2
tests/system-test/2-query/distribute_agg_sum.py
tests/system-test/2-query/distribute_agg_sum.py
+1
-1
tests/system-test/2-query/twa.py
tests/system-test/2-query/twa.py
+1
-1
tests/system-test/5-taos-tools/taosdump/taosdumpTestColTag.py
...s/system-test/5-taos-tools/taosdump/taosdumpTestColTag.py
+5
-5
未找到文件。
tests/pytest/insert/insert_locking.py
浏览文件 @
15fae241
...
...
@@ -41,7 +41,7 @@ class TDTestCase:
tdSql
.
execute
(
'''create stable
db.stable_1 (ts timestamp, payload binary(256))
tags(t1 binary(16),t2 int);'''
)
sql
=
'''s
how db.stables
;'''
sql
=
'''s
elect * from information_schema.ins_stables where db_name = 'db'
;'''
tdSql
.
query
(
sql
)
tdSql
.
checkRows
(
1
)
...
...
tests/script/tmp/data.sim
浏览文件 @
15fae241
...
...
@@ -118,8 +118,8 @@ sql use db;
sql create table stb (ts timestamp, c int) tags (t int);
sql create table t0 using stb tags (0);
sql insert into t0 values(now, 1);
sql s
how db.stables
;
sql s
how db.tables
;
sql s
elect * from information_schema.ins_stables where db_name = 'db'
;
sql s
elect * from information_schema.ins_tables where db_name = 'db'
;
sql show db.vgroups;
return
...
...
tests/script/tmp/prepare.sim
浏览文件 @
15fae241
...
...
@@ -35,5 +35,5 @@ sql use db;
sql create table if not exists stb (ts timestamp, c1 int, c2 float, c3 double) tags (t1 int unsigned);
sql create table ct1 using stb tags(1000);
sql create table ct2 using stb tags(1000) ;
sql s
how db.tables
;
sql s
elect * from information_schema.ins_tables where db_name = 'db'
;
sql insert into ct1 values(now+0s, 10, 2.0, 3.0);
\ No newline at end of file
tests/script/tsim/stable/alter_comment.sim
浏览文件 @
15fae241
...
...
@@ -8,7 +8,7 @@ sql create database db
sql use db
sql create table db.stb (ts timestamp, c1 int, c2 binary(4)) tags(t1 int, t2 float, t3 binary(16)) comment "abd"
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $rows != 1 then
return -1
endi
...
...
@@ -33,7 +33,7 @@ sql alter table db.stb add column c3 int
sql alter table db.stb add column c4 bigint
sql alter table db.stb add column c5 binary(12)
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $rows != 1 then
return -1
endi
...
...
@@ -54,7 +54,7 @@ sql_error alter table db.stb drop column t3
sql alter table db.stb drop column c1
sql alter table db.stb drop column c4
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $rows != 1 then
return -1
endi
...
...
@@ -73,7 +73,7 @@ sql_error alter table db.stb MODIFY column t3 binary(20)
sql_error alter table db.stb MODIFY column c2 binary(3)
sql alter table db.stb MODIFY column c2 binary(32)
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $rows != 1 then
return -1
endi
...
...
@@ -98,7 +98,7 @@ sql alter table db.stb add tag t4 bigint
sql alter table db.stb add tag c1 int
sql alter table db.stb add tag t5 binary(12)
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $rows != 1 then
return -1
endi
...
...
@@ -119,7 +119,7 @@ sql_error alter table db.stb drop tag tx
sql alter table db.stb drop tag c1
sql alter table db.stb drop tag t5
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $rows != 1 then
return -1
endi
...
...
@@ -139,7 +139,7 @@ sql_error alter table db.stb MODIFY tag t1 binary(20)
sql_error alter table db.stb MODIFY tag tx binary(20)
sql alter table db.stb MODIFY tag t3 binary(32)
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $rows != 1 then
return -1
endi
...
...
@@ -161,7 +161,7 @@ print ========== alter common
sql alter table db.stb comment 'abcde' ;
sql_error alter table db.stb ttl 10 ;
sql s
how db.stables
;
sql s
elect * from information_schema.ins_stables where db_name = 'db'
;
if $data[0][6] != abcde then
return -1
endi
...
...
tests/script/tsim/stable/column_add.sim
浏览文件 @
15fae241
...
...
@@ -9,7 +9,7 @@ sql create table db.stb (ts timestamp, c1 int, c2 binary(4)) tags(t1 int, t2 flo
sql create table db.ctb using db.stb tags(101, 102, "103")
sql insert into db.ctb values(now, 1, "2")
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $rows != 1 then
return -1
endi
...
...
@@ -29,7 +29,7 @@ if $data[0][6] != abd then
return -1
endi
sql s
how db.tables
sql s
elect * from information_schema.ins_tables where db_name = 'db'
if $rows != 1 then
return -1
endi
...
...
@@ -74,12 +74,12 @@ sql_error alter table db.stb add column c1 int
print ========== step1 add column c3
sql alter table db.stb add column c3 int
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $data[0][3] != 4 then
return -1
endi
sql s
how db.tables
sql s
elect * from information_schema.ins_tables where db_name = 'db'
if $data[0][3] != 4 then
return -1
endi
...
...
tests/script/tsim/stable/column_drop.sim
浏览文件 @
15fae241
...
...
@@ -9,7 +9,7 @@ sql create table db.stb (ts timestamp, c1 int, c2 binary(4), c3 int, c4 bigint,
sql create table db.ctb using db.stb tags(101, 102, "103")
sql insert into db.ctb values(now, 1, "2", 3, 4, 5, 6)
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $rows != 1 then
return -1
endi
...
...
@@ -29,7 +29,7 @@ if $data[0][6] != abd then
return -1
endi
sql s
how db.tables
sql s
elect * from information_schema.ins_tables where db_name = 'db'
if $rows != 1 then
return -1
endi
...
...
@@ -86,12 +86,12 @@ sql_error alter table db.stb drop column c9
print ========== step1 drop column c6
sql alter table db.stb drop column c6
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $data[0][3] != 6 then
return -1
endi
sql s
how db.tables
sql s
elect * from information_schema.ins_tables where db_name = 'db'
if $data[0][3] != 6 then
return -1
endi
...
...
tests/script/tsim/stable/metrics.sim
浏览文件 @
15fae241
...
...
@@ -34,7 +34,7 @@ endi
print =============== step3
sql create table $mt (ts timestamp, speed int) TAGS(sp int)
sql s
how stables
sql s
elect * from information_schema.ins_stables where db_name = '$@db@'
if $rows != 1 then
return -1
endi
...
...
@@ -60,7 +60,7 @@ $i = 2
$tb = $tbPrefix . $i
sql create table $tb using $mt tags(3)
sql s
how tables
sql s
elect * from information_schema.ins_tables where db_name = '$@db@'
if $rows != 3 then
return -1
endi
...
...
@@ -68,7 +68,7 @@ if $data04 != $mt then
return -1
endi
sql s
how stables
sql s
elect * from information_schema.ins_stables where db_name = '$@db@'
if $rows != 1 then
return -1
endi
...
...
tests/script/tsim/stable/tag_add.sim
浏览文件 @
15fae241
...
...
@@ -9,7 +9,7 @@ sql create table db.stb (ts timestamp, c1 int, c2 binary(4)) tags(t1 int, t2 bin
sql create table db.ctb using db.stb tags(101, "102")
sql insert into db.ctb values(now, 1, "2")
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $rows != 1 then
return -1
endi
...
...
@@ -29,7 +29,7 @@ if $data[0][6] != abd then
return -1
endi
sql s
how db.tables
sql s
elect * from information_schema.ins_tables where db_name = 'db'
if $rows != 1 then
return -1
endi
...
...
@@ -78,12 +78,12 @@ sql_error alter table db.stb add tag c2 int
print ========== step1 add tag t3
sql alter table db.stb add tag t3 int
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $data[0][3] != 3 then
return -1
endi
sql s
how db.tables
sql s
elect * from information_schema.ins_tables where db_name = 'db'
if $data[0][3] != 3 then
return -1
endi
...
...
tests/script/tsim/stable/tag_drop.sim
浏览文件 @
15fae241
...
...
@@ -9,7 +9,7 @@ sql create table db.stb (ts timestamp, c1 int, c2 binary(4)) tags(t1 int, t2 bin
sql create table db.ctb using db.stb tags(101, "102")
sql insert into db.ctb values(now, 1, "2")
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $rows != 1 then
return -1
endi
...
...
@@ -29,7 +29,7 @@ if $data[0][6] != abd then
return -1
endi
sql s
how db.tables
sql s
elect * from information_schema.ins_tables where db_name = 'db'
if $rows != 1 then
return -1
endi
...
...
@@ -78,7 +78,7 @@ sql_error alter table db.stb drop tag c2 int
print ========== step1 drop tag t2
sql alter table db.stb drop tag t2
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $data[0][4] != 1 then
return -1
endi
...
...
@@ -112,7 +112,7 @@ endi
print ========== step2 add tag t3
sql alter table db.stb add tag t3 int
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $data[0][4] != 2 then
return -1
endi
...
...
@@ -300,7 +300,7 @@ endi
print ========== step7 drop tag t1
sql alter table db.stb drop tag t1
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $data[0][4] != 3 then
return -1
endi
...
...
tests/script/tsim/table/autocreate.sim
浏览文件 @
15fae241
...
...
@@ -15,7 +15,7 @@ print $data00 $data01 $data02
print =============== create super table
sql create table db.st1 (ts timestamp, i int) tags (j int)
sql create table db.st2 (ts timestamp, i int, j int) tags (t1 int, t2 int, t3 int)
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $rows != 2 then
return -1
endi
...
...
@@ -32,7 +32,7 @@ sql insert into db.c2 using db.st1 tags(2) values(now+1s, 2);
sql insert into db.c3 using db.st1 tags(3) values(now+1s, 3);
sql insert into db.c4 using db.st1 tags(4) values(now+1s, 4);
sql s
how db.tables
sql s
elect * from information_schema.ins_tables where db_name = 'db'
if $rows != 4 then
return -1
endi
...
...
@@ -76,7 +76,7 @@ sql insert into db.s2 using db.st2 tags(2, 2, 2) values(now+2s, 2, 3);
sql insert into db.s3 using db.st2 tags(3, 3, 3) values(now+2s, 3, 4);
sql insert into db.s4 using db.st2 tags(4, 4, 4) values(now+2s, 4, 5);
sql s
how db.tables
sql s
elect * from information_schema.ins_tables where db_name = 'db'
if $rows != 8 then
return -1
endi
...
...
tests/script/tsim/table/basic3.sim
浏览文件 @
15fae241
...
...
@@ -14,7 +14,7 @@ print $data00 $data01 $data02
print =============== create normal table
sql create table db.n1 (ts timestamp, i int)
sql s
how db.tables
sql s
elect * from information_schema.ins_tables where db_name = 'db'
if $rows != 1 then
return -1
endi
...
...
@@ -23,7 +23,7 @@ print $data00 $data01 $data02
print =============== create super table
sql create table db.st (ts timestamp, i int) tags (j int)
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $rows != 1 then
return -1
endi
...
...
@@ -33,7 +33,7 @@ print $data00 $data01 $data02
print =============== create child table
sql create table db.c1 using db.st tags(1)
sql create table db.c2 using db.st tags(2)
sql s
how db.tables
sql s
elect * from information_schema.ins_tables where db_name = 'db'
if $rows != 3 then
return -1
endi
...
...
@@ -71,7 +71,7 @@ endi
print =============== drop stable
sql drop table db.st
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $rows != 0 then
return -1
endi
...
...
tests/script/tsim/table/createmulti.sim
浏览文件 @
15fae241
...
...
@@ -15,7 +15,7 @@ print $data00 $data01 $data02
print =============== create super table
sql create table db.st1 (ts timestamp, i int) tags (j int)
sql create table db.st2 (ts timestamp, i int, j int) tags (t1 int, t2 int, t3 int)
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
if $rows != 2 then
return -1
endi
...
...
@@ -25,19 +25,19 @@ print $data00 $data01 $data02
print =============== create multiple child tables
sql create table db.ct1 using db.st1 tags(1) db.ct2 using db.st1 tags(2);
sql s
how db.tables
sql s
elect * from information_schema.ins_tables where db_name = 'db'
if $rows != 2 then
return -1
endi
sql create table db.ct3 using db.st2 tags(1, 1, 1) db.ct4 using db.st2 tags(2, 2, 2);
sql s
how db.tables
sql s
elect * from information_schema.ins_tables where db_name = 'db'
if $rows != 4 then
return -1
endi
sql create table db.ct5 using db.st1 tags(3) db.ct6 using db.st2 tags(3, 3, 3);
sql s
how db.tables
sql s
elect * from information_schema.ins_tables where db_name = 'db'
if $rows != 6 then
return -1
endi
...
...
tests/script/tsim/user/privilege_sysinfo.sim
浏览文件 @
15fae241
...
...
@@ -45,8 +45,8 @@ sql_error drop database db
sql_error use db
sql_error alter database db replica 1;
sql_error show db.vgroups
sql_error s
how db.stables
sql_error s
how db.tables
sql_error s
elect * from information_schema.ins_stables where db_name = 'db'
sql_error s
elect * from information_schema.ins_tables where db_name = 'db'
print =============== check show
sql_error select * from information_schema.ins_users
...
...
tests/script/tsim/valgrind/checkError5.sim
浏览文件 @
15fae241
...
...
@@ -68,13 +68,13 @@ sql select * from tb order by ts desc
print =============== step5: alter stb and insert data
sql create table stb (ts timestamp, c1 int, c2 binary(4)) tags(t1 int, t2 float, t3 binary(16)) comment "abd"
sql s
how db.stables
sql s
elect * from information_schema.ins_stables where db_name = 'db'
sql describe stb
sql_error alter table stb add column ts int
sql create table db.ctb using db.stb tags(101, 102, "103")
sql insert into db.ctb values(now, 1, "2")
sql s
how db.tables
sql s
elect * from information_schema.ins_tables where db_name = 'db'
sql select * from db.stb
sql select * from tb
...
...
tests/system-test/1-insert/table_comment.py
浏览文件 @
15fae241
...
...
@@ -105,13 +105,13 @@ class TDTestCase:
tdSql
.
error
(
f
'alter table
{
tbname
}
comment "
{
comment_info
}
"'
)
def
check_comment_info
(
self
,
comment_info
=
None
,
tb_type
=
''
):
if
tb_type
==
''
or
tb_type
==
'normal_table'
or
tb_type
==
'child_table'
:
tdSql
.
query
(
's
how tables
'
)
tdSql
.
query
(
's
elect * from information_schema.ins_tables where db_name =
\'
db
\'
'
)
if
comment_info
==
None
:
tdSql
.
checkEqual
(
tdSql
.
queryResult
[
0
][
8
],
None
)
else
:
tdSql
.
checkEqual
(
tdSql
.
queryResult
[
0
][
8
],
comment_info
)
elif
tb_type
==
'stable'
:
tdSql
.
query
(
's
how stables
'
)
tdSql
.
query
(
's
elect * from information_schema.ins_stables where db_name =
\'
db
\'
'
)
if
comment_info
==
None
:
tdSql
.
checkEqual
(
tdSql
.
queryResult
[
0
][
6
],
None
)
else
:
...
...
tests/system-test/2-query/distribute_agg_sum.py
浏览文件 @
15fae241
...
...
@@ -109,7 +109,7 @@ class TDTestCase:
vnode_tables
[
vgroup_id
[
0
]]
=
[]
# check sub_table of per vnode ,make sure sub_table has been distributed
tdSql
.
query
(
f
"s
how
{
dbname
}
.tables
like 'ct%'"
)
tdSql
.
query
(
f
"s
elect * from information_schema.ins_tables where db_name = '
{
dbname
}
' and table_name
like 'ct%'"
)
table_names
=
tdSql
.
queryResult
tablenames
=
[]
for
table_name
in
table_names
:
...
...
tests/system-test/2-query/twa.py
浏览文件 @
15fae241
...
...
@@ -69,7 +69,7 @@ class TDTestCase:
vnode_tables
[
vgroup_id
[
0
]]
=
[]
# check sub_table of per vnode ,make sure sub_table has been distributed
tdSql
.
query
(
"show tables
like 'ct%'"
)
tdSql
.
query
(
f
"select * from information_schema.ins_tables where db_name = 'testdb' and table_name
like 'ct%'"
)
table_names
=
tdSql
.
queryResult
tablenames
=
[]
for
table_name
in
table_names
:
...
...
tests/system-test/5-taos-tools/taosdump/taosdumpTestColTag.py
浏览文件 @
15fae241
...
...
@@ -288,16 +288,16 @@ class TDTestCase:
datacheck
=
self
.
table1_checkall
(
sql
)
tdSql
.
checkRows
(
4
)
tdSql
.
query
(
"s
how db.stables
like 'stable_1%' "
)
tdSql
.
query
(
"s
elect * from information_schema.ins_stables where db_name = 'db'
like 'stable_1%' "
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"s
how db.tables
like 'table%' "
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where db_name = 'db'
like 'table%' "
)
tdSql
.
checkRows
(
2
)
self
.
cr_tb1
=
"create_table_1~!@#$%^&*()-_+=[]{}':,<.>/?stST13579"
tdSql
.
execute
(
"create table db.`%s` as select avg(`%s`) from db.`%s` where ts > now interval(1m) sliding(30s);"
%
(
self
.
cr_tb1
,
self
.
col_bigint
,
self
.
stb1
))
tdSql
.
query
(
"s
how db.tables
like 'create_table_%' "
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where db_name = 'db'
like 'create_table_%' "
)
tdSql
.
checkRows
(
1
)
print
(
r
"==============drop\ add\ change\ modify column or tag"
)
...
...
@@ -696,7 +696,7 @@ class TDTestCase:
tdLog
.
exit
(
e
)
tdSql
.
error
(
"select * from db.`%s`"
%
self
.
tb1
)
tdSql
.
query
(
"s
how db.stables
like 'stable_1%' "
)
tdSql
.
query
(
"s
elect * from information_schema.ins_stables where db_name = 'db'
like 'stable_1%' "
)
tdSql
.
checkRows
(
1
)
try
:
...
...
@@ -785,7 +785,7 @@ class TDTestCase:
tdSql
.
execute
(
"create table `%s` as select * from `%s` ;"
%
(
self
.
cr_tb2
,
self
.
stb2
))
tdSql
.
query
(
"s
how db.tables
like 'create_table_%' "
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where db_name = 'db'
like 'create_table_%' "
)
tdSql
.
checkRows
(
1
)
print
(
"==============step3,#create regular_table; insert regular_table; show regular_table; select regular_table; drop regular_table"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录