Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
d2350019
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
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看板
提交
d2350019
编写于
6月 15, 2022
作者:
J
jiacy-jcy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
25f04bae
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
4 addition
and
11 deletion
+4
-11
tests/system-test/1-insert/alter_table.py
tests/system-test/1-insert/alter_table.py
+4
-11
未找到文件。
tests/system-test/1-insert/alter_table.py
浏览文件 @
d2350019
...
...
@@ -52,8 +52,6 @@ class TDTestCase:
tdSql
.
execute
(
f
'create database if not exists
{
dbname
}
'
)
stbname
=
self
.
get_long_name
(
length
=
3
,
mode
=
"letters"
)
tbname
=
self
.
get_long_name
(
length
=
3
,
mode
=
"letters"
)
tdLog
.
info
(
'--------------------------child table tag check--------------------------------------'
)
tdLog
.
info
(
f
'-----------------create stable
{
stbname
}
and child table
{
tbname
}
-------------------'
)
tdSql
.
execute
(
f
'create stable if not exists
{
dbname
}
.
{
stbname
}
(col_ts timestamp, c1 int) tags (tag_ts timestamp, t1 tinyint, t2 smallint, t3 int,
\
t4 bigint, t5 tinyint unsigned, t6 smallint unsigned, t7 int unsigned, t8 bigint unsigned, t9 float, t10 double, t11 bool,t12 binary(20),t13 nchar(20))'
)
tdSql
.
execute
(
f
'create table if not exists
{
dbname
}
.
{
tbname
}
using
{
dbname
}
.
{
stbname
}
tags(now, 1, 2, 3, 4, 5, 6, 7, 8, 9.9, 10.1, True,"abc123","涛思数据")'
)
...
...
@@ -90,10 +88,10 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
15
,
tag_nchar
)
# bug TD-16211 insert length more than setting binary and nchar
tag_binary
=
self
.
get_long_name
(
length
=
21
,
mode
=
"letters"
)
tag_nchar
=
self
.
get_long_name
(
length
=
21
,
mode
=
"letters"
)
tdSql
.
error
(
f
'alter table
{
dbname
}
.
{
tbname
}
set tag t12 = "
{
tag_binary
}
"'
)
tdSql
.
error
(
f
'alter table
{
dbname
}
.
{
tbname
}
set tag t13 = "
{
tag_nchar
}
"'
)
# error_
tag_binary = self.get_long_name(length=21, mode="letters")
# error_
tag_nchar = self.get_long_name(length=21, mode="letters")
# tdSql.error(f'alter table {dbname}.{tbname} set tag t12 = "{error_
tag_binary}"')
# tdSql.error(f'alter table {dbname}.{tbname} set tag t13 = "{error_
tag_nchar}"')
# bug TD-16210 modify binary to nchar
tdSql
.
error
(
f
'alter table
{
dbname
}
.
{
tbname
}
modify tag t12 nchar(10)'
)
...
...
@@ -129,14 +127,12 @@ class TDTestCase:
# tdSql.execute(f'alter table {dbname}.{tbname} add column c16 binary(10)')
# tdSql.query(f'describe {dbname}.{tbname}')
# tdSql.checkRows(15)
# print(tdSql.queryResult)
# tdSql.checkEqual(tdSql.queryResult[14][2],10)
# tdSql.execute(f'alter table {dbname}.{tbname} drop column c16')
# tdSql.execute(f'alter table {dbname}.{tbname} add column c16 nchar(10)')
# tdSql.query(f'describe {dbname}.{tbname}')
# tdSql.checkRows(15)
# print(tdSql.queryResult)
# tdSql.checkEqual(tdSql.queryResult[14][2],10)
# tdSql.execute(f'alter table {dbname}.{tbname} drop column c16')
...
...
@@ -180,9 +176,6 @@ class TDTestCase:
tdSql
.
error
(
f
'alter table
{
dbname
}
.
{
tbname
}
modify column c10 float'
)
tdSql
.
error
(
f
'alter table
{
dbname
}
.
{
tbname
}
modify column c1 bool'
)
tdSql
.
error
(
f
'alter table
{
dbname
}
.
{
tbname
}
modify column c1 binary(10)'
)
tdSql
.
execute
(
f
'drop database
{
dbname
}
'
)
def
alter_stb_column_check
(
self
):
dbname
=
self
.
get_long_name
(
length
=
10
,
mode
=
"letters"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录