Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6eeff8f2
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看板
提交
6eeff8f2
编写于
1月 20, 2022
作者:
G
Ganlin Zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-13109]<fix>(query): Disable usage of match/nmatch/like/in/is(not) NULL operators in select
上级
431d5b0a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
50 addition
and
0 deletion
+50
-0
tests/develop-test/2-query/constant_compare.py
tests/develop-test/2-query/constant_compare.py
+50
-0
未找到文件。
tests/develop-test/2-query/constant_compare.py
浏览文件 @
6eeff8f2
...
...
@@ -1129,6 +1129,56 @@ class TDTestCase:
tdSql
.
error
(
'select 1 != 2 and 1 < 2 or
\'
abc123
\'
or 2 between
\'
abc123
\'
and 5 and false or "abc123" from tb;'
)
tdSql
.
error
(
'select
\'
1234
\'
or 1 < 2 or
\'
aace
\'
and "cde" between 4 and "def" and "ckas" or 10.1 from tb;'
)
#operator: is NULL
tdSql
.
error
(
'select 1 is NULL from tb;'
)
tdSql
.
error
(
'select 1.0 is NULL from tb;'
)
tdSql
.
error
(
'select true is NULL from tb;'
)
tdSql
.
error
(
'select
\'
a
\'
is NULL from tb;'
)
tdSql
.
error
(
'select "abc" is NULL from tb;'
)
tdSql
.
error
(
'select 1 is NULL and 1.0 is NULL or "abc" is NULL from tb;'
)
#operator: is not NULL
tdSql
.
error
(
'select 1 is not NULL from tb;'
)
tdSql
.
error
(
'select 1.0 is not NULL from tb;'
)
tdSql
.
error
(
'select true is not NULL from tb;'
)
tdSql
.
error
(
'select
\'
a
\'
is not NULL from tb;'
)
tdSql
.
error
(
'select "abc" is not NULL from tb;'
)
tdSql
.
error
(
'select 1 is not NULL and 1.0 is not NULL or "abc" is not NULL from tb;'
)
#operator: like
tdSql
.
error
(
'select 1 like 1 from tb;'
)
tdSql
.
error
(
'select 1.0 like 1.0 from tb;'
)
tdSql
.
error
(
'select true like true from tb;'
)
tdSql
.
error
(
'select
\'
abc
\'
like
\'
a_
\'
from tb;'
)
tdSql
.
error
(
'select "abc" like "ab__%" from tb;'
)
tdSql
.
error
(
'select 1 like 1 and 1.0 like 1.0 or "abc" like "a%" from tb;'
)
#operator: match
tdSql
.
error
(
'select 1 match 1 from tb;'
)
tdSql
.
error
(
'select 1.0 match 1.0 from tb;'
)
tdSql
.
error
(
'select true match true from tb;'
)
tdSql
.
error
(
'select
\'
abc
\'
match
\'
a_
\'
from tb;'
)
tdSql
.
error
(
'select "abc" match "ab__%" from tb;'
)
tdSql
.
error
(
'select 1 match 1 and 1.0 match 1.0 or "abc" match "a%" from tb;'
)
#operator: nmatch
tdSql
.
error
(
'select 1 nmatch 1 from tb;'
)
tdSql
.
error
(
'select 1.0 nmatch 1.0 from tb;'
)
tdSql
.
error
(
'select true nmatch true from tb;'
)
tdSql
.
error
(
'select
\'
abc
\'
nmatch
\'
a_
\'
from tb;'
)
tdSql
.
error
(
'select "abc" nmatch "ab__%" from tb;'
)
tdSql
.
error
(
'select 1 nmatch 1 and 1.0 nmatch 1.0 or "abc" nmatch "a%" from tb;'
)
#operator: in
tdSql
.
error
(
'select 1 in 1 from tb;'
)
tdSql
.
error
(
'select 1 in (1, 2, 3) from tb;'
)
tdSql
.
error
(
'select 1.0 in 1.0 from tb;'
)
tdSql
.
error
(
'select 1.0 in (1.0, 2.0, 3.0) from tb;'
)
tdSql
.
error
(
'select true in (true, false, true) from tb;'
)
tdSql
.
error
(
'select
\'
abc
\'
in (
\'
acd
\'
,
\'
bce
\'
) from tb;'
)
tdSql
.
error
(
'select "abc" in ("acd", "bce") from tb;'
)
tdSql
.
error
(
'select 1 in (1,2,3) and 1.0 in (1.0,2.0,3.0) or "abc" in ("abc","cde") from tb;'
)
tdSql
.
execute
(
'drop database db'
)
def
stop
(
self
):
tdSql
.
close
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录