Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
08810f73
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看板
未验证
提交
08810f73
编写于
6月 27, 2022
作者:
H
Hui Li
提交者:
GitHub
6月 27, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #14217 from taosdata/cases/TS-1438
test: add test cases for case sensitive
上级
30848167
35dedbd9
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
53 addition
and
0 deletion
+53
-0
tests/pytest/dbmgmt/dbNameCaseSensitive.py
tests/pytest/dbmgmt/dbNameCaseSensitive.py
+4
-0
tests/pytest/table/columnNameCaseSensitive.py
tests/pytest/table/columnNameCaseSensitive.py
+16
-0
tests/pytest/table/tagNameCaseSensitive.py
tests/pytest/table/tagNameCaseSensitive.py
+20
-0
tests/pytest/table/tbNameCaseSensitive.py
tests/pytest/table/tbNameCaseSensitive.py
+13
-0
未找到文件。
tests/pytest/dbmgmt/dbNameCaseSensitive.py
浏览文件 @
08810f73
...
...
@@ -73,6 +73,10 @@ class TDTestCase:
sql
=
tdSql
.
getData
(
0
,
1
)
tdSql
.
checkEqual
(
True
,
sql
.
startswith
(
"CREATE DATABASE `电力系统`"
))
tdSql
.
error
(
"create database ``"
)
tdSql
.
execute
(
"create database ` `"
)
tdSql
.
error
(
"create database ` `"
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
...
...
tests/pytest/table/columnNameCaseSensitive.py
浏览文件 @
08810f73
...
...
@@ -159,6 +159,22 @@ class TDTestCase:
tdSql
.
query
(
"select ts `时间戳` from tt3"
)
tdSql
.
checkRows
(
1
)
tdSql
.
error
(
"create table tt4(`` timestamp, c1 int)"
)
tdSql
.
error
(
"create table tt4(` ` timestamp, ` ` int)"
)
tdSql
.
error
(
"create table tt4(`tb1` timestamp, `tb1` int)"
)
ts
=
1656040651000
tdSql
.
execute
(
"create table `T4`(` ` timestamp, c1 int, `C1` int)"
)
tdSql
.
execute
(
"insert into `T4`(` `, `C1`) values(%d, 1)"
%
ts
)
tdSql
.
query
(
"select * from `T4`"
)
tdSql
.
checkRows
(
1
)
tdSql
.
execute
(
"delete from `T4` where ` ` = '2022-06-24 11:17:31.000'"
)
tdSql
.
query
(
"select * from `T4`"
)
tdSql
.
checkRows
(
0
)
tdSql
.
error
(
"alter table `T4` add column `` double"
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
...
...
tests/pytest/table/tagNameCaseSensitive.py
浏览文件 @
08810f73
...
...
@@ -56,6 +56,26 @@ class TDTestCase:
tdSql
.
query
(
"describe `STB5`"
)
tdSql
.
checkRows
(
5
)
ts
=
1656040651000
tdSql
.
error
(
"create table `STB6`(ts timestamp, c1 int) tags(`` int)"
)
tdSql
.
error
(
"create table `STB6`(ts timestamp, c1 int) tags(` ` int, ` ` binary(20))"
)
tdSql
.
execute
(
"create table `STB6`(ts timestamp, c1 int) tags(` ` int)"
)
tdSql
.
execute
(
"insert into tb6 using `STB6` tags(1) values(%d, 1)(%d, 2)(%d, 3)"
%
(
ts
,
ts
+
1000
,
ts
+
2000
))
tdSql
.
execute
(
"insert into tb7 using `STB6` tags(2) values(%d, 1)(%d, 2)(%d, 3)"
%
(
ts
,
ts
+
1000
,
ts
+
2000
))
tdSql
.
query
(
"select * from `STB6`"
)
tdSql
.
checkRows
(
6
)
tdSql
.
execute
(
"delete from `STB6` where ` ` = 1 and ts = '2022-06-24 11:17:31.000'"
)
tdSql
.
checkAffectedRows
(
1
)
tdSql
.
query
(
"select * from `STB6`"
)
tdSql
.
checkRows
(
5
)
tdSql
.
execute
(
"delete from `STB6` where ` ` = 2"
)
tdSql
.
checkAffectedRows
(
3
)
tdSql
.
query
(
"select * from `STB6`"
)
tdSql
.
checkRows
(
2
)
tdSql
.
error
(
"alter table `STB6` add tag `` nchar(20)"
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
...
...
tests/pytest/table/tbNameCaseSensitive.py
浏览文件 @
08810f73
...
...
@@ -120,6 +120,19 @@ class TDTestCase:
tdSql
.
query
(
"show create table `普通表`"
)
tdSql
.
checkData
(
0
,
1
,
"CREATE TABLE `普通表` (`ts` TIMESTAMP,`c1` INT)"
)
tdSql
.
error
(
"create table `` (ts timestamp, c1 int)"
)
tdSql
.
execute
(
"create table ` ` (ts timestamp, c1 int)"
)
tdSql
.
error
(
"create table ` ` (ts timestamp, c1 int)"
)
ts
=
1656040651000
tdSql
.
execute
(
"insert into ` ` values(%d, 1)"
%
ts
)
tdSql
.
query
(
"select * from ` `"
)
tdSql
.
checkRows
(
1
)
tdSql
.
execute
(
"delete from ` `"
)
tdSql
.
checkAffectedRows
(
1
)
tdSql
.
query
(
"select * from ` `"
)
tdSql
.
checkRows
(
0
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录