Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
c31efb70
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c31efb70
编写于
6月 18, 2020
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-225] update script
上级
02f7098d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
102 addition
and
97 deletion
+102
-97
tests/script/general/parser/null_char.sim
tests/script/general/parser/null_char.sim
+102
-97
未找到文件。
tests/script/general/parser/null_char.sim
浏览文件 @
c31efb70
...
...
@@ -206,68 +206,71 @@ endi
################# binary
sql alter table st41 set tag tag_binary = "shanghai"
sql
describe
st41
if $data
23
!= shanghai then
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
00
!= shanghai then
return -1
endi
##### test 'space' case
#$tagvalue = '
#$tagvalue = $tagvalue '
#sql alter table st41 set tag tag_binary = $tagvalue
$tagvalue = ''
$tagvalue = $tagvalue '
sql alter table st41 set tag tag_binary = ""
#sql describe st41
#if $data23 != $tagvalue then
# return -1
#endi
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data00 != @@ then
print expect , actual $data00
return -1
endi
sql alter table st41 set tag tag_binary = "NULL"
sql
describe
st41
if $data
23
!= NULL then
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
00
!= NULL then
return -1
endi
sql alter table st41 set tag tag_binary = NULL
sql
describe
st41
if $data
23
!= NULL then
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
00
!= NULL then
print ==8== expect: NULL, actually: $data23
return -1
endi
################### nchar
sql alter table st41 set tag tag_nchar = "��˼����"
sql
describe
st41
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
#sleep 1000
#if $data
33
!= ��˼���� then
# print ==== expect ��˼����, actually $data
33
#if $data
01
!= ��˼���� then
# print ==== expect ��˼����, actually $data
01
# return -1
#endi
##### test 'space' case
#$tagvalue = '
#$tagvalue = $tagvalue '
sql alter table st41 set tag tag_nchar = ''
#sql
describe
st41
#if $data
33
!= $tagvalue then
#sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
#if $data
01
!= $tagvalue then
# return -1
#endi
sql alter table st41 set tag tag_nchar = "NULL"
sql
describe
st41
if $data
33
!= NULL then
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
01
!= NULL then
return -1
endi
sql alter table st41 set tag tag_nchar = NULL
#sql
describe
st41
#if $data
33
!= then
# print ==9== expect , actually $data
33
#sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
#if $data
01
!= then
# print ==9== expect , actually $data
01
# return -1
#endi
################### int
sql alter table st41 set tag tag_int = -2147483647
sql
describe
st41
if $data
43
!= -2147483647 then
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
02
!= -2147483647 then
return -1
endi
sql alter table st41 set tag tag_int = 2147483647
sql
describe
st41
if $data
43
!= 2147483647 then
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
02
!= 2147483647 then
return -1
endi
...
...
@@ -275,19 +278,19 @@ sql_error alter table st41 set tag tag_int = -2147483648
sql_error alter table st41 set tag tag_int = 2147483648
sql alter table st41 set tag tag_int = '-379'
sql
describe
st41
if $data
43
!= -379 then
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
02
!= -379 then
return -1
endi
sql alter table st41 set tag tag_int = -2000
sql
describe
st41
if $data
43
!= -2000 then
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
02
!= -2000 then
return -1
endi
sql alter table st41 set tag tag_int = NULL
sql
describe
st41
if $data
43
!= NULL then
print ==10== expect: NULL, actually: $data
43
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
02
!= NULL then
print ==10== expect: NULL, actually: $data
02
return -1
endi
sql alter table st41 set tag tag_int = 'NULL'
...
...
@@ -296,34 +299,34 @@ sql_error alter table st41 set tag tag_int = abc379
################### bool
sql alter table st41 set tag tag_bool = 'true'
sql
describe
st41
if $data
53 != true
then
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
03 != 1
then
return -1
endi
sql alter table st41 set tag tag_bool = 'false'
sql
describe
st41
if $data
53 != false
then
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
03 != 0
then
return -1
endi
sql alter table st41 set tag tag_bool = 0
sql
describe
st41
if $data
53 != false
then
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
03 != 0
then
return -1
endi
sql alter table st41 set tag tag_bool = 123
sql
describe
st41
if $data
53 != true
then
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
03 != 1
then
return -1
endi
sql alter table st41 set tag tag_bool = 'NULL'
sql
describe
st41
if $data
5
3 != NULL then
print ==14== expect: NULL, actually: $data
5
3
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
0
3 != NULL then
print ==14== expect: NULL, actually: $data
0
3
return -1
endi
sql alter table st41 set tag tag_bool = NULL
sql
describe
st41
if $data
5
3 != NULL then
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
0
3 != NULL then
return -1
endi
...
...
@@ -333,50 +336,51 @@ sql_error alter table st41 set tag tag_bool = abc379
################### float
sql alter table st41 set tag tag_float = -32
sql describe st41
if $data63 != -32.000000 then
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data04 != -32.00000 then
print expect -32.00000 actual $data04
return -1
endi
sql alter table st41 set tag tag_float = 54.123456
sql
describe
st41
if $data
63
!= 54.123455 then
print ==15== expect: 54.123455, actually: $data
63
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
04
!= 54.123455 then
print ==15== expect: 54.123455, actually: $data
04
# return -1
endi
sql alter table st41 set tag tag_float = 54.12345
sql
describe
st41
if $data
63 != 54.123451
then
print ==16== expect: 54.12345
1, actually: $data63
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
04 != 54.12345
then
print ==16== expect: 54.12345
, actually: $data04
return -1
endi
sql alter table st41 set tag tag_float = 54.12345678
sql
describe
st41
if $data
63 != 54.123455
then
print ==11== expect: 54.1234
55, actually : $data63
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
04 != 54.12346
then
print ==11== expect: 54.1234
6, actually : $data04
return -1
endi
sql alter table st41 set tag tag_float = NULL
sql
describe
st41
if $data
63
!= NULL then
print ==12== expect: NULL, actually : $data
63
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
04
!= NULL then
print ==12== expect: NULL, actually : $data
04
return -1
endi
sql alter table st41 set tag tag_float = 'NULL'
sql
describe
st41
if $data
63
!= NULL then
print ==17== expect: NULL, actually : $data
63
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
04
!= NULL then
print ==17== expect: NULL, actually : $data
04
return -1
endi
sql alter table st41 set tag tag_float = '54.123456'
sql
describe
st41
if $data
63 != 54.123455
then
print ==18== expect: 54.1234
55, actually : $data63
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
04 != 54.12346
then
print ==18== expect: 54.1234
6, actually : $data04
return -1
endi
sql alter table st41 set tag tag_float = '-54.123456'
sql
describe
st41
if $data
63 != -54.123455
then
print ==19== expect: -54.1234
55, actually : $data63
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
04 != -54.12346
then
print ==19== expect: -54.1234
6, actually : $data04
return -1
endi
sql_error alter table st41 set tag tag_float = ''
...
...
@@ -387,30 +391,32 @@ sql_error alter table st41 set tag tag_float = abc
################### double
sql alter table st41 set tag tag_double = -92
sql describe st41
if $data73 != -92.000000 then
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data05 != -92.000000000 then
print expect -92.000000000 actual $data05
return -1
endi
sql alter table st41 set tag tag_double = 184
sql describe st41
if $data73 != 184.000000 then
sql select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from st41
if $data05 != 184.000000000 then
print expect 184.000000000 actual $data05
return -1
endi
sql alter table st41 set tag tag_double = '-2456'
sql
describe
st41
if $data
73 != -2456.
000000 then
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
05 != -2456.000
000000 then
return -1
endi
sql alter table st41 set tag tag_double = NULL
sql
describe
st41
if $data
73
!= NULL then
print ==13== expect: NULL, actually : $data
73
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
05
!= NULL then
print ==13== expect: NULL, actually : $data
05
return -1
endi
sql alter table st41 set tag tag_double = 'NULL'
sql
describe
st41
if $data
73
!= NULL then
print ==20== expect: NULL, actually : $data
73
sql
select tag_binary, tag_nchar, tag_int, tag_bool, tag_float, tag_double from
st41
if $data
05
!= NULL then
print ==20== expect: NULL, actually : $data
05
return -1
endi
sql_error alter table st41 set tag tag_double = ''
...
...
@@ -427,23 +433,22 @@ sql alter table st51 set tag tag_bigint = '-379'
sql alter table st51 set tag tag_bigint = -2000
sql alter table st51 set tag tag_bigint = NULL
sql alter table st51 set tag tag_bigint = 9223372036854775807
sql
describe
st51
if $data
23
!= 9223372036854775807 then
sql
select tag_bigint, tag_smallint, tag_tinyint from
st51
if $data
00
!= 9223372036854775807 then
return -1
endi
sql alter table st51 set tag tag_bigint = 9223372036854775808
sql
describe
st51
if $data
23
!= 9223372036854775807 then
sql
select tag_bigint, tag_smallint, tag_tinyint from
st51
if $data
00
!= 9223372036854775807 then
return -1
endi
sql alter table st51 set tag tag_bigint = -9223372036854775807
sql
describe
st51
if $data
23
!= -9223372036854775807 then
sql
select tag_bigint, tag_smallint, tag_tinyint from
st51
if $data
00
!= -9223372036854775807 then
return -1
endi
sql_error alter table st51 set tag tag_bigint = -9223372036854775808
sql alter table st51 set tag tag_bigint = 'NULL'
sql_error alter table st51 set tag tag_bigint = ''
sql_error alter table st51 set tag tag_bigint = abc379
...
...
@@ -452,15 +457,15 @@ sql_error alter table st51 set tag tag_bigint = abc379
sql alter table st51 set tag tag_smallint = -2000
sql alter table st51 set tag tag_smallint = NULL
sql alter table st51 set tag tag_smallint = 32767
sql
describe
st51
if $data
33
!= 32767 then
sql
select tag_bigint, tag_smallint, tag_tinyint from
st51
if $data
01
!= 32767 then
return -1
endi
sql_error alter table st51 set tag tag_smallint = 32768
sql alter table st51 set tag tag_smallint = -32767
sql
describe
st51
if $data
33
!= -32767 then
sql
select tag_bigint, tag_smallint, tag_tinyint from
st51
if $data
01
!= -32767 then
return -1
endi
sql_error alter table st51 set tag tag_smallint = -32768
...
...
@@ -473,13 +478,13 @@ sql_error alter table st51 set tag tag_smallint = abc379
sql alter table st51 set tag tag_tinyint = -127
sql alter table st51 set tag tag_tinyint = NULL
sql alter table st51 set tag tag_tinyint = 127
sql
describe
st51
if $data
43
!= 127 then
sql
select tag_bigint, tag_smallint, tag_tinyint from
st51
if $data
02
!= 127 then
return -1
endi
sql alter table st51 set tag tag_tinyint = -127
sql
describe
st51
if $data
43
!= -127 then
sql
select tag_bigint, tag_smallint, tag_tinyint from
st51
if $data
02
!= -127 then
return -1
endi
sql_error alter table st51 set tag tag_tinyint = '-128'
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录