Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
03a39381
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
03a39381
编写于
8月 12, 2022
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enh: show command optimize
上级
15fae241
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
58 addition
and
58 deletion
+58
-58
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+1
-1
tests/script/tsim/parser/union.sim
tests/script/tsim/parser/union.sim
+1
-1
tests/system-test/0-others/taosShell.py
tests/system-test/0-others/taosShell.py
+1
-1
tests/system-test/0-others/taosShellError.py
tests/system-test/0-others/taosShellError.py
+1
-1
tests/system-test/0-others/user_control.py
tests/system-test/0-others/user_control.py
+12
-12
tests/system-test/2-query/bottom.py
tests/system-test/2-query/bottom.py
+1
-1
tests/system-test/2-query/distribute_agg_apercentile.py
tests/system-test/2-query/distribute_agg_apercentile.py
+1
-1
tests/system-test/2-query/distribute_agg_avg.py
tests/system-test/2-query/distribute_agg_avg.py
+1
-1
tests/system-test/2-query/distribute_agg_count.py
tests/system-test/2-query/distribute_agg_count.py
+1
-1
tests/system-test/2-query/distribute_agg_max.py
tests/system-test/2-query/distribute_agg_max.py
+1
-1
tests/system-test/2-query/distribute_agg_min.py
tests/system-test/2-query/distribute_agg_min.py
+1
-1
tests/system-test/2-query/distribute_agg_spread.py
tests/system-test/2-query/distribute_agg_spread.py
+1
-1
tests/system-test/2-query/distribute_agg_stddev.py
tests/system-test/2-query/distribute_agg_stddev.py
+1
-1
tests/system-test/2-query/explain.py
tests/system-test/2-query/explain.py
+2
-2
tests/system-test/2-query/first.py
tests/system-test/2-query/first.py
+1
-1
tests/system-test/2-query/hyperloglog.py
tests/system-test/2-query/hyperloglog.py
+1
-1
tests/system-test/2-query/last.py
tests/system-test/2-query/last.py
+1
-1
tests/system-test/2-query/max.py
tests/system-test/2-query/max.py
+1
-1
tests/system-test/2-query/top.py
tests/system-test/2-query/top.py
+1
-1
tests/system-test/2-query/ttl_comment.py
tests/system-test/2-query/ttl_comment.py
+27
-27
未找到文件。
source/libs/parser/src/parTranslater.c
浏览文件 @
03a39381
...
...
@@ -166,7 +166,7 @@ static const SSysTableShowAdapter sysTableShowAdapter[] = {
.
pDbName
=
TSDB_INFORMATION_SCHEMA_DB
,
.
pTableName
=
TSDB_INS_TABLE_USERS
,
.
numOfShowCols
=
1
,
.
pShowCols
=
{
"
name
"
}
.
pShowCols
=
{
"
*
"
}
},
{
.
showType
=
QUERY_NODE_SHOW_LICENCES_STMT
,
...
...
tests/script/tsim/parser/union.sim
浏览文件 @
03a39381
...
...
@@ -365,6 +365,6 @@ endi
sql_error (show tables) union all (show tables)
sql_error (show stables) union all (show stables)
sql_error (s
elect * from information_schema.ins_databases) union all (select * from information_schema.ins_
databases)
sql_error (s
how databases) union all (show
databases)
system sh/exec.sh -n dnode1 -s stop -x SIGINT
tests/system-test/0-others/taosShell.py
浏览文件 @
03a39381
...
...
@@ -302,7 +302,7 @@ class TDTestCase:
else
:
sql3
=
"echo 'create table ntbf (ts timestamp, c binary(40))' >> "
+
sqlFile
sql4
=
"echo 'insert into ntbf values (
\"
2021-04-01 08:00:00.000
\"
,
\"
test taos -f1
\"
)(
\"
2021-04-01 08:00:01.000
\"
,
\"
test taos -f2
\"
)' >> "
+
sqlFile
sql5
=
"echo s
elect * from information_schema.ins_
databases >> "
+
sqlFile
sql5
=
"echo s
how
databases >> "
+
sqlFile
os
.
system
(
sql1
)
os
.
system
(
sql2
)
os
.
system
(
sql3
)
...
...
tests/system-test/0-others/taosShellError.py
浏览文件 @
03a39381
...
...
@@ -244,7 +244,7 @@ class TDTestCase:
else
:
sql3
=
"echo 'create table ntbf (ts timestamp, c binary(40)) no this item' >> "
+
sqlFile
sql4
=
"echo 'insert into ntbf values (
\"
2021-04-01 08:00:00.000
\"
,
\"
test taos -f1
\"
)(
\"
2021-04-01 08:00:01.000
\"
,
\"
test taos -f2
\"
)' >> "
+
sqlFile
sql5
=
"echo s
elect * from information_schema.ins_
databases >> "
+
sqlFile
sql5
=
"echo s
how
databases >> "
+
sqlFile
os
.
system
(
sql1
)
os
.
system
(
sql2
)
os
.
system
(
sql3
)
...
...
tests/system-test/0-others/user_control.py
浏览文件 @
03a39381
...
...
@@ -196,7 +196,7 @@ class TDTestCase:
for
i
in
range
(
self
.
users_count
):
tdSql
.
execute
(
f
"create user
{
users
[
i
]
}
pass '
{
passwds
[
i
]
}
' "
)
tdSql
.
query
(
"s
elect * from information_schema.ins_
users"
)
tdSql
.
query
(
"s
how
users"
)
tdSql
.
checkRows
(
self
.
users_count
+
1
)
def
create_user_err
(
self
):
...
...
@@ -586,7 +586,7 @@ class TDTestCase:
# 默认只有 root 用户
tdLog
.
printNoPrefix
(
"==========step0: init, user list only has root account"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_
users"
)
tdSql
.
query
(
"s
how
users"
)
tdSql
.
checkData
(
0
,
0
,
"root"
)
tdSql
.
checkData
(
0
,
1
,
"1"
)
...
...
@@ -597,7 +597,7 @@ class TDTestCase:
# 查看用户
tdLog
.
printNoPrefix
(
"==========step2: show user test"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_
users"
)
tdSql
.
query
(
"s
how
users"
)
tdSql
.
checkRows
(
self
.
users_count
+
1
)
# 密码登录认证
...
...
@@ -619,7 +619,7 @@ class TDTestCase:
tdDnodes
.
stop
(
1
)
tdDnodes
.
start
(
1
)
tdSql
.
query
(
"s
elect * from information_schema.ins_
users"
)
tdSql
.
query
(
"s
how
users"
)
tdSql
.
checkRows
(
self
.
users_count
+
1
)
# 普通用户权限
...
...
@@ -632,7 +632,7 @@ class TDTestCase:
user
.
error
(
"create use utest1 pass 'utest1pass'"
)
# 可以查看用户
tdLog
.
printNoPrefix
(
"==========step4.2: normal user can show user"
)
user
.
query
(
"s
elect * from information_schema.ins_
users"
)
user
.
query
(
"s
how
users"
)
assert
user
.
queryRows
==
self
.
users_count
+
1
# 不可以修改其他用户的密码
tdLog
.
printNoPrefix
(
"==========step4.3: normal user can not alter other user pass"
)
...
...
@@ -649,12 +649,12 @@ class TDTestCase:
tdLog
.
printNoPrefix
(
"==========step5: enable info"
)
taos1_conn
=
taos
.
connect
(
user
=
self
.
__user_list
[
1
],
password
=
f
"new
{
self
.
__passwd_list
[
1
]
}
"
)
taos1_conn
.
query
(
f
"s
elect * from information_schema.ins_
databases"
)
taos1_conn
.
query
(
f
"s
how
databases"
)
tdSql
.
execute
(
f
"alter user
{
self
.
__user_list
[
1
]
}
enable 0"
)
tdSql
.
execute
(
f
"alter user
{
self
.
__user_list
[
2
]
}
enable 0"
)
taos1_except
=
True
try
:
taos1_conn
.
query
(
"s
elect * from information_schema.ins_
databases"
)
taos1_conn
.
query
(
"s
how
databases"
)
except
BaseException
:
taos1_except
=
False
if
taos1_except
:
...
...
@@ -674,13 +674,13 @@ class TDTestCase:
tdLog
.
printNoPrefix
(
"==========step6: sysinfo info"
)
taos3_conn
=
taos
.
connect
(
user
=
self
.
__user_list
[
3
],
password
=
f
"new
{
self
.
__passwd_list
[
3
]
}
"
)
taos3_conn
.
query
(
f
"s
elect * from information_schema.ins_
dnodes"
)
taos3_conn
.
query
(
f
"s
how
dnodes"
)
taos3_conn
.
query
(
f
"show
{
DBNAME
}
.vgroups"
)
tdSql
.
execute
(
f
"alter user
{
self
.
__user_list
[
3
]
}
sysinfo 0"
)
tdSql
.
execute
(
f
"alter user
{
self
.
__user_list
[
4
]
}
sysinfo 0"
)
taos3_except
=
True
try
:
taos3_conn
.
query
(
f
"s
elect * from information_schema.ins_
dnodes"
)
taos3_conn
.
query
(
f
"s
how
dnodes"
)
taos3_conn
.
query
(
f
"show
{
DBNAME
}
.vgroups"
)
except
BaseException
:
taos3_except
=
False
...
...
@@ -692,7 +692,7 @@ class TDTestCase:
taos4_conn
=
taos
.
connect
(
user
=
self
.
__user_list
[
4
],
password
=
f
"new
{
self
.
__passwd_list
[
4
]
}
"
)
taos4_except
=
True
try
:
taos4_conn
.
query
(
f
"s
elect * from information_schema.ins_
mnodes"
)
taos4_conn
.
query
(
f
"s
how
mnodes"
)
taos4_conn
.
query
(
f
"show
{
DBNAME
}
.vgroups"
)
except
BaseException
:
taos4_except
=
False
...
...
@@ -705,7 +705,7 @@ class TDTestCase:
tdLog
.
printNoPrefix
(
"==========step7: super user drop normal user"
)
self
.
test_drop_user
()
tdSql
.
query
(
"s
elect * from information_schema.ins_
users"
)
tdSql
.
query
(
"s
how
users"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
"root"
)
tdSql
.
checkData
(
0
,
1
,
"1"
)
...
...
@@ -719,7 +719,7 @@ class TDTestCase:
self
.
login_err
(
self
.
__user_list
[
1
],
self
.
__passwd_list
[
1
])
self
.
login_err
(
self
.
__user_list
[
1
],
f
"new
{
self
.
__passwd_list
[
1
]
}
"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_
users"
)
tdSql
.
query
(
"s
how
users"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
"root"
)
tdSql
.
checkData
(
0
,
1
,
"1"
)
...
...
tests/system-test/2-query/bottom.py
浏览文件 @
03a39381
...
...
@@ -109,7 +109,7 @@ class TDTestCase:
for
i
in
range
(
self
.
tbnum
):
tdSql
.
execute
(
f
"create table
{
stbname
}
_
{
i
}
using
{
stbname
}
tags(
{
tag_values
[
0
]
}
)"
)
self
.
insert_data
(
self
.
column_dict
,
f
'
{
stbname
}
_
{
i
}
'
,
self
.
rowNum
)
tdSql
.
query
(
f
's
how
{
self
.
dbname
}
.tables
'
)
tdSql
.
query
(
f
's
elect * from information_schema.ins_tables where db_name = "
{
self
.
dbname
}
"
'
)
vgroup_list
=
[]
for
i
in
range
(
len
(
tdSql
.
queryResult
)):
vgroup_list
.
append
(
tdSql
.
queryResult
[
i
][
6
])
...
...
tests/system-test/2-query/distribute_agg_apercentile.py
浏览文件 @
03a39381
...
...
@@ -69,7 +69,7 @@ class TDTestCase:
# 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/distribute_agg_avg.py
浏览文件 @
03a39381
...
...
@@ -86,7 +86,7 @@ class TDTestCase:
# 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/distribute_agg_count.py
浏览文件 @
03a39381
...
...
@@ -87,7 +87,7 @@ class TDTestCase:
# 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/distribute_agg_max.py
浏览文件 @
03a39381
...
...
@@ -88,7 +88,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/distribute_agg_min.py
浏览文件 @
03a39381
...
...
@@ -87,7 +87,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/distribute_agg_spread.py
浏览文件 @
03a39381
...
...
@@ -111,7 +111,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/distribute_agg_stddev.py
浏览文件 @
03a39381
...
...
@@ -120,7 +120,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/explain.py
浏览文件 @
03a39381
...
...
@@ -185,11 +185,11 @@ class TDTestCase:
tdLog
.
printNoPrefix
(
"===step 0: err case, must return err"
)
tdSql
.
error
(
f
"explain select hyperloglog(
{
INT_COL
}
) from
{
dbname
}
.ct8"
)
tdSql
.
error
(
f
"explain s
elect * from information_schema.ins_
databases "
)
tdSql
.
error
(
f
"explain s
how
databases "
)
tdSql
.
error
(
f
"explain show
{
dbname
}
.stables "
)
tdSql
.
error
(
f
"explain show
{
dbname
}
.tables "
)
tdSql
.
error
(
f
"explain show
{
dbname
}
.vgroups "
)
tdSql
.
error
(
f
"explain s
elect * from information_schema.ins_
dnodes "
)
tdSql
.
error
(
f
"explain s
how
dnodes "
)
tdSql
.
error
(
f
'''explain select hyperloglog(['
{
INT_COL
}
+
{
INT_COL
}
', '
{
INT_COL
}
+
{
BINT_COL
}
', '
{
INT_COL
}
+
{
SINT_COL
}
', '
{
INT_COL
}
+
{
TINT_COL
}
', '
{
INT_COL
}
+
{
FLOAT_COL
}
', '
{
INT_COL
}
+
{
DOUBLE_COL
}
', '
{
INT_COL
}
+
{
BOOL_COL
}
', '
{
INT_COL
}
+
{
BINARY_COL
}
', '
{
INT_COL
}
+
{
NCHAR_COL
}
', '
{
INT_COL
}
+
{
TS_COL
}
'])
from
{
dbname
}
.ct1
where ['
{
INT_COL
}
+
{
INT_COL
}
', '
{
INT_COL
}
+
{
BINT_COL
}
', '
{
INT_COL
}
+
{
SINT_COL
}
', '
{
INT_COL
}
+
{
TINT_COL
}
', '
{
INT_COL
}
+
{
FLOAT_COL
}
', '
{
INT_COL
}
+
{
DOUBLE_COL
}
', '
{
INT_COL
}
+
{
BOOL_COL
}
', '
{
INT_COL
}
+
{
BINARY_COL
}
', '
{
INT_COL
}
+
{
NCHAR_COL
}
', '
{
INT_COL
}
+
{
TS_COL
}
'] is not null
...
...
tests/system-test/2-query/first.py
浏览文件 @
03a39381
...
...
@@ -125,7 +125,7 @@ class TDTestCase:
tdSql
.
query
(
f
"select first(*) from
{
i
}
"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
query
(
f
'show
{
dbname
}
.tables'
)
tdSql
.
query
(
f
"select * from information_schema.ins_tables where db_name = '
{
dbname
}
'"
)
vgroup_list
=
[]
for
i
in
range
(
len
(
tdSql
.
queryResult
)):
vgroup_list
.
append
(
tdSql
.
queryResult
[
i
][
6
])
...
...
tests/system-test/2-query/hyperloglog.py
浏览文件 @
03a39381
...
...
@@ -232,7 +232,7 @@ class TDTestCase:
self
.
__create_stable
(
dbname
,
stbname
,
column_dict
,
tag_dict
)
for
i
in
range
(
childtable_num
):
tdSql
.
execute
(
f
"create table
{
dbname
}
.
{
stbname
}
_
{
i
}
using
{
dbname
}
.
{
stbname
}
tags('beijing')"
)
tdSql
.
query
(
f
'show
{
dbname
}
.tables'
)
tdSql
.
query
(
f
"select * from information_schema.ins_tables where db_name = '
{
dbname
}
'"
)
vgroup_list
=
[]
for
i
in
range
(
len
(
tdSql
.
queryResult
)):
vgroup_list
.
append
(
tdSql
.
queryResult
[
i
][
6
])
...
...
tests/system-test/2-query/last.py
浏览文件 @
03a39381
...
...
@@ -202,7 +202,7 @@ class TDTestCase:
f
"create table
{
stbname
}
_
{
i
}
using
{
stbname
}
tags('beijing')"
)
tdSql
.
execute
(
f
"insert into
{
stbname
}
_
{
i
}
(ts) values(%d)"
%
(
self
.
ts
-
1
-
i
))
tdSql
.
query
(
f
'show
{
dbname
}
.tables'
)
tdSql
.
query
(
f
"select * from information_schema.ins_tables where db_name = '
{
dbname
}
'"
)
vgroup_list
=
[]
for
i
in
range
(
len
(
tdSql
.
queryResult
)):
vgroup_list
.
append
(
tdSql
.
queryResult
[
i
][
6
])
...
...
tests/system-test/2-query/max.py
浏览文件 @
03a39381
...
...
@@ -167,7 +167,7 @@ class TDTestCase:
# check sub_table of per vnode ,make sure sub_table has been distributed
tdSql
.
query
(
"s
how tables
like 'ct%'"
)
tdSql
.
query
(
"s
elect * 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/2-query/top.py
浏览文件 @
03a39381
...
...
@@ -112,7 +112,7 @@ class TDTestCase:
for
i
in
range
(
self
.
tbnum
):
tdSql
.
execute
(
f
"create table
{
self
.
stbname
}
_
{
i
}
using
{
self
.
stbname
}
tags(
{
tag_values
[
0
]
}
)"
)
self
.
insert_data
(
self
.
column_dict
,
f
'
{
self
.
stbname
}
_
{
i
}
'
,
self
.
rowNum
)
tdSql
.
query
(
f
's
how
{
self
.
dbname
}
.tables
'
)
tdSql
.
query
(
f
's
elect * from information_schema.ins_tables where db_name = "
{
self
.
dbname
}
"
'
)
vgroup_list
=
[]
for
i
in
range
(
len
(
tdSql
.
queryResult
)):
vgroup_list
.
append
(
tdSql
.
queryResult
[
i
][
6
])
...
...
tests/system-test/2-query/ttl_comment.py
浏览文件 @
03a39381
...
...
@@ -41,50 +41,50 @@ class TDTestCase:
tdSql
.
execute
(
"create table normal_table2(ts timestamp, i int) comment '' ttl 3"
)
tdSql
.
execute
(
"create table normal_table3(ts timestamp, i int) ttl 2100000000020 comment 'hello'"
)
tdSql
.
query
(
"s
how tables
like 'normal_table1'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where table_name
like 'normal_table1'"
)
tdSql
.
checkData
(
0
,
0
,
'normal_table1'
)
tdSql
.
checkData
(
0
,
7
,
0
)
tdSql
.
checkData
(
0
,
8
,
None
)
tdSql
.
query
(
"s
how tables
like 'normal_table2'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where table_name
like 'normal_table2'"
)
tdSql
.
checkData
(
0
,
0
,
'normal_table2'
)
tdSql
.
checkData
(
0
,
7
,
3
)
tdSql
.
checkData
(
0
,
8
,
''
)
tdSql
.
query
(
"s
how tables
like 'normal_table3'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where table_name
like 'normal_table3'"
)
tdSql
.
checkData
(
0
,
0
,
'normal_table3'
)
tdSql
.
checkData
(
0
,
7
,
2147483647
)
tdSql
.
checkData
(
0
,
8
,
'hello'
)
tdSql
.
execute
(
"alter table normal_table1 comment 'nihao'"
)
tdSql
.
query
(
"s
how tables
like 'normal_table1'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where table_name
like 'normal_table1'"
)
tdSql
.
checkData
(
0
,
0
,
'normal_table1'
)
tdSql
.
checkData
(
0
,
8
,
'nihao'
)
tdSql
.
execute
(
"alter table normal_table1 comment ''"
)
tdSql
.
query
(
"s
how tables
like 'normal_table1'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where table_name
like 'normal_table1'"
)
tdSql
.
checkData
(
0
,
0
,
'normal_table1'
)
tdSql
.
checkData
(
0
,
8
,
''
)
tdSql
.
execute
(
"alter table normal_table2 comment 'fly'"
)
tdSql
.
query
(
"s
how tables
like 'normal_table2'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where table_name
like 'normal_table2'"
)
tdSql
.
checkData
(
0
,
0
,
'normal_table2'
)
tdSql
.
checkData
(
0
,
8
,
'fly'
)
tdSql
.
execute
(
"alter table normal_table3 comment 'fly'"
)
tdSql
.
query
(
"s
how tables
like 'normal_table3'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where table_name
like 'normal_table3'"
)
tdSql
.
checkData
(
0
,
0
,
'normal_table3'
)
tdSql
.
checkData
(
0
,
8
,
'fly'
)
tdSql
.
execute
(
"alter table normal_table1 ttl 1"
)
tdSql
.
query
(
"s
how tables
like 'normal_table1'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where table_name
like 'normal_table1'"
)
tdSql
.
checkData
(
0
,
0
,
'normal_table1'
)
tdSql
.
checkData
(
0
,
7
,
1
)
tdSql
.
execute
(
"alter table normal_table3 ttl 0"
)
tdSql
.
query
(
"s
how tables
like 'normal_table3'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where table_name
like 'normal_table3'"
)
tdSql
.
checkData
(
0
,
0
,
'normal_table3'
)
tdSql
.
checkData
(
0
,
7
,
0
)
...
...
@@ -95,38 +95,38 @@ class TDTestCase:
tdSql
.
execute
(
"create table super_table2(ts timestamp, i int) tags(t int) comment ''"
)
tdSql
.
execute
(
"create table super_table3(ts timestamp, i int) tags(t int) comment 'super'"
)
tdSql
.
query
(
"s
how stables
like 'super_table1'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_stables where stable_name
like 'super_table1'"
)
tdSql
.
checkData
(
0
,
0
,
'super_table1'
)
tdSql
.
checkData
(
0
,
6
,
None
)
tdSql
.
query
(
"s
how stables
like 'super_table2'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_stables where stable_name
like 'super_table2'"
)
tdSql
.
checkData
(
0
,
0
,
'super_table2'
)
tdSql
.
checkData
(
0
,
6
,
''
)
tdSql
.
query
(
"s
how stables
like 'super_table3'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_stables where stable_name
like 'super_table3'"
)
tdSql
.
checkData
(
0
,
0
,
'super_table3'
)
tdSql
.
checkData
(
0
,
6
,
'super'
)
tdSql
.
execute
(
"alter table super_table1 comment 'nihao'"
)
tdSql
.
query
(
"s
how stables
like 'super_table1'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_stables where stable_name
like 'super_table1'"
)
tdSql
.
checkData
(
0
,
0
,
'super_table1'
)
tdSql
.
checkData
(
0
,
6
,
'nihao'
)
tdSql
.
execute
(
"alter table super_table1 comment ''"
)
tdSql
.
query
(
"s
how stables
like 'super_table1'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_stables where stable_name
like 'super_table1'"
)
tdSql
.
checkData
(
0
,
0
,
'super_table1'
)
tdSql
.
checkData
(
0
,
6
,
''
)
tdSql
.
execute
(
"alter table super_table2 comment 'fly'"
)
tdSql
.
query
(
"s
how stables
like 'super_table2'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_stables where stable_name
like 'super_table2'"
)
tdSql
.
checkData
(
0
,
0
,
'super_table2'
)
tdSql
.
checkData
(
0
,
6
,
'fly'
)
tdSql
.
execute
(
"alter table super_table3 comment 'tdengine'"
)
tdSql
.
query
(
"s
how stables
like 'super_table3'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_stables where stable_name
like 'super_table3'"
)
tdSql
.
checkData
(
0
,
0
,
'super_table3'
)
tdSql
.
checkData
(
0
,
6
,
'tdengine'
)
...
...
@@ -138,61 +138,61 @@ class TDTestCase:
tdSql
.
execute
(
"insert into child_table4 using super_table1 tags(1) values(now, 1)"
)
tdSql
.
query
(
"s
how tables
like 'child_table1'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where table_name
like 'child_table1'"
)
tdSql
.
checkData
(
0
,
0
,
'child_table1'
)
tdSql
.
checkData
(
0
,
7
,
10
)
tdSql
.
checkData
(
0
,
8
,
None
)
tdSql
.
query
(
"s
how tables
like 'child_table2'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where table_name
like 'child_table2'"
)
tdSql
.
checkData
(
0
,
0
,
'child_table2'
)
tdSql
.
checkData
(
0
,
7
,
0
)
tdSql
.
checkData
(
0
,
8
,
''
)
tdSql
.
query
(
"s
how tables
like 'child_table3'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where table_name
like 'child_table3'"
)
tdSql
.
checkData
(
0
,
0
,
'child_table3'
)
tdSql
.
checkData
(
0
,
8
,
'child'
)
tdSql
.
query
(
"s
how tables
like 'child_table4'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where table_name
like 'child_table4'"
)
tdSql
.
checkData
(
0
,
0
,
'child_table4'
)
tdSql
.
checkData
(
0
,
7
,
0
)
tdSql
.
checkData
(
0
,
8
,
None
)
tdSql
.
execute
(
"alter table child_table1 comment 'nihao'"
)
tdSql
.
query
(
"s
how tables
like 'child_table1'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where table_name
like 'child_table1'"
)
tdSql
.
checkData
(
0
,
0
,
'child_table1'
)
tdSql
.
checkData
(
0
,
8
,
'nihao'
)
tdSql
.
execute
(
"alter table child_table1 comment ''"
)
tdSql
.
query
(
"s
how tables
like 'child_table1'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where table_name
like 'child_table1'"
)
tdSql
.
checkData
(
0
,
0
,
'child_table1'
)
tdSql
.
checkData
(
0
,
8
,
''
)
tdSql
.
execute
(
"alter table child_table2 comment 'fly'"
)
tdSql
.
query
(
"s
how tables
like 'child_table2'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where table_name
like 'child_table2'"
)
tdSql
.
checkData
(
0
,
0
,
'child_table2'
)
tdSql
.
checkData
(
0
,
8
,
'fly'
)
tdSql
.
execute
(
"alter table child_table3 comment 'tdengine'"
)
tdSql
.
query
(
"s
how tables
like 'child_table3'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where table_name
like 'child_table3'"
)
tdSql
.
checkData
(
0
,
0
,
'child_table3'
)
tdSql
.
checkData
(
0
,
8
,
'tdengine'
)
tdSql
.
execute
(
"alter table child_table4 comment 'tdengine'"
)
tdSql
.
query
(
"s
how tables
like 'child_table4'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where table_name
like 'child_table4'"
)
tdSql
.
checkData
(
0
,
0
,
'child_table4'
)
tdSql
.
checkData
(
0
,
8
,
'tdengine'
)
tdSql
.
execute
(
"alter table child_table4 ttl 9"
)
tdSql
.
query
(
"s
how tables
like 'child_table4'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where table_name
like 'child_table4'"
)
tdSql
.
checkData
(
0
,
0
,
'child_table4'
)
tdSql
.
checkData
(
0
,
7
,
9
)
tdSql
.
execute
(
"alter table child_table3 ttl 9"
)
tdSql
.
query
(
"s
how tables
like 'child_table3'"
)
tdSql
.
query
(
"s
elect * from information_schema.ins_tables where table_name
like 'child_table3'"
)
tdSql
.
checkData
(
0
,
0
,
'child_table3'
)
tdSql
.
checkData
(
0
,
7
,
9
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录