Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e25a1bb3
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看板
提交
e25a1bb3
编写于
1月 14, 2022
作者:
G
Ganlin Zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-12945]<fix>(query): taos shell crash when constant comparison cause crash
上级
b5d8d7a5
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
175 addition
and
0 deletion
+175
-0
tests/develop-test/2-query/constant_compare.py
tests/develop-test/2-query/constant_compare.py
+175
-0
未找到文件。
tests/develop-test/2-query/constant_compare.py
浏览文件 @
e25a1bb3
...
...
@@ -95,6 +95,22 @@ class TDTestCase:
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select 1 = true from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select 0 = false from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select 1 = false from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
'select 0 = true from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
##operator: !=
tdSql
.
query
(
'select 1 != 1 from tb;'
)
tdSql
.
checkRows
(
1
)
...
...
@@ -136,6 +152,22 @@ class TDTestCase:
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
'select 1 != true from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
'select 0 != false from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
'select 1 != false from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select 0 != true from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
##operator: <>
tdSql
.
query
(
'select 1 <> 1 from tb;'
)
tdSql
.
checkRows
(
1
)
...
...
@@ -177,6 +209,22 @@ class TDTestCase:
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
'select 1 <> true from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
'select 0 <> false from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
'select 1 <> false from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select 0 <> true from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
##operator: <
tdSql
.
query
(
'select 1 < 1 from tb;'
)
tdSql
.
checkRows
(
1
)
...
...
@@ -218,6 +266,22 @@ class TDTestCase:
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
'select 0 < true from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select 1 < false from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
'select false < true from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select true < false from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
##operator: >
tdSql
.
query
(
'select 1 > 1 from tb;'
)
tdSql
.
checkRows
(
1
)
...
...
@@ -259,6 +323,22 @@ class TDTestCase:
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
'select 1 > false from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select 0 > true from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
'select false > true from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
'select true > false from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
##operator: <=
tdSql
.
query
(
'select 1 <= 2 from tb;'
)
tdSql
.
checkRows
(
1
)
...
...
@@ -312,6 +392,30 @@ class TDTestCase:
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select 0 <= true from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select 1 <= false from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
'select false <= true from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select true <= false from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
'select true >= true from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select false >= false from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
##operator: >=
tdSql
.
query
(
'select 1 >= 2 from tb;'
)
tdSql
.
checkRows
(
1
)
...
...
@@ -365,6 +469,29 @@ class TDTestCase:
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select 1 >= false from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select 0 >= true from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
'select false >= true from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
'select true >= false from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select false >= false from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select true >= true from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
##operator: between and
tdSql
.
query
(
'select 1 between 2 and 4 from tb;'
)
...
...
@@ -448,6 +575,38 @@ class TDTestCase:
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select false between 0 and 1 from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select false between 1 and 2 from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
'select true between 0 and 1 from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select true between -1 and 0 from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
'select 0 between false and true from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select 1 between false and true from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select 0 between false and 10 from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select 1 between true and 10 from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
##operator: and
tdSql
.
query
(
'select 10 and 10 from tb;'
)
tdSql
.
checkRows
(
1
)
...
...
@@ -481,6 +640,10 @@ class TDTestCase:
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select true and 10 and false from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
'select 1 and 2 and 3 and 10.1 and -20.02 and 22.03 from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
...
...
@@ -526,6 +689,10 @@ class TDTestCase:
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
query
(
'select true or 10 or false from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
##operator: multiple operations
tdSql
.
query
(
'select 1 and 1 != 2 and 1 < 2 and 2 between 1 and 3 from tb;'
)
tdSql
.
checkRows
(
1
)
...
...
@@ -563,6 +730,14 @@ class TDTestCase:
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select 1 != 2 and 1 < 2 or 1 >= 2 or 2 between 4 and 5 or true from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select 1 != 2 and 1 < 2 or 1 >= 2 or 2 between 4 and 5 and false from tb;'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录