Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
81d42419
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
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看板
提交
81d42419
编写于
7月 29, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: add case
上级
7693950d
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
804 addition
and
990 deletion
+804
-990
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+9
-2
tests/script/tsim/parser/columnValue.sim
tests/script/tsim/parser/columnValue.sim
+0
-22
tests/script/tsim/parser/columnValue_bigint.sim
tests/script/tsim/parser/columnValue_bigint.sim
+88
-126
tests/script/tsim/parser/columnValue_bool.sim
tests/script/tsim/parser/columnValue_bool.sim
+158
-151
tests/script/tsim/parser/columnValue_double.sim
tests/script/tsim/parser/columnValue_double.sim
+114
-107
tests/script/tsim/parser/columnValue_float.sim
tests/script/tsim/parser/columnValue_float.sim
+135
-128
tests/script/tsim/parser/columnValue_int.sim
tests/script/tsim/parser/columnValue_int.sim
+88
-127
tests/script/tsim/parser/columnValue_smallint.sim
tests/script/tsim/parser/columnValue_smallint.sim
+92
-127
tests/script/tsim/parser/columnValue_tinyint.sim
tests/script/tsim/parser/columnValue_tinyint.sim
+90
-128
tests/script/tsim/parser/columnValue_unsign.sim
tests/script/tsim/parser/columnValue_unsign.sim
+30
-72
未找到文件。
tests/script/jenkins/basic.txt
浏览文件 @
81d42419
...
@@ -95,7 +95,14 @@
...
@@ -95,7 +95,14 @@
./test.sh -f tsim/parser/between_and.sim
./test.sh -f tsim/parser/between_and.sim
./test.sh -f tsim/parser/binary_escapeCharacter.sim
./test.sh -f tsim/parser/binary_escapeCharacter.sim
# TD-17738 ./test.sh -f tsim/parser/col_arithmetic_operation.sim
# TD-17738 ./test.sh -f tsim/parser/col_arithmetic_operation.sim
# TD-17661 ./test.sh -f tsim/parser/columnValue.sim
./test.sh -f tsim/parser/columnValue_bigint.sim
./test.sh -f tsim/parser/columnValue_bool.sim
./test.sh -f tsim/parser/columnValue_double.sim
./test.sh -f tsim/parser/columnValue_float.sim
./test.sh -f tsim/parser/columnValue_int.sim
./test.sh -f tsim/parser/columnValue_smallint.sim
./test.sh -f tsim/parser/columnValue_tinyint.sim
./test.sh -f tsim/parser/columnValue_unsign.sim
./test.sh -f tsim/parser/commit.sim
./test.sh -f tsim/parser/commit.sim
./test.sh -f tsim/parser/condition.sim
./test.sh -f tsim/parser/condition.sim
./test.sh -f tsim/parser/constCol.sim
./test.sh -f tsim/parser/constCol.sim
...
@@ -154,7 +161,7 @@
...
@@ -154,7 +161,7 @@
./test.sh -f tsim/parser/slimit.sim
./test.sh -f tsim/parser/slimit.sim
./test.sh -f tsim/parser/slimit1.sim
./test.sh -f tsim/parser/slimit1.sim
./test.sh -f tsim/parser/stableOp.sim
./test.sh -f tsim/parser/stableOp.sim
# TD-17661
./test.sh -f tsim/parser/tags_dynamically_specifiy.sim
./test.sh -f tsim/parser/tags_dynamically_specifiy.sim
./test.sh -f tsim/parser/tags_filter.sim
./test.sh -f tsim/parser/tags_filter.sim
./test.sh -f tsim/parser/tbnameIn.sim
./test.sh -f tsim/parser/tbnameIn.sim
./test.sh -f tsim/parser/timestamp.sim
./test.sh -f tsim/parser/timestamp.sim
...
...
tests/script/tsim/parser/columnValue.sim
已删除
100644 → 0
浏览文件 @
7693950d
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sql connect
print ========== columnValues.sim
sql drop database if exists db
sql create database db
sql use db
run tsim/parser/columnValue_bool.sim
run tsim/parser/columnValue_tinyint.sim
run tsim/parser/columnValue_smallint.sim
run tsim/parser/columnValue_int.sim
run tsim/parser/columnValue_bigint.sim
run tsim/parser/columnValue_float.sim
run tsim/parser/columnValue_double.sim
run tsim/parser/columnValue_unsign.sim
system sh/exec.sh -n dnode1 -s stop -x SIGINT
tests/script/tsim/parser/columnValue_bigint.sim
浏览文件 @
81d42419
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sql connect
sql connect
sql create database if not exists db
print ========== columnValues.sim
sql drop database if exists db
sql create database db
sql use db
sql use db
#### test the value of all data types in four cases: static create table, insert column value, synamic create table, alter tag value
#### test the value of all data types in four cases: static create table, insert column value, synamic create table, alter tag value
...
@@ -10,78 +17,64 @@ sql create table mt_bigint (ts timestamp, c bigint) tags (tagname bigint)
...
@@ -10,78 +17,64 @@ sql create table mt_bigint (ts timestamp, c bigint) tags (tagname bigint)
## case 00: static create table for test tag values
## case 00: static create table for test tag values
sql create table st_bigint_0 using mt_bigint tags (NULL)
sql create table st_bigint_0 using mt_bigint tags (NULL)
sql s
elect tagname
from st_bigint_0
sql s
how tags
from st_bigint_0
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql create table st_bigint_1 using mt_bigint tags (NULL)
sql create table st_bigint_1 using mt_bigint tags (NULL)
sql select tagname from st_bigint_1
sql show tags from st_bigint_1
if $data00 != NULL then
if $data05 != NULL then
return -1
endi
sql create table st_bigint_2 using mt_bigint tags ('NULL')
sql select tagname from st_bigint_2
if $data00 != NULL then
return -1
endi
sql create table st_bigint_3 using mt_bigint tags ('NULL')
sql select tagname from st_bigint_3
if $data00 != NULL then
return -1
endi
sql create table st_bigint_4 using mt_bigint tags ("NULL")
sql select tagname from st_bigint_4
if $data00 != NULL then
return -1
endi
sql create table st_bigint_5 using mt_bigint tags ("NULL")
sql select tagname from st_bigint_5
if $data00 != NULL then
return -1
return -1
endi
endi
sql_error create table st_bigint_2 using mt_bigint tags ('NULL')
sql_error create table st_bigint_3 using mt_bigint tags ('NULL')
sql_error create table st_bigint_4 using mt_bigint tags ("NULL")
sql_error create table st_bigint_5 using mt_bigint tags ("NULL")
sql create table st_bigint_6 using mt_bigint tags (-9223372036854775807)
sql create table st_bigint_6 using mt_bigint tags (-9223372036854775807)
sql s
elect tagname
from st_bigint_6
sql s
how tags
from st_bigint_6
if $data0
0
!= -9223372036854775807 then
if $data0
5
!= -9223372036854775807 then
return -1
return -1
endi
endi
sql create table st_bigint_7 using mt_bigint tags (9223372036854775807)
sql create table st_bigint_7 using mt_bigint tags (9223372036854775807)
sql s
elect tagname
from st_bigint_7
sql s
how tags
from st_bigint_7
if $data0
0
!= 9223372036854775807 then
if $data0
5
!= 9223372036854775807 then
return -1
return -1
endi
endi
sql create table st_bigint_8 using mt_bigint tags (37)
sql create table st_bigint_8 using mt_bigint tags (37)
sql s
elect tagname
from st_bigint_8
sql s
how tags
from st_bigint_8
if $data0
0
!= 37 then
if $data0
5
!= 37 then
return -1
return -1
endi
endi
sql create table st_bigint_9 using mt_bigint tags (-100)
sql create table st_bigint_9 using mt_bigint tags (-100)
sql s
elect tagname
from st_bigint_9
sql s
how tags
from st_bigint_9
if $data0
0
!= -100 then
if $data0
5
!= -100 then
return -1
return -1
endi
endi
sql create table st_bigint_10 using mt_bigint tags (+113)
sql create table st_bigint_10 using mt_bigint tags (+113)
sql s
elect tagname
from st_bigint_10
sql s
how tags
from st_bigint_10
if $data0
0
!= 113 then
if $data0
5
!= 113 then
return -1
return -1
endi
endi
sql create table st_bigint_11 using mt_bigint tags ('-100')
sql create table st_bigint_11 using mt_bigint tags ('-100')
sql s
elect tagname
from st_bigint_11
sql s
how tags
from st_bigint_11
if $data0
0
!= -100 then
if $data0
5
!= -100 then
return -1
return -1
endi
endi
sql create table st_bigint_12 using mt_bigint tags ("+78")
sql create table st_bigint_12 using mt_bigint tags ("+78")
sql s
elect tagname
from st_bigint_12
sql s
how tags
from st_bigint_12
if $data0
0
!= 78 then
if $data0
5
!= 78 then
return -1
return -1
endi
endi
sql create table st_bigint_13 using mt_bigint tags (+0078)
sql create table st_bigint_13 using mt_bigint tags (+0078)
sql s
elect tagname
from st_bigint_13
sql s
how tags
from st_bigint_13
if $data0
0
!= 78 then
if $data0
5
!= 78 then
return -1
return -1
endi
endi
sql create table st_bigint_14 using mt_bigint tags (-00078)
sql create table st_bigint_14 using mt_bigint tags (-00078)
sql s
elect tagname
from st_bigint_14
sql s
how tags
from st_bigint_14
if $data0
0
!= -78 then
if $data0
5
!= -78 then
return -1
return -1
endi
endi
...
@@ -102,38 +95,7 @@ endi
...
@@ -102,38 +95,7 @@ endi
if $data01 != NULL then
if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_bigint_2 values (now, 'NULL')
sql select * from st_bigint_2
if $rows != 1 then
return -1
endi
if $data01 != NULL then
return -1
endi
sql insert into st_bigint_3 values (now, 'NULL')
sql select * from st_bigint_3
if $rows != 1 then
return -1
endi
if $data01 != NULL then
return -1
endi
sql insert into st_bigint_4 values (now, "NULL")
sql select * from st_bigint_4
if $rows != 1 then
return -1
endi
if $data01 != NULL then
return -1
endi
sql insert into st_bigint_5 values (now, "NULL")
sql select * from st_bigint_5
if $rows != 1 then
return -1
endi
if $data01 != NULL then
return -1
endi
sql insert into st_bigint_6 values (now, 9223372036854775807)
sql insert into st_bigint_6 values (now, 9223372036854775807)
sql select * from st_bigint_6
sql select * from st_bigint_6
if $rows != 1 then
if $rows != 1 then
...
@@ -211,8 +173,8 @@ endi
...
@@ -211,8 +173,8 @@ endi
## case 02: dynamic create table for test tag values
## case 02: dynamic create table for test tag values
sql insert into st_bigint_16 using mt_bigint tags (NULL) values (now, NULL)
sql insert into st_bigint_16 using mt_bigint tags (NULL) values (now, NULL)
sql s
elect tagname
from st_bigint_16
sql s
how tags
from st_bigint_16
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_bigint_16
sql select * from st_bigint_16
...
@@ -221,8 +183,8 @@ if $data01 != NULL then
...
@@ -221,8 +183,8 @@ if $data01 != NULL then
endi
endi
sql insert into st_bigint_17 using mt_bigint tags (NULL) values (now, NULL)
sql insert into st_bigint_17 using mt_bigint tags (NULL) values (now, NULL)
sql s
elect tagname
from st_bigint_17
sql s
how tags
from st_bigint_17
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_bigint_17
sql select * from st_bigint_17
...
@@ -230,8 +192,8 @@ if $data01 != NULL then
...
@@ -230,8 +192,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_bigint_18 using mt_bigint tags ('NULL') values (now, 'NULL')
sql insert into st_bigint_18 using mt_bigint tags ('NULL') values (now, 'NULL')
sql s
elect tagname
from st_bigint_18
sql s
how tags
from st_bigint_18
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_bigint_18
sql select * from st_bigint_18
...
@@ -239,8 +201,8 @@ if $data01 != NULL then
...
@@ -239,8 +201,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_bigint_19 using mt_bigint tags ('NULL') values (now, 'NULL')
sql insert into st_bigint_19 using mt_bigint tags ('NULL') values (now, 'NULL')
sql s
elect tagname
from st_bigint_19
sql s
how tags
from st_bigint_19
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_bigint_19
sql select * from st_bigint_19
...
@@ -248,8 +210,8 @@ if $data01 != NULL then
...
@@ -248,8 +210,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_bigint_20 using mt_bigint tags ("NULL") values (now, "NULL")
sql insert into st_bigint_20 using mt_bigint tags ("NULL") values (now, "NULL")
sql s
elect tagname
from st_bigint_20
sql s
how tags
from st_bigint_20
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_bigint_20
sql select * from st_bigint_20
...
@@ -257,8 +219,8 @@ if $data01 != NULL then
...
@@ -257,8 +219,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_bigint_21 using mt_bigint tags ("NULL") values (now, "NULL")
sql insert into st_bigint_21 using mt_bigint tags ("NULL") values (now, "NULL")
sql s
elect tagname
from st_bigint_21
sql s
how tags
from st_bigint_21
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_bigint_21
sql select * from st_bigint_21
...
@@ -266,8 +228,8 @@ if $data01 != NULL then
...
@@ -266,8 +228,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_bigint_22 using mt_bigint tags (9223372036854775807) values (now, 9223372036854775807)
sql insert into st_bigint_22 using mt_bigint tags (9223372036854775807) values (now, 9223372036854775807)
sql s
elect tagname
from st_bigint_22
sql s
how tags
from st_bigint_22
if $data0
0
!= 9223372036854775807 then
if $data0
5
!= 9223372036854775807 then
return -1
return -1
endi
endi
sql select * from st_bigint_22
sql select * from st_bigint_22
...
@@ -275,8 +237,8 @@ if $data01 != 9223372036854775807 then
...
@@ -275,8 +237,8 @@ if $data01 != 9223372036854775807 then
return -1
return -1
endi
endi
sql insert into st_bigint_23 using mt_bigint tags (-9223372036854775807) values (now, -9223372036854775807)
sql insert into st_bigint_23 using mt_bigint tags (-9223372036854775807) values (now, -9223372036854775807)
sql s
elect tagname
from st_bigint_23
sql s
how tags
from st_bigint_23
if $data0
0
!= -9223372036854775807 then
if $data0
5
!= -9223372036854775807 then
return -1
return -1
endi
endi
sql select * from st_bigint_23
sql select * from st_bigint_23
...
@@ -284,8 +246,8 @@ if $data01 != -9223372036854775807 then
...
@@ -284,8 +246,8 @@ if $data01 != -9223372036854775807 then
return -1
return -1
endi
endi
sql insert into st_bigint_24 using mt_bigint tags (10) values (now, 10)
sql insert into st_bigint_24 using mt_bigint tags (10) values (now, 10)
sql s
elect tagname
from st_bigint_24
sql s
how tags
from st_bigint_24
if $data0
0
!= 10 then
if $data0
5
!= 10 then
return -1
return -1
endi
endi
sql select * from st_bigint_24
sql select * from st_bigint_24
...
@@ -293,8 +255,8 @@ if $data01 != 10 then
...
@@ -293,8 +255,8 @@ if $data01 != 10 then
return -1
return -1
endi
endi
sql insert into st_bigint_25 using mt_bigint tags ("-0") values (now, "-0")
sql insert into st_bigint_25 using mt_bigint tags ("-0") values (now, "-0")
sql s
elect tagname
from st_bigint_25
sql s
how tags
from st_bigint_25
if $data0
0
!= 0 then
if $data0
5
!= 0 then
return -1
return -1
endi
endi
sql select * from st_bigint_25
sql select * from st_bigint_25
...
@@ -302,8 +264,8 @@ if $data01 != 0 then
...
@@ -302,8 +264,8 @@ if $data01 != 0 then
return -1
return -1
endi
endi
sql insert into st_bigint_26 using mt_bigint tags ('123') values (now, '123')
sql insert into st_bigint_26 using mt_bigint tags ('123') values (now, '123')
sql s
elect tagname
from st_bigint_26
sql s
how tags
from st_bigint_26
if $data0
0
!= 123 then
if $data0
5
!= 123 then
return -1
return -1
endi
endi
sql select * from st_bigint_26
sql select * from st_bigint_26
...
@@ -311,8 +273,8 @@ if $data01 != 123 then
...
@@ -311,8 +273,8 @@ if $data01 != 123 then
return -1
return -1
endi
endi
sql insert into st_bigint_27 using mt_bigint tags (+056) values (now, +00056)
sql insert into st_bigint_27 using mt_bigint tags (+056) values (now, +00056)
sql s
elect tagname
from st_bigint_27
sql s
how tags
from st_bigint_27
if $data0
0
!= 56 then
if $data0
5
!= 56 then
return -1
return -1
endi
endi
sql select * from st_bigint_27
sql select * from st_bigint_27
...
@@ -320,8 +282,8 @@ if $data01 != 56 then
...
@@ -320,8 +282,8 @@ if $data01 != 56 then
return -1
return -1
endi
endi
sql insert into st_bigint_28 using mt_bigint tags (-056) values (now, -0056)
sql insert into st_bigint_28 using mt_bigint tags (-056) values (now, -0056)
sql s
elect tagname
from st_bigint_28
sql s
how tags
from st_bigint_28
if $data0
0
!= -56 then
if $data0
5
!= -56 then
return -1
return -1
endi
endi
sql select * from st_bigint_28
sql select * from st_bigint_28
...
@@ -331,50 +293,50 @@ endi
...
@@ -331,50 +293,50 @@ endi
### case 03: alter tag values
### case 03: alter tag values
#sql alter table st_bigint_0 set tag tagname=9223372036854775807
#sql alter table st_bigint_0 set tag tagname=9223372036854775807
#sql s
elect tagname
from st_bigint_0
#sql s
how tags
from st_bigint_0
#if $data0
0
!= 9223372036854775807 then
#if $data0
5
!= 9223372036854775807 then
# return -1
# return -1
#endi
#endi
#sql alter table st_bigint_0 set tag tagname=-9223372036854775807
#sql alter table st_bigint_0 set tag tagname=-9223372036854775807
#sql s
elect tagname
from st_bigint_0
#sql s
how tags
from st_bigint_0
#if $data0
0
!= -9223372036854775807 then
#if $data0
5
!= -9223372036854775807 then
# return -1
# return -1
#endi
#endi
#sql alter table st_bigint_0 set tag tagname=+100
#sql alter table st_bigint_0 set tag tagname=+100
#sql s
elect tagname
from st_bigint_0
#sql s
how tags
from st_bigint_0
#if $data0
0
!= 100 then
#if $data0
5
!= 100 then
# return -1
# return -1
#endi
#endi
#sql alter table st_bigint_0 set tag tagname=-33
#sql alter table st_bigint_0 set tag tagname=-33
#sql s
elect tagname
from st_bigint_0
#sql s
how tags
from st_bigint_0
#if $data0
0
!= -33 then
#if $data0
5
!= -33 then
# return -1
# return -1
#endi
#endi
#sql alter table st_bigint_0 set tag tagname='+98'
#sql alter table st_bigint_0 set tag tagname='+98'
#sql s
elect tagname
from st_bigint_0
#sql s
how tags
from st_bigint_0
#if $data0
0
!= 98 then
#if $data0
5
!= 98 then
# return -1
# return -1
#endi
#endi
#sql alter table st_bigint_0 set tag tagname='-076'
#sql alter table st_bigint_0 set tag tagname='-076'
#sql s
elect tagname
from st_bigint_0
#sql s
how tags
from st_bigint_0
#if $data0
0
!= -76 then
#if $data0
5
!= -76 then
# return -1
# return -1
#endi
#endi
#sql alter table st_bigint_0 set tag tagname=+0012
#sql alter table st_bigint_0 set tag tagname=+0012
#sql s
elect tagname
from st_bigint_0
#sql s
how tags
from st_bigint_0
#if $data0
0
!= 12 then
#if $data0
5
!= 12 then
# return -1
# return -1
#endi
#endi
#sql alter table st_bigint_0 set tag tagname=-00063
#sql alter table st_bigint_0 set tag tagname=-00063
#sql s
elect tagname
from st_bigint_0
#sql s
how tags
from st_bigint_0
#if $data0
0
!= -63 then
#if $data0
5
!= -63 then
# return -1
# return -1
#endi
#endi
## case 04: illegal input
## case 04: illegal input
################## when overflow, auto set max
################## when overflow, auto set max
sql_error create table st_bigint_e0 using mt_bigint tags (9223372036854775808)
sql_error create table st_bigint_e0 using mt_bigint tags (9223372036854775808)
sql
_error
create table st_bigint_e0_1 using mt_bigint tags (-9223372036854775808)
sql create table st_bigint_e0_1 using mt_bigint tags (-9223372036854775808)
sql_error create table st_bigint_e0_2 using mt_bigint tags (92233720368547758080)
sql_error create table st_bigint_e0_2 using mt_bigint tags (92233720368547758080)
sql_error create table st_bigint_e0_3 using mt_bigint tags (-9223372036854775809)
sql_error create table st_bigint_e0_3 using mt_bigint tags (-9223372036854775809)
#sql_error create table st_bigint_e0 using mt_bigint tags (12.80) truncate integer part
#sql_error create table st_bigint_e0 using mt_bigint tags (12.80) truncate integer part
...
@@ -384,7 +346,7 @@ sql_error create table st_bigint_e0 using mt_bigint tags ("123abc")
...
@@ -384,7 +346,7 @@ sql_error create table st_bigint_e0 using mt_bigint tags ("123abc")
sql_error create table st_bigint_e0 using mt_bigint tags (abc)
sql_error create table st_bigint_e0 using mt_bigint tags (abc)
sql_error create table st_bigint_e0 using mt_bigint tags ("abc")
sql_error create table st_bigint_e0 using mt_bigint tags ("abc")
sql_error create table st_bigint_e0 using mt_bigint tags (" ")
sql_error create table st_bigint_e0 using mt_bigint tags (" ")
sql
_error create table st_bigint_e0
using mt_bigint tags ('')
sql
create table st_bigint_e0_error
using mt_bigint tags ('')
sql create table st_bigint_e0 using mt_bigint tags (123)
sql create table st_bigint_e0 using mt_bigint tags (123)
sql create table st_bigint_e1 using mt_bigint tags (123)
sql create table st_bigint_e1 using mt_bigint tags (123)
...
@@ -401,9 +363,9 @@ sql create table st_bigint_e11 using mt_bigint tags (123)
...
@@ -401,9 +363,9 @@ sql create table st_bigint_e11 using mt_bigint tags (123)
sql create table st_bigint_e12 using mt_bigint tags (123)
sql create table st_bigint_e12 using mt_bigint tags (123)
sql_error insert into st_bigint_e0 values (now, 9223372036854775808)
sql_error insert into st_bigint_e0 values (now, 9223372036854775808)
sql
_error
insert into st_bigint_e1 values (now, -9223372036854775808)
sql insert into st_bigint_e1 values (now, -9223372036854775808)
sql_error insert into st_bigint_e2 values (now, 9223372036854775809)
sql_error insert into st_bigint_e2 values (now, 9223372036854775809)
sql
_error
insert into st_bigint_e3 values (now, -9223372036854775808)
sql insert into st_bigint_e3 values (now, -9223372036854775808)
#sql_error insert into st_bigint_e4 values (now, 922337203.6854775808)
#sql_error insert into st_bigint_e4 values (now, 922337203.6854775808)
#sql_error insert into st_bigint_e5 values (now, -922337203685477580.9)
#sql_error insert into st_bigint_e5 values (now, -922337203685477580.9)
sql_error insert into st_bigint_e6 values (now, 123abc)
sql_error insert into st_bigint_e6 values (now, 123abc)
...
@@ -411,10 +373,10 @@ sql_error insert into st_bigint_e7 values (now, "123abc")
...
@@ -411,10 +373,10 @@ sql_error insert into st_bigint_e7 values (now, "123abc")
sql_error insert into st_bigint_e9 values (now, abc)
sql_error insert into st_bigint_e9 values (now, abc)
sql_error insert into st_bigint_e10 values (now, "abc")
sql_error insert into st_bigint_e10 values (now, "abc")
sql_error insert into st_bigint_e11 values (now, " ")
sql_error insert into st_bigint_e11 values (now, " ")
sql
_error
insert into st_bigint_e12 values (now, '')
sql insert into st_bigint_e12 values (now, '')
sql_error insert into st_bigint_e13 using mt_bigint tags (033) values (now, 9223372036854775808)
sql_error insert into st_bigint_e13 using mt_bigint tags (033) values (now, 9223372036854775808)
sql
_error
insert into st_bigint_e14 using mt_bigint tags (033) values (now, -9223372036854775808)
sql insert into st_bigint_e14 using mt_bigint tags (033) values (now, -9223372036854775808)
sql_error insert into st_bigint_e15 using mt_bigint tags (033) values (now, 9223372036854775818)
sql_error insert into st_bigint_e15 using mt_bigint tags (033) values (now, 9223372036854775818)
sql_error insert into st_bigint_e16 using mt_bigint tags (033) values (now, -9923372036854775808)
sql_error insert into st_bigint_e16 using mt_bigint tags (033) values (now, -9923372036854775808)
#sql_error insert into st_bigint_e17 using mt_bigint tags (033) values (now, 92233720368547758.08)
#sql_error insert into st_bigint_e17 using mt_bigint tags (033) values (now, 92233720368547758.08)
...
@@ -424,10 +386,10 @@ sql_error insert into st_bigint_e20 using mt_bigint tags (033) values (now, "123
...
@@ -424,10 +386,10 @@ sql_error insert into st_bigint_e20 using mt_bigint tags (033) values (now, "123
sql_error insert into st_bigint_e22 using mt_bigint tags (033) values (now, abc)
sql_error insert into st_bigint_e22 using mt_bigint tags (033) values (now, abc)
sql_error insert into st_bigint_e23 using mt_bigint tags (033) values (now, "abc")
sql_error insert into st_bigint_e23 using mt_bigint tags (033) values (now, "abc")
sql_error insert into st_bigint_e24 using mt_bigint tags (033) values (now, " ")
sql_error insert into st_bigint_e24 using mt_bigint tags (033) values (now, " ")
sql
_error
insert into st_bigint_e25 using mt_bigint tags (033) values (now, '')
sql insert into st_bigint_e25 using mt_bigint tags (033) values (now, '')
sql_error insert into st_bigint_e13_0 using mt_bigint tags (9223372036854775808) values (now, -033)
sql_error insert into st_bigint_e13_0 using mt_bigint tags (9223372036854775808) values (now, -033)
sql
_error
insert into st_bigint_e14_0 using mt_bigint tags (-9223372036854775808) values (now, -033)
sql insert into st_bigint_e14_0 using mt_bigint tags (-9223372036854775808) values (now, -033)
sql_error insert into st_bigint_e15_0 using mt_bigint tags (9223372036854775809) values (now, -033)
sql_error insert into st_bigint_e15_0 using mt_bigint tags (9223372036854775809) values (now, -033)
sql_error insert into st_bigint_e16_0 using mt_bigint tags (-9223372036854775898) values (now, -033)
sql_error insert into st_bigint_e16_0 using mt_bigint tags (-9223372036854775898) values (now, -033)
#sql_error insert into st_bigint_e17 using mt_bigint tags (12.80) values (now, -033)
#sql_error insert into st_bigint_e17 using mt_bigint tags (12.80) values (now, -033)
...
@@ -437,7 +399,7 @@ sql_error insert into st_bigint_e20 using mt_bigint tags ("123abc") values (now,
...
@@ -437,7 +399,7 @@ sql_error insert into st_bigint_e20 using mt_bigint tags ("123abc") values (now,
sql_error insert into st_bigint_e22 using mt_bigint tags (abc) values (now, -033)
sql_error insert into st_bigint_e22 using mt_bigint tags (abc) values (now, -033)
sql_error insert into st_bigint_e23 using mt_bigint tags ("abc") values (now, -033)
sql_error insert into st_bigint_e23 using mt_bigint tags ("abc") values (now, -033)
sql_error insert into st_bigint_e24 using mt_bigint tags (" ") values (now, -033)
sql_error insert into st_bigint_e24 using mt_bigint tags (" ") values (now, -033)
sql
_error
insert into st_bigint_e25 using mt_bigint tags ('') values (now, -033)
sql insert into st_bigint_e25 using mt_bigint tags ('') values (now, -033)
sql insert into st_bigint_e13 using mt_bigint tags (033) values (now, 00062)
sql insert into st_bigint_e13 using mt_bigint tags (033) values (now, 00062)
sql insert into st_bigint_e14 using mt_bigint tags (033) values (now, 00062)
sql insert into st_bigint_e14 using mt_bigint tags (033) values (now, 00062)
...
...
tests/script/tsim/parser/columnValue_bool.sim
浏览文件 @
81d42419
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sql connect
sql connect
sql create database if not exists db
print ========== columnValues.sim
sql drop database if exists db
sql create database db
sql use db
sql use db
#### test the value of all data types in four cases: static create table, insert column value, synamic create table, alter tag value
#### test the value of all data types in four cases: static create table, insert column value, synamic create table, alter tag value
...
@@ -10,110 +17,110 @@ sql create table mt_bool (ts timestamp, c bool) tags (tagname bool)
...
@@ -10,110 +17,110 @@ sql create table mt_bool (ts timestamp, c bool) tags (tagname bool)
## case 00: static create table for test tag values
## case 00: static create table for test tag values
sql create table st_bool_0 using mt_bool tags (NULL)
sql create table st_bool_0 using mt_bool tags (NULL)
sql s
elect tagname
from st_bool_0
sql s
how tags
from st_bool_0
if $data0
0
!= NULL then
if $data0
5
!= NULL then
print ==1== expect: NULL, actually: $data0
0
print ==1== expect: NULL, actually: $data0
5
return -1
return -1
endi
endi
sql create table st_bool_1 using mt_bool tags (NULL)
sql create table st_bool_1 using mt_bool tags (NULL)
sql s
elect tagname
from st_bool_1
sql s
how tags
from st_bool_1
if $data0
0
!= NULL then
if $data0
5
!= NULL then
print ==2== expect: NULL, actually: $data0
0
print ==2== expect: NULL, actually: $data0
5
return -1
return -1
endi
endi
sql create table st_bool_2 using mt_bool tags ('NULL')
sql create table st_bool_2 using mt_bool tags ('NULL')
sql s
elect tagname
from st_bool_2
sql s
how tags
from st_bool_2
if $data0
0 != NULL
then
if $data0
5 != false
then
print ==3== expect:
NULL, actually: $data00
print ==3== expect:
false, actually: $data05
return -1
return -1
endi
endi
sql create table st_bool_3 using mt_bool tags ('NULL')
sql create table st_bool_3 using mt_bool tags ('NULL')
sql s
elect tagname
from st_bool_3
sql s
how tags
from st_bool_3
if $data0
0 != NULL
then
if $data0
5 != false
then
print ==4== expect:
NULL, actually: $data00
print ==4== expect:
false, actually: $data05
return -1
return -1
endi
endi
sql create table st_bool_4 using mt_bool tags ("NULL")
sql create table st_bool_4 using mt_bool tags ("NULL")
sql s
elect tagname
from st_bool_4
sql s
how tags
from st_bool_4
if $data0
0 != NULL
then
if $data0
5 != false
then
print ==5== expect:
NULL, actually: $data00
print ==5== expect:
false, actually: $data05
return -1
return -1
endi
endi
sql create table st_bool_5 using mt_bool tags ("NULL")
sql create table st_bool_5 using mt_bool tags ("NULL")
sql s
elect tagname
from st_bool_5
sql s
how tags
from st_bool_5
if $data0
0 != NULL
then
if $data0
5 != false
then
print ==6== expect:
NULL, actually: $data00
print ==6== expect:
false, actually: $data05
return -1
return -1
endi
endi
sql create table st_bool_6 using mt_bool tags ("true")
sql create table st_bool_6 using mt_bool tags ("true")
sql s
elect tagname
from st_bool_6
sql s
how tags
from st_bool_6
if $data0
0 != 1
then
if $data0
5 != true
then
print ==7== expect: 1, actually: $data0
0
print ==7== expect: 1, actually: $data0
5
return -1
return -1
endi
endi
sql create table st_bool_7 using mt_bool tags ('true')
sql create table st_bool_7 using mt_bool tags ('true')
sql s
elect tagname
from st_bool_7
sql s
how tags
from st_bool_7
if $data0
0 != 1
then
if $data0
5 != true
then
print ==8== expect: 1, actually: $data0
0
print ==8== expect: 1, actually: $data0
5
return -1
return -1
endi
endi
sql create table st_bool_8 using mt_bool tags (true)
sql create table st_bool_8 using mt_bool tags (true)
sql s
elect tagname
from st_bool_8
sql s
how tags
from st_bool_8
if $data0
0 != 1
then
if $data0
5 != true
then
print ==9== expect: 1, actually: $data0
0
print ==9== expect: 1, actually: $data0
5
return -1
return -1
endi
endi
sql create table st_bool_9 using mt_bool tags ("false")
sql create table st_bool_9 using mt_bool tags ("false")
sql s
elect tagname
from st_bool_9
sql s
how tags
from st_bool_9
if $data0
0 != 0
then
if $data0
5 != false
then
print ==10== expect: 0, actually: $data0
0
print ==10== expect: 0, actually: $data0
5
return -1
return -1
endi
endi
sql create table st_bool_10 using mt_bool tags ('false')
sql create table st_bool_10 using mt_bool tags ('false')
sql s
elect tagname
from st_bool_10
sql s
how tags
from st_bool_10
if $data0
0 != 0
then
if $data0
5 != false
then
print ==11== expect: 0, actually: $data0
0
print ==11== expect: 0, actually: $data0
5
return -1
return -1
endi
endi
sql create table st_bool_11 using mt_bool tags (false)
sql create table st_bool_11 using mt_bool tags (false)
sql s
elect tagname
from st_bool_11
sql s
how tags
from st_bool_11
if $data0
0 != 0
then
if $data0
5 != false
then
print ==12== expect: 0, actually: $data0
0
print ==12== expect: 0, actually: $data0
5
return -1
return -1
endi
endi
sql create table st_bool_12 using mt_bool tags (0)
sql create table st_bool_12 using mt_bool tags (0)
sql s
elect tagname
from st_bool_12
sql s
how tags
from st_bool_12
if $data0
0 != 0
then
if $data0
5 != false
then
print ==13== expect: 0, actually: $data0
0
print ==13== expect: 0, actually: $data0
5
return -1
return -1
endi
endi
sql create table st_bool_13 using mt_bool tags (1)
sql create table st_bool_13 using mt_bool tags (1)
sql s
elect tagname
from st_bool_13
sql s
how tags
from st_bool_13
if $data0
0 != 1
then
if $data0
5 != true
then
print ==14== expect: 1, actually: $data0
0
print ==14== expect: 1, actually: $data0
5
return -1
return -1
endi
endi
sql create table st_bool_14 using mt_bool tags (6.9)
sql create table st_bool_14 using mt_bool tags (6.9)
sql s
elect tagname
from st_bool_14
sql s
how tags
from st_bool_14
if $data0
0 != 1
then
if $data0
5 != true
then
print ==15== expect: 1, actually: $data0
0
print ==15== expect: 1, actually: $data0
5
return -1
return -1
endi
endi
sql create table st_bool_15 using mt_bool tags (-3)
sql create table st_bool_15 using mt_bool tags (-3)
sql s
elect tagname
from st_bool_15
sql s
how tags
from st_bool_15
if $data0
0 != 1
then
if $data0
5 != true
then
print ==16== expect: 1, actually: $data00
print ==16== expect: 1, actually: $data00
return -1
return -1
endi
endi
sql create table st_bool_15_0 using mt_bool tags (+300)
sql create table st_bool_15_0 using mt_bool tags (+300)
sql s
elect tagname
from st_bool_15_0
sql s
how tags
from st_bool_15_0
if $data0
0 != 1
then
if $data0
5 != true
then
print ==16== expect: 1, actually: $data00
print ==16== expect: 1, actually: $data00
return -1
return -1
endi
endi
sql create table st_bool_15_1 using mt_bool tags (-8.03)
sql create table st_bool_15_1 using mt_bool tags (-8.03)
sql s
elect tagname
from st_bool_15_1
sql s
how tags
from st_bool_15_1
if $data0
0 != 1
then
if $data0
5 != true
then
print ==16== expect: 1, actually: $data00
print ==16== expect: 1, actually: $data00
return -1
return -1
endi
endi
...
@@ -284,8 +291,8 @@ endi
...
@@ -284,8 +291,8 @@ endi
## case 02: dynamic create table for test tag values
## case 02: dynamic create table for test tag values
sql insert into st_bool_16 using mt_bool tags (NULL) values (now, NULL)
sql insert into st_bool_16 using mt_bool tags (NULL) values (now, NULL)
sql s
elect tagname
from st_bool_16
sql s
how tags
from st_bool_16
if $data0
0
!= NULL then
if $data0
5
!= NULL then
print ==33== expect: NULL, actually: $data00
print ==33== expect: NULL, actually: $data00
return -1
return -1
endi
endi
...
@@ -296,8 +303,8 @@ if $data01 != NULL then
...
@@ -296,8 +303,8 @@ if $data01 != NULL then
endi
endi
sql insert into st_bool_17 using mt_bool tags (NULL) values (now, NULL)
sql insert into st_bool_17 using mt_bool tags (NULL) values (now, NULL)
sql s
elect tagname
from st_bool_17
sql s
how tags
from st_bool_17
if $data0
0
!= NULL then
if $data0
5
!= NULL then
print ==35== expect: NULL, actually: $data00
print ==35== expect: NULL, actually: $data00
return -1
return -1
endi
endi
...
@@ -307,8 +314,8 @@ if $data01 != NULL then
...
@@ -307,8 +314,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_bool_18 using mt_bool tags ('NULL') values (now, 'NULL')
sql insert into st_bool_18 using mt_bool tags ('NULL') values (now, 'NULL')
sql s
elect tagname
from st_bool_18
sql s
how tags
from st_bool_18
if $data0
0
!= NULL then
if $data0
5
!= NULL then
print ==37== expect: NULL, actually: $data00
print ==37== expect: NULL, actually: $data00
return -1
return -1
endi
endi
...
@@ -318,8 +325,8 @@ if $data01 != NULL then
...
@@ -318,8 +325,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_bool_19 using mt_bool tags ('NULL') values (now, 'NULL')
sql insert into st_bool_19 using mt_bool tags ('NULL') values (now, 'NULL')
sql s
elect tagname
from st_bool_19
sql s
how tags
from st_bool_19
if $data0
0
!= NULL then
if $data0
5
!= NULL then
print ==39== expect: NULL, actually: $data00
print ==39== expect: NULL, actually: $data00
return -1
return -1
endi
endi
...
@@ -329,8 +336,8 @@ if $data01 != NULL then
...
@@ -329,8 +336,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_bool_20 using mt_bool tags ("NULL") values (now, "NULL")
sql insert into st_bool_20 using mt_bool tags ("NULL") values (now, "NULL")
sql s
elect tagname
from st_bool_20
sql s
how tags
from st_bool_20
if $data0
0
!= NULL then
if $data0
5
!= NULL then
print ==41== expect: NULL, actually: $data00
print ==41== expect: NULL, actually: $data00
return -1
return -1
endi
endi
...
@@ -340,8 +347,8 @@ if $data01 != NULL then
...
@@ -340,8 +347,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_bool_21 using mt_bool tags ("NULL") values (now, "NULL")
sql insert into st_bool_21 using mt_bool tags ("NULL") values (now, "NULL")
sql s
elect tagname
from st_bool_21
sql s
how tags
from st_bool_21
if $data0
0
!= NULL then
if $data0
5
!= NULL then
print ==43== expect: NULL, actually: $data00
print ==43== expect: NULL, actually: $data00
return -1
return -1
endi
endi
...
@@ -351,8 +358,8 @@ if $data01 != NULL then
...
@@ -351,8 +358,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_bool_22 using mt_bool tags ("true") values (now, "true")
sql insert into st_bool_22 using mt_bool tags ("true") values (now, "true")
sql s
elect tagname
from st_bool_22
sql s
how tags
from st_bool_22
if $data0
0 != 1
then
if $data0
5 != true
then
print ==45== expect: 1, actually: $data00
print ==45== expect: 1, actually: $data00
return -1
return -1
endi
endi
...
@@ -362,8 +369,8 @@ if $data01 != 1 then
...
@@ -362,8 +369,8 @@ if $data01 != 1 then
return -1
return -1
endi
endi
sql insert into st_bool_23 using mt_bool tags ('true') values (now, 'true')
sql insert into st_bool_23 using mt_bool tags ('true') values (now, 'true')
sql s
elect tagname
from st_bool_23
sql s
how tags
from st_bool_23
if $data0
0 != 1
then
if $data0
5 != true
then
print ==47== expect: 1, actually: $data00
print ==47== expect: 1, actually: $data00
return -1
return -1
endi
endi
...
@@ -373,8 +380,8 @@ if $data01 != 1 then
...
@@ -373,8 +380,8 @@ if $data01 != 1 then
return -1
return -1
endi
endi
sql insert into st_bool_24 using mt_bool tags (true) values (now, true)
sql insert into st_bool_24 using mt_bool tags (true) values (now, true)
sql s
elect tagname
from st_bool_24
sql s
how tags
from st_bool_24
if $data0
0 != 1
then
if $data0
5 != true
then
print ==49== expect: 1, actually: $data00
print ==49== expect: 1, actually: $data00
return -1
return -1
endi
endi
...
@@ -384,8 +391,8 @@ if $data01 != 1 then
...
@@ -384,8 +391,8 @@ if $data01 != 1 then
return -1
return -1
endi
endi
sql insert into st_bool_25 using mt_bool tags ("false") values (now, "false")
sql insert into st_bool_25 using mt_bool tags ("false") values (now, "false")
sql s
elect tagname
from st_bool_25
sql s
how tags
from st_bool_25
if $data0
0 != 0
then
if $data0
5 != false
then
print ==51== expect: 0, actually: $data00
print ==51== expect: 0, actually: $data00
return -1
return -1
endi
endi
...
@@ -395,8 +402,8 @@ if $data01 != 0 then
...
@@ -395,8 +402,8 @@ if $data01 != 0 then
return -1
return -1
endi
endi
sql insert into st_bool_26 using mt_bool tags ('false') values (now, 'false')
sql insert into st_bool_26 using mt_bool tags ('false') values (now, 'false')
sql s
elect tagname
from st_bool_26
sql s
how tags
from st_bool_26
if $data0
0 != 0
then
if $data0
5 != false
then
print ==53== expect: 0, actually: $data00
print ==53== expect: 0, actually: $data00
return -1
return -1
endi
endi
...
@@ -406,8 +413,8 @@ if $data01 != 0 then
...
@@ -406,8 +413,8 @@ if $data01 != 0 then
return -1
return -1
endi
endi
sql insert into st_bool_27 using mt_bool tags (false) values (now, false)
sql insert into st_bool_27 using mt_bool tags (false) values (now, false)
sql s
elect tagname
from st_bool_27
sql s
how tags
from st_bool_27
if $data0
0 != 0
then
if $data0
5 != false
then
print ==55== expect: 0, actually: $data00
print ==55== expect: 0, actually: $data00
return -1
return -1
endi
endi
...
@@ -417,8 +424,8 @@ if $data01 != 0 then
...
@@ -417,8 +424,8 @@ if $data01 != 0 then
return -1
return -1
endi
endi
sql insert into st_bool_28 using mt_bool tags (0) values (now, 0)
sql insert into st_bool_28 using mt_bool tags (0) values (now, 0)
sql s
elect tagname
from st_bool_28
sql s
how tags
from st_bool_28
if $data0
0 != 0
then
if $data0
5 != false
then
print ==57== expect: 0, actually: $data00
print ==57== expect: 0, actually: $data00
return -1
return -1
endi
endi
...
@@ -428,8 +435,8 @@ if $data01 != 0 then
...
@@ -428,8 +435,8 @@ if $data01 != 0 then
return -1
return -1
endi
endi
sql insert into st_bool_29 using mt_bool tags (1) values (now, 1)
sql insert into st_bool_29 using mt_bool tags (1) values (now, 1)
sql s
elect tagname
from st_bool_29
sql s
how tags
from st_bool_29
if $data0
0 != 1
then
if $data0
5 != true
then
print ==59== expect: 1, actually: $data00
print ==59== expect: 1, actually: $data00
return -1
return -1
endi
endi
...
@@ -439,8 +446,8 @@ if $data01 != 1 then
...
@@ -439,8 +446,8 @@ if $data01 != 1 then
return -1
return -1
endi
endi
sql insert into st_bool_30 using mt_bool tags (6.9) values (now, 6.9)
sql insert into st_bool_30 using mt_bool tags (6.9) values (now, 6.9)
sql s
elect tagname
from st_bool_30
sql s
how tags
from st_bool_30
if $data0
0 != 1
then
if $data0
5 != true
then
print ==61== expect: 1, actually: $data00
print ==61== expect: 1, actually: $data00
return -1
return -1
endi
endi
...
@@ -450,8 +457,8 @@ if $data01 != 1 then
...
@@ -450,8 +457,8 @@ if $data01 != 1 then
return -1
return -1
endi
endi
sql insert into st_bool_31 using mt_bool tags (-3) values (now, -3)
sql insert into st_bool_31 using mt_bool tags (-3) values (now, -3)
sql s
elect tagname
from st_bool_31
sql s
how tags
from st_bool_31
if $data0
0 != 1
then
if $data0
5 != true
then
print ==63== expect: 1, actually: $data00
print ==63== expect: 1, actually: $data00
return -1
return -1
endi
endi
...
@@ -461,8 +468,8 @@ if $data01 != 1 then
...
@@ -461,8 +468,8 @@ if $data01 != 1 then
return -1
return -1
endi
endi
sql insert into st_bool_32 using mt_bool tags (+300) values (now, +300)
sql insert into st_bool_32 using mt_bool tags (+300) values (now, +300)
sql s
elect tagname
from st_bool_32
sql s
how tags
from st_bool_32
if $data0
0 != 1
then
if $data0
5 != true
then
print ==63== expect: 1, actually: $data00
print ==63== expect: 1, actually: $data00
return -1
return -1
endi
endi
...
@@ -472,8 +479,8 @@ if $data01 != 1 then
...
@@ -472,8 +479,8 @@ if $data01 != 1 then
return -1
return -1
endi
endi
sql insert into st_bool_33 using mt_bool tags (+30.890) values (now, +30.890)
sql insert into st_bool_33 using mt_bool tags (+30.890) values (now, +30.890)
sql s
elect tagname
from st_bool_33
sql s
how tags
from st_bool_33
if $data0
0 != 1
then
if $data0
5 != true
then
print ==63== expect: 1, actually: $data00
print ==63== expect: 1, actually: $data00
return -1
return -1
endi
endi
...
@@ -490,140 +497,140 @@ endi
...
@@ -490,140 +497,140 @@ endi
## case 03: alter tag values
## case 03: alter tag values
#sql alter table st_bool_0 set tag tagname=true
#sql alter table st_bool_0 set tag tagname=true
#sql s
elect tagname
from st_bool_0
#sql s
how tags
from st_bool_0
#if $data00 != true then
#if $data00 != true then
# return -1
# return -1
#endi
#endi
#sql alter table st_bool_0 set tag tagname=NULL
#sql alter table st_bool_0 set tag tagname=NULL
#sql s
elect tagname
from st_bool_0
#sql s
how tags
from st_bool_0
#if $data00 != NULL then
#if $data00 != NULL then
# return -1
# return -1
#endi
#endi
#sql alter table st_bool_0 set tag tagname=false
#sql alter table st_bool_0 set tag tagname=false
#sql s
elect tagname
from st_bool_0
#sql s
how tags
from st_bool_0
#if $data00 != false then
#if $data00 != false then
# return -1
# return -1
#endi
#endi
#sql alter table st_bool_0 set tag tagname=NULL
#sql alter table st_bool_0 set tag tagname=NULL
#sql s
elect tagname
from st_bool_0
#sql s
how tags
from st_bool_0
#if $data00 != NULL then
#if $data00 != NULL then
# return -1
# return -1
#endi
#endi
#sql alter table st_bool_0 set tag tagname='true'
#sql alter table st_bool_0 set tag tagname='true'
#sql s
elect tagname
from st_bool_0
#sql s
how tags
from st_bool_0
#if $data00 != true then
#if $data00 != true then
# return -1
# return -1
#endi
#endi
#sql alter table st_bool_0 set tag tagname='NULL'
#sql alter table st_bool_0 set tag tagname='NULL'
#sql s
elect tagname
from st_bool_0
#sql s
how tags
from st_bool_0
#if $data00 != NULL then
#if $data00 != NULL then
# return -1
# return -1
#endi
#endi
#sql alter table st_bool_0 set tag tagname='false'
#sql alter table st_bool_0 set tag tagname='false'
#sql s
elect tagname
from st_bool_0
#sql s
how tags
from st_bool_0
#if $data00 != false then
#if $data00 != false then
# return -1
# return -1
#endi
#endi
#sql alter table st_bool_0 set tag tagname='NULL'
#sql alter table st_bool_0 set tag tagname='NULL'
#sql s
elect tagname
from st_bool_0
#sql s
how tags
from st_bool_0
#if $data00 != NULL then
#if $data00 != NULL then
# return -1
# return -1
#endi
#endi
#sql alter table st_bool_0 set tag tagname="true"
#sql alter table st_bool_0 set tag tagname="true"
#sql s
elect tagname
from st_bool_0
#sql s
how tags
from st_bool_0
#if $data00 != true then
#if $data00 != true then
# return -1
# return -1
#endi
#endi
#sql alter table st_bool_0 set tag tagname="NULL"
#sql alter table st_bool_0 set tag tagname="NULL"
#sql s
elect tagname
from st_bool_0
#sql s
how tags
from st_bool_0
#if $data00 != NULL then
#if $data00 != NULL then
# return -1
# return -1
#endi
#endi
#sql alter table st_bool_0 set tag tagname="false"
#sql alter table st_bool_0 set tag tagname="false"
#sql s
elect tagname
from st_bool_0
#sql s
how tags
from st_bool_0
#if $data00 != false then
#if $data00 != false then
# return -1
# return -1
#endi
#endi
#sql alter table st_bool_0 set tag tagname="NULL"
#sql alter table st_bool_0 set tag tagname="NULL"
#sql s
elect tagname
from st_bool_0
#sql s
how tags
from st_bool_0
#if $data00 != NULL then
#if $data00 != NULL then
# return -1
# return -1
#endi
#endi
#sql alter table st_bool_0 set tag tagname=1
#sql alter table st_bool_0 set tag tagname=1
#sql s
elect tagname
from st_bool_0
#sql s
how tags
from st_bool_0
#if $data00 != true then
#if $data00 != true then
# return -1
# return -1
#endi
#endi
#sql alter table st_bool_0 set tag tagname=0
#sql alter table st_bool_0 set tag tagname=0
#sql s
elect tagname
from st_bool_0
#sql s
how tags
from st_bool_0
#if $data00 != false then
#if $data00 != false then
# return -1
# return -1
#endi
#endi
#sql alter table st_bool_0 set tag tagname=6.9
#sql alter table st_bool_0 set tag tagname=6.9
#sql s
elect tagname
from st_bool_0
#sql s
how tags
from st_bool_0
#if $data00 != true then
#if $data00 != true then
# return -1
# return -1
#endi
#endi
#sql alter table st_bool_0 set tag tagname=-3
#sql alter table st_bool_0 set tag tagname=-3
#sql s
elect tagname
from st_bool_0
#sql s
how tags
from st_bool_0
#if $data00 != true then
#if $data00 != true then
# return -1
# return -1
#endi
#endi
# case 04: illegal input
# case 04: illegal input
sql_error create table st_bool_e0 using mt_bool tags (123abc)
sql_error create table st_bool_e0 using mt_bool tags (123abc)
sql
_error
create table st_bool_e1 using mt_bool tags ("123abc")
sql create table st_bool_e1 using mt_bool tags ("123abc")
sql
_error
create table st_bool_e2 using mt_bool tags ("123")
sql create table st_bool_e2 using mt_bool tags ("123")
sql_error create table st_bool_e3 using mt_bool tags (abc)
sql_error create table st_bool_e3 using mt_bool tags (abc)
sql
_error
create table st_bool_e4 using mt_bool tags ("abc")
sql create table st_bool_e4 using mt_bool tags ("abc")
sql
_error
create table st_bool_e5 using mt_bool tags (" ")
sql create table st_bool_e5 using mt_bool tags (" ")
sql
_error
create table st_bool_e6 using mt_bool tags ('')
sql create table st_bool_e6 using mt_bool tags ('')
sql create table st_bool_
e
0 using mt_bool tags (true)
sql create table st_bool_
f
0 using mt_bool tags (true)
sql create table st_bool_
e
1 using mt_bool tags (true)
sql create table st_bool_
f
1 using mt_bool tags (true)
sql create table st_bool_
e
2 using mt_bool tags (true)
sql create table st_bool_
f
2 using mt_bool tags (true)
sql create table st_bool_
e
3 using mt_bool tags (true)
sql create table st_bool_
f
3 using mt_bool tags (true)
sql create table st_bool_
e
4 using mt_bool tags (true)
sql create table st_bool_
f
4 using mt_bool tags (true)
sql create table st_bool_
e
5 using mt_bool tags (true)
sql create table st_bool_
f
5 using mt_bool tags (true)
sql create table st_bool_
e
6 using mt_bool tags (true)
sql create table st_bool_
f
6 using mt_bool tags (true)
sql_error insert into st_bool_
e
0 values (now, 123abc)
sql_error insert into st_bool_
g
0 values (now, 123abc)
sql_error insert into st_bool_
e
1 values (now, "123abc")
sql_error insert into st_bool_
g
1 values (now, "123abc")
sql_error insert into st_bool_
e
2 values (now, "123")
sql_error insert into st_bool_
g
2 values (now, "123")
sql_error insert into st_bool_
e
3 values (now, abc)
sql_error insert into st_bool_
g
3 values (now, abc)
sql_error insert into st_bool_
e
4 values (now, "abc")
sql_error insert into st_bool_
g
4 values (now, "abc")
sql_error insert into st_bool_
e
5 values (now, " ")
sql_error insert into st_bool_
g
5 values (now, " ")
sql_error insert into st_bool_
e
6 values (now, '')
sql_error insert into st_bool_
g
6 values (now, '')
sql_error insert into st_bool_
e1
0 using mt_bool tags (123abc) values (now, 1)
sql_error insert into st_bool_
h
0 using mt_bool tags (123abc) values (now, 1)
sql_error insert into st_bool_
e1
1 using mt_bool tags ("123abc") values (now, 1)
sql_error insert into st_bool_
h
1 using mt_bool tags ("123abc") values (now, 1)
sql_error insert into st_bool_
e1
2 using mt_bool tags ("123") values (now, 1)
sql_error insert into st_bool_
h
2 using mt_bool tags ("123") values (now, 1)
sql_error insert into st_bool_
e1
3 using mt_bool tags (abc) values (now, 1)
sql_error insert into st_bool_
h
3 using mt_bool tags (abc) values (now, 1)
sql_error insert into st_bool_
e1
4 using mt_bool tags ("abc") values (now, 1)
sql_error insert into st_bool_
h
4 using mt_bool tags ("abc") values (now, 1)
sql_error insert into st_bool_
e1
5 using mt_bool tags (" ") values (now, 1)
sql_error insert into st_bool_
h
5 using mt_bool tags (" ") values (now, 1)
sql_error insert into st_bool_
e1
6 using mt_bool tags ('') values (now, 1)
sql_error insert into st_bool_
h
6 using mt_bool tags ('') values (now, 1)
sql_error insert into st_bool_
e17
using mt_bool tags (1) values (now, 123abc)
sql_error insert into st_bool_
h0
using mt_bool tags (1) values (now, 123abc)
sql_error insert into st_bool_
e18
using mt_bool tags (1) values (now, "123abc")
sql_error insert into st_bool_
h1
using mt_bool tags (1) values (now, "123abc")
sql_error insert into st_bool_
e19
using mt_bool tags (1) values (now, "123")
sql_error insert into st_bool_
h2
using mt_bool tags (1) values (now, "123")
sql_error insert into st_bool_
e20
using mt_bool tags (1) values (now, abc)
sql_error insert into st_bool_
h3
using mt_bool tags (1) values (now, abc)
sql_error insert into st_bool_
e21
using mt_bool tags (1) values (now, "abc")
sql_error insert into st_bool_
h4
using mt_bool tags (1) values (now, "abc")
sql_error insert into st_bool_
e22
using mt_bool tags (1) values (now, " ")
sql_error insert into st_bool_
h5
using mt_bool tags (1) values (now, " ")
sql_error insert into st_bool_
e23
using mt_bool tags (1) values (now, '')
sql_error insert into st_bool_
h6
using mt_bool tags (1) values (now, '')
sql insert into st_bool_
e1
0 using mt_bool tags (1) values (now, 1)
sql insert into st_bool_
i
0 using mt_bool tags (1) values (now, 1)
sql insert into st_bool_
e1
1 using mt_bool tags (1) values (now, 1)
sql insert into st_bool_
i
1 using mt_bool tags (1) values (now, 1)
sql insert into st_bool_
e1
2 using mt_bool tags (1) values (now, 1)
sql insert into st_bool_
i
2 using mt_bool tags (1) values (now, 1)
sql insert into st_bool_
e1
3 using mt_bool tags (1) values (now, 1)
sql insert into st_bool_
i
3 using mt_bool tags (1) values (now, 1)
sql insert into st_bool_
e1
4 using mt_bool tags (1) values (now, 1)
sql insert into st_bool_
i
4 using mt_bool tags (1) values (now, 1)
sql insert into st_bool_
e1
5 using mt_bool tags (1) values (now, 1)
sql insert into st_bool_
i
5 using mt_bool tags (1) values (now, 1)
sql insert into st_bool_
e1
6 using mt_bool tags (1) values (now, 1)
sql insert into st_bool_
i
6 using mt_bool tags (1) values (now, 1)
sql_error alter table st_bool_
e1
0 set tag tagname=123abc
sql_error alter table st_bool_
i
0 set tag tagname=123abc
sql
_error alter table st_bool_e1
1 set tag tagname="123abc"
sql
alter table st_bool_i
1 set tag tagname="123abc"
sql
_error alter table st_bool_e1
2 set tag tagname="123"
sql
alter table st_bool_i
2 set tag tagname="123"
sql_error alter table st_bool_
e1
3 set tag tagname=abc
sql_error alter table st_bool_
i
3 set tag tagname=abc
sql
_error alter table st_bool_e1
4 set tag tagname="abc"
sql
alter table st_bool_i
4 set tag tagname="abc"
sql
_error alter table st_bool_e1
5 set tag tagname=" "
sql
alter table st_bool_i
5 set tag tagname=" "
sql
_error alter table st_bool_e1
6 set tag tagname=''
sql
alter table st_bool_i
6 set tag tagname=''
tests/script/tsim/parser/columnValue_double.sim
浏览文件 @
81d42419
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sql connect
sql connect
sql create database if not exists db
print ========== columnValues.sim
sql drop database if exists db
sql create database db
sql use db
sql use db
#### test the value of all data types in four cases: static create table, insert column value, synamic create table, alter tag value
#### test the value of all data types in four cases: static create table, insert column value, synamic create table, alter tag value
...
@@ -10,135 +17,135 @@ sql create table mt_double (ts timestamp, c double) tags (tagname double)
...
@@ -10,135 +17,135 @@ sql create table mt_double (ts timestamp, c double) tags (tagname double)
## case 00: static create table for test tag values
## case 00: static create table for test tag values
sql create table st_double_0 using mt_double tags (NULL )
sql create table st_double_0 using mt_double tags (NULL )
sql s
elect tagname
from st_double_0
sql s
how tags
from st_double_0
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql create table st_double_1 using mt_double tags (NULL)
sql create table st_double_1 using mt_double tags (NULL)
sql s
elect tagname
from st_double_1
sql s
how tags
from st_double_1
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql create table st_double_2 using mt_double tags ('NULL')
sql create table st_double_2 using mt_double tags ('NULL')
sql s
elect tagname
from st_double_2
sql s
how tags
from st_double_2
if $data0
0 != NULL
then
if $data0
5 != 0.000000000
then
return -1
return -1
endi
endi
sql create table st_double_3 using mt_double tags ('NULL')
sql create table st_double_3 using mt_double tags ('NULL')
sql s
elect tagname
from st_double_3
sql s
how tags
from st_double_3
if $data0
0 != NULL
then
if $data0
5 != 0.000000000
then
return -1
return -1
endi
endi
sql create table st_double_4 using mt_double tags ("NULL")
sql create table st_double_4 using mt_double tags ("NULL")
sql s
elect tagname
from st_double_4
sql s
how tags
from st_double_4
if $data0
0 != NULL
then
if $data0
5 != 0.000000000
then
return -1
return -1
endi
endi
sql create table st_double_5 using mt_double tags ("NULL")
sql create table st_double_5 using mt_double tags ("NULL")
sql s
elect tagname
from st_double_5
sql s
how tags
from st_double_5
if $data0
0 != NULL
then
if $data0
5 != 0.000000000
then
return -1
return -1
endi
endi
sql create table st_double_6 using mt_double tags (-123.321)
sql create table st_double_6 using mt_double tags (-123.321)
sql s
elect tagname
from st_double_6
sql s
how tags
from st_double_6
if $data0
0
!= -123.321000000 then
if $data0
5
!= -123.321000000 then
print expect -123.321000000, actual: $data0
0
print expect -123.321000000, actual: $data0
5
return -1
return -1
endi
endi
sql create table st_double_7 using mt_double tags (+1.567)
sql create table st_double_7 using mt_double tags (+1.567)
sql s
elect tagname
from st_double_7
sql s
how tags
from st_double_7
if $data0
0
!= 1.567000000 then
if $data0
5
!= 1.567000000 then
return -1
return -1
endi
endi
sql create table st_double_8 using mt_double tags (379.001)
sql create table st_double_8 using mt_double tags (379.001)
sql s
elect tagname
from st_double_8
sql s
how tags
from st_double_8
if $data0
0
!= 379.001000000 then
if $data0
5
!= 379.001000000 then
return -1
return -1
endi
endi
sql create table st_double_9 using mt_double tags (1.5e+3)
sql create table st_double_9 using mt_double tags (1.5e+3)
sql s
elect tagname
from st_double_9
sql s
how tags
from st_double_9
if $data0
0
!= 1500.000000000 then
if $data0
5
!= 1500.000000000 then
return -1
return -1
endi
endi
sql create table st_double_10 using mt_double tags (-1.5e-3)
sql create table st_double_10 using mt_double tags (-1.5e-3)
sql s
elect tagname
from st_double_10
sql s
how tags
from st_double_10
if $data0
0
!= -0.001500000 then
if $data0
5
!= -0.001500000 then
return -1
return -1
endi
endi
sql create table st_double_11 using mt_double tags (+1.5e+3)
sql create table st_double_11 using mt_double tags (+1.5e+3)
sql s
elect tagname
from st_double_11
sql s
how tags
from st_double_11
if $data0
0
!= 1500.000000000 then
if $data0
5
!= 1500.000000000 then
return -1
return -1
endi
endi
sql create table st_double_12 using mt_double tags (-1.5e+3)
sql create table st_double_12 using mt_double tags (-1.5e+3)
sql s
elect tagname
from st_double_12
sql s
how tags
from st_double_12
if $data0
0
!= -1500.000000000 then
if $data0
5
!= -1500.000000000 then
return -1
return -1
endi
endi
sql create table st_double_13 using mt_double tags (1.5e-3)
sql create table st_double_13 using mt_double tags (1.5e-3)
sql s
elect tagname
from st_double_13
sql s
how tags
from st_double_13
if $data0
0
!= 0.001500000 then
if $data0
5
!= 0.001500000 then
return -1
return -1
endi
endi
sql create table st_double_14 using mt_double tags (1.5E-3)
sql create table st_double_14 using mt_double tags (1.5E-3)
sql s
elect tagname
from st_double_14
sql s
how tags
from st_double_14
if $data0
0
!= 0.001500000 then
if $data0
5
!= 0.001500000 then
return -1
return -1
endi
endi
sql create table st_double_6_0 using mt_double tags ('-123.321')
sql create table st_double_6_0 using mt_double tags ('-123.321')
sql s
elect tagname
from st_double_6_0
sql s
how tags
from st_double_6_0
if $data0
0
!= -123.321000000 then
if $data0
5
!= -123.321000000 then
return -1
return -1
endi
endi
sql create table st_double_7_0 using mt_double tags ('+1.567')
sql create table st_double_7_0 using mt_double tags ('+1.567')
sql s
elect tagname
from st_double_7_0
sql s
how tags
from st_double_7_0
if $data0
0
!= 1.567000000 then
if $data0
5
!= 1.567000000 then
return -1
return -1
endi
endi
sql create table st_double_8_0 using mt_double tags ('379.001')
sql create table st_double_8_0 using mt_double tags ('379.001')
sql s
elect tagname
from st_double_8_0
sql s
how tags
from st_double_8_0
if $data0
0
!= 379.001000000 then
if $data0
5
!= 379.001000000 then
return -1
return -1
endi
endi
sql create table st_double_9_0 using mt_double tags ('1.5e+3')
sql create table st_double_9_0 using mt_double tags ('1.5e+3')
sql s
elect tagname
from st_double_9_0
sql s
how tags
from st_double_9_0
if $data0
0
!= 1500.000000000 then
if $data0
5
!= 1500.000000000 then
return -1
return -1
endi
endi
sql create table st_double_10_0 using mt_double tags ('-1.5e-3')
sql create table st_double_10_0 using mt_double tags ('-1.5e-3')
sql s
elect tagname
from st_double_10_0
sql s
how tags
from st_double_10_0
if $data0
0
!= -0.001500000 then
if $data0
5
!= -0.001500000 then
return -1
return -1
endi
endi
sql create table st_double_11_0 using mt_double tags ('+1.5e+3')
sql create table st_double_11_0 using mt_double tags ('+1.5e+3')
sql s
elect tagname
from st_double_11_0
sql s
how tags
from st_double_11_0
if $data0
0
!= 1500.000000000 then
if $data0
5
!= 1500.000000000 then
return -1
return -1
endi
endi
sql create table st_double_12_0 using mt_double tags ('-1.5e+3')
sql create table st_double_12_0 using mt_double tags ('-1.5e+3')
sql s
elect tagname
from st_double_12_0
sql s
how tags
from st_double_12_0
if $data0
0
!= -1500.000000000 then
if $data0
5
!= -1500.000000000 then
return -1
return -1
endi
endi
sql create table st_double_13_0 using mt_double tags ('1.5e-3')
sql create table st_double_13_0 using mt_double tags ('1.5e-3')
sql s
elect tagname
from st_double_13_0
sql s
how tags
from st_double_13_0
if $data0
0
!= 0.001500000 then
if $data0
5
!= 0.001500000 then
return -1
return -1
endi
endi
sql create table st_double_14_0 using mt_double tags ('1.5E-3')
sql create table st_double_14_0 using mt_double tags ('1.5E-3')
sql s
elect tagname
from st_double_14_0
sql s
how tags
from st_double_14_0
if $data0
0
!= 0.001500000 then
if $data0
5
!= 0.001500000 then
return -1
return -1
endi
endi
sql create table st_double_15_0 using mt_double tags (1.7976931348623157e+308)
sql create table st_double_15_0 using mt_double tags (1.7976931348623157e+308)
sql s
elect tagname
from st_double_15_0
sql s
how tags
from st_double_15_0
#if $data0
0
!= 0.001500000 then
#if $data0
5
!= 0.001500000 then
# return -1
# return -1
#endi
#endi
sql create table st_double_16_0 using mt_double tags (-1.7976931348623157e+308)
sql create table st_double_16_0 using mt_double tags (-1.7976931348623157e+308)
sql s
elect tagname
from st_double_16_0
sql s
how tags
from st_double_16_0
#if $data0
0
!= 0.001500000 then
#if $data0
5
!= 0.001500000 then
# return -1
# return -1
#endi
#endi
...
@@ -270,8 +277,8 @@ endi
...
@@ -270,8 +277,8 @@ endi
## case 02: dynamic create table for test tag values
## case 02: dynamic create table for test tag values
sql insert into st_double_16 using mt_double tags (NULL ) values (now, NULL )
sql insert into st_double_16 using mt_double tags (NULL ) values (now, NULL )
sql s
elect tagname
from st_double_16
sql s
how tags
from st_double_16
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_double_16
sql select * from st_double_16
...
@@ -280,8 +287,8 @@ if $data01 != NULL then
...
@@ -280,8 +287,8 @@ if $data01 != NULL then
endi
endi
sql insert into st_double_17 using mt_double tags (NULL) values (now, NULL)
sql insert into st_double_17 using mt_double tags (NULL) values (now, NULL)
sql s
elect tagname
from st_double_17
sql s
how tags
from st_double_17
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_double_17
sql select * from st_double_17
...
@@ -289,8 +296,8 @@ if $data01 != NULL then
...
@@ -289,8 +296,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_double_18 using mt_double tags ('NULL') values (now, 'NULL')
sql insert into st_double_18 using mt_double tags ('NULL') values (now, 'NULL')
sql s
elect tagname
from st_double_18
sql s
how tags
from st_double_18
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_double_18
sql select * from st_double_18
...
@@ -298,8 +305,8 @@ if $data01 != NULL then
...
@@ -298,8 +305,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_double_19 using mt_double tags ('NULL') values (now, 'NULL')
sql insert into st_double_19 using mt_double tags ('NULL') values (now, 'NULL')
sql s
elect tagname
from st_double_19
sql s
how tags
from st_double_19
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_double_19
sql select * from st_double_19
...
@@ -307,8 +314,8 @@ if $data01 != NULL then
...
@@ -307,8 +314,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_double_20 using mt_double tags ("NULL") values (now, "NULL")
sql insert into st_double_20 using mt_double tags ("NULL") values (now, "NULL")
sql s
elect tagname
from st_double_20
sql s
how tags
from st_double_20
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_double_20
sql select * from st_double_20
...
@@ -316,8 +323,8 @@ if $data01 != NULL then
...
@@ -316,8 +323,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_double_21 using mt_double tags ("NULL") values (now, "NULL")
sql insert into st_double_21 using mt_double tags ("NULL") values (now, "NULL")
sql s
elect tagname
from st_double_21
sql s
how tags
from st_double_21
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_double_21
sql select * from st_double_21
...
@@ -325,8 +332,8 @@ if $data01 != NULL then
...
@@ -325,8 +332,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_double_22 using mt_double tags (127) values (now, 1.7976931348623157e+308)
sql insert into st_double_22 using mt_double tags (127) values (now, 1.7976931348623157e+308)
sql s
elect tagname
from st_double_22
sql s
how tags
from st_double_22
#if $data0
0
!= 127 then
#if $data0
5
!= 127 then
# return -1
# return -1
#endi
#endi
sql select * from st_double_22
sql select * from st_double_22
...
@@ -334,8 +341,8 @@ sql select * from st_double_22
...
@@ -334,8 +341,8 @@ sql select * from st_double_22
# return -1
# return -1
#endi
#endi
sql insert into st_double_23 using mt_double tags (-127) values (now, -1.7976931348623157e+308)
sql insert into st_double_23 using mt_double tags (-127) values (now, -1.7976931348623157e+308)
sql s
elect tagname
from st_double_23
sql s
how tags
from st_double_23
#if $data0
0
!= -127 then
#if $data0
5
!= -127 then
# return -1
# return -1
#endi
#endi
sql select * from st_double_23
sql select * from st_double_23
...
@@ -343,8 +350,8 @@ sql select * from st_double_23
...
@@ -343,8 +350,8 @@ sql select * from st_double_23
# return -1
# return -1
#endi
#endi
sql insert into st_double_24 using mt_double tags (10) values (now, 10)
sql insert into st_double_24 using mt_double tags (10) values (now, 10)
sql s
elect tagname
from st_double_24
sql s
how tags
from st_double_24
#if $data0
0
!= 10 then
#if $data0
5
!= 10 then
# return -1
# return -1
#endi
#endi
sql select * from st_double_24
sql select * from st_double_24
...
@@ -352,8 +359,8 @@ sql select * from st_double_24
...
@@ -352,8 +359,8 @@ sql select * from st_double_24
# return -1
# return -1
#endi
#endi
sql insert into st_double_25 using mt_double tags ("-0") values (now, "-0")
sql insert into st_double_25 using mt_double tags ("-0") values (now, "-0")
sql s
elect tagname
from st_double_25
sql s
how tags
from st_double_25
#if $data0
0
!= 0 then
#if $data0
5
!= 0 then
# return -1
# return -1
#endi
#endi
sql select * from st_double_25
sql select * from st_double_25
...
@@ -361,8 +368,8 @@ sql select * from st_double_25
...
@@ -361,8 +368,8 @@ sql select * from st_double_25
# return -1
# return -1
#endi
#endi
sql insert into st_double_26 using mt_double tags ('123') values (now, '12.3')
sql insert into st_double_26 using mt_double tags ('123') values (now, '12.3')
sql s
elect tagname
from st_double_26
sql s
how tags
from st_double_26
#if $data0
0
!= 123 then
#if $data0
5
!= 123 then
# return -1
# return -1
#endi
#endi
sql select * from st_double_26
sql select * from st_double_26
...
@@ -370,8 +377,8 @@ sql select * from st_double_26
...
@@ -370,8 +377,8 @@ sql select * from st_double_26
# return -1
# return -1
#endi
#endi
sql insert into st_double_27 using mt_double tags (+056) values (now, +0005.6)
sql insert into st_double_27 using mt_double tags (+056) values (now, +0005.6)
sql s
elect tagname
from st_double_27
sql s
how tags
from st_double_27
#if $data0
0
!= 56 then
#if $data0
5
!= 56 then
# return -1
# return -1
#endi
#endi
sql select * from st_double_27
sql select * from st_double_27
...
@@ -379,8 +386,8 @@ sql select * from st_double_27
...
@@ -379,8 +386,8 @@ sql select * from st_double_27
# return -1
# return -1
#endi
#endi
sql insert into st_double_28 using mt_double tags (-056) values (now, -005.6)
sql insert into st_double_28 using mt_double tags (-056) values (now, -005.6)
sql s
elect tagname
from st_double_28
sql s
how tags
from st_double_28
#if $data0
0
!= -56 then
#if $data0
5
!= -56 then
# return -1
# return -1
#endi
#endi
sql select * from st_double_28
sql select * from st_double_28
...
@@ -390,43 +397,43 @@ sql select * from st_double_28
...
@@ -390,43 +397,43 @@ sql select * from st_double_28
### case 03: alter tag values
### case 03: alter tag values
#sql alter table st_double_0 set tag tagname=1.7976931348623157e+308
#sql alter table st_double_0 set tag tagname=1.7976931348623157e+308
#sql s
elect tagname
from st_double_0
#sql s
how tags
from st_double_0
##if $data0
0
!= 127 then
##if $data0
5
!= 127 then
## return -1
## return -1
##endi
##endi
#sql alter table st_double_0 set tag tagname=-1.7976931348623157e+308
#sql alter table st_double_0 set tag tagname=-1.7976931348623157e+308
#sql s
elect tagname
from st_double_0
#sql s
how tags
from st_double_0
##if $data0
0
!= -127 then
##if $data0
5
!= -127 then
## return -1
## return -1
##endi
##endi
#sql alter table st_double_0 set tag tagname=+10.340
#sql alter table st_double_0 set tag tagname=+10.340
#sql s
elect tagname
from st_double_0
#sql s
how tags
from st_double_0
##if $data0
0
!= 100 then
##if $data0
5
!= 100 then
## return -1
## return -1
##endi
##endi
#sql alter table st_double_0 set tag tagname=-33.87
#sql alter table st_double_0 set tag tagname=-33.87
#sql s
elect tagname
from st_double_0
#sql s
how tags
from st_double_0
##if $data0
0
!= -33 then
##if $data0
5
!= -33 then
## return -1
## return -1
##endi
##endi
#sql alter table st_double_0 set tag tagname='+9.8'
#sql alter table st_double_0 set tag tagname='+9.8'
#sql s
elect tagname
from st_double_0
#sql s
how tags
from st_double_0
##if $data0
0
!= 98 then
##if $data0
5
!= 98 then
## return -1
## return -1
##endi
##endi
#sql alter table st_double_0 set tag tagname='-07.6'
#sql alter table st_double_0 set tag tagname='-07.6'
#sql s
elect tagname
from st_double_0
#sql s
how tags
from st_double_0
##if $data0
0
!= -76 then
##if $data0
5
!= -76 then
## return -1
## return -1
##endi
##endi
#sql alter table st_double_0 set tag tagname=+0012.871
#sql alter table st_double_0 set tag tagname=+0012.871
#sql s
elect tagname
from st_double_0
#sql s
how tags
from st_double_0
##if $data0
0
!= 12 then
##if $data0
5
!= 12 then
## return -1
## return -1
##endi
##endi
#sql alter table st_double_0 set tag tagname=-00063.582
#sql alter table st_double_0 set tag tagname=-00063.582
#sql s
elect tagname
from st_double_0
#sql s
how tags
from st_double_0
##if $data0
0
!= -63 then
##if $data0
5
!= -63 then
## return -1
## return -1
##endi
##endi
...
@@ -438,11 +445,11 @@ sql_error create table st_double_e0 using mt_double tags (-31.7976931348623157e+
...
@@ -438,11 +445,11 @@ sql_error create table st_double_e0 using mt_double tags (-31.7976931348623157e+
#sql_error create table st_double_e0 using mt_double tags (12.80) truncate integer part
#sql_error create table st_double_e0 using mt_double tags (12.80) truncate integer part
#sql_error create table st_double_e0 using mt_double tags (-11.80)
#sql_error create table st_double_e0 using mt_double tags (-11.80)
sql_error create table st_double_e0 using mt_double tags (123abc)
sql_error create table st_double_e0 using mt_double tags (123abc)
sql
_error create table st_double_e0
using mt_double tags ("123abc")
sql
create table st_double_e0_1
using mt_double tags ("123abc")
sql_error create table st_double_e0 using mt_double tags (abc)
sql_error create table st_double_e0 using mt_double tags (abc)
sql
_error create table st_double_e0
using mt_double tags ("abc")
sql
create table st_double_e0_2
using mt_double tags ("abc")
sql
_error create table st_double_e0
using mt_double tags (" ")
sql
create table st_double_e0_3
using mt_double tags (" ")
sql
_error create table st_double_e0
using mt_double tags ('')
sql
create table st_double_e0_4
using mt_double tags ('')
sql create table st_double_e0 using mt_double tags (123)
sql create table st_double_e0 using mt_double tags (123)
sql create table st_double_e1 using mt_double tags (123)
sql create table st_double_e1 using mt_double tags (123)
...
@@ -469,7 +476,7 @@ sql_error insert into st_double_e7 values (now, "123abc")
...
@@ -469,7 +476,7 @@ sql_error insert into st_double_e7 values (now, "123abc")
sql_error insert into st_double_e9 values (now, abc)
sql_error insert into st_double_e9 values (now, abc)
sql_error insert into st_double_e10 values (now, "abc")
sql_error insert into st_double_e10 values (now, "abc")
sql_error insert into st_double_e11 values (now, " ")
sql_error insert into st_double_e11 values (now, " ")
sql
_error
insert into st_double_e12 values (now, '')
sql insert into st_double_e12 values (now, '')
sql_error insert into st_double_e13 using mt_double tags (033) values (now, 11.7976931348623157e+308)
sql_error insert into st_double_e13 using mt_double tags (033) values (now, 11.7976931348623157e+308)
sql_error insert into st_double_e14 using mt_double tags (033) values (now, -11.7976931348623157e+308)
sql_error insert into st_double_e14 using mt_double tags (033) values (now, -11.7976931348623157e+308)
...
@@ -482,7 +489,7 @@ sql_error insert into st_double_e20 using mt_double tags (033) values (now, "123
...
@@ -482,7 +489,7 @@ sql_error insert into st_double_e20 using mt_double tags (033) values (now, "123
sql_error insert into st_double_e22 using mt_double tags (033) values (now, abc)
sql_error insert into st_double_e22 using mt_double tags (033) values (now, abc)
sql_error insert into st_double_e23 using mt_double tags (033) values (now, "abc")
sql_error insert into st_double_e23 using mt_double tags (033) values (now, "abc")
sql_error insert into st_double_e24 using mt_double tags (033) values (now, " ")
sql_error insert into st_double_e24 using mt_double tags (033) values (now, " ")
sql
_error insert into st_double_e25
using mt_double tags (033) values (now, '')
sql
insert into st_double_e25_1
using mt_double tags (033) values (now, '')
sql_error insert into st_double_e13 using mt_double tags (31.7976931348623157e+308) values (now, -033)
sql_error insert into st_double_e13 using mt_double tags (31.7976931348623157e+308) values (now, -033)
sql_error insert into st_double_e14 using mt_double tags (-31.7976931348623157e+308) values (now, -033)
sql_error insert into st_double_e14 using mt_double tags (-31.7976931348623157e+308) values (now, -033)
...
@@ -495,7 +502,7 @@ sql_error insert into st_double_e20 using mt_double tags ("123abc") values (now,
...
@@ -495,7 +502,7 @@ sql_error insert into st_double_e20 using mt_double tags ("123abc") values (now,
sql_error insert into st_double_e22 using mt_double tags (abc) values (now, -033)
sql_error insert into st_double_e22 using mt_double tags (abc) values (now, -033)
sql_error insert into st_double_e23 using mt_double tags ("abc") values (now, -033)
sql_error insert into st_double_e23 using mt_double tags ("abc") values (now, -033)
sql_error insert into st_double_e24 using mt_double tags (" ") values (now, -033)
sql_error insert into st_double_e24 using mt_double tags (" ") values (now, -033)
sql
_error
insert into st_double_e25 using mt_double tags ('') values (now, -033)
sql insert into st_double_e25 using mt_double tags ('') values (now, -033)
sql insert into st_double_e13 using mt_double tags (033) values (now, 00062)
sql insert into st_double_e13 using mt_double tags (033) values (now, 00062)
sql insert into st_double_e14 using mt_double tags (033) values (now, 00062)
sql insert into st_double_e14 using mt_double tags (033) values (now, 00062)
...
@@ -516,8 +523,8 @@ sql_error alter table st_double_e14 set tag tagname=-1.8976931348623157e+308
...
@@ -516,8 +523,8 @@ sql_error alter table st_double_e14 set tag tagname=-1.8976931348623157e+308
sql_error alter table st_double_e15 set tag tagname=131.7976931348623157e+308
sql_error alter table st_double_e15 set tag tagname=131.7976931348623157e+308
sql_error alter table st_double_e16 set tag tagname=-131.7976931348623157e+308
sql_error alter table st_double_e16 set tag tagname=-131.7976931348623157e+308
sql_error alter table st_double_e19 set tag tagname=123abc
sql_error alter table st_double_e19 set tag tagname=123abc
sql
_error
alter table st_double_e20 set tag tagname="123abc"
sql alter table st_double_e20 set tag tagname="123abc"
sql_error alter table st_double_e22 set tag tagname=abc
sql_error alter table st_double_e22 set tag tagname=abc
sql
_error
alter table st_double_e23 set tag tagname="abc"
sql alter table st_double_e23 set tag tagname="abc"
sql
_error
alter table st_double_e24 set tag tagname=" "
sql alter table st_double_e24 set tag tagname=" "
sql
_error
alter table st_double_e25 set tag tagname=''
sql alter table st_double_e25 set tag tagname=''
tests/script/tsim/parser/columnValue_float.sim
浏览文件 @
81d42419
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sql connect
sql connect
sql create database if not exists db
print ========== columnValues.sim
sql drop database if exists db
sql create database db
sql use db
sql use db
#### test the value of all data types in four cases: static create table, insert column value, synamic create table, alter tag value
#### test the value of all data types in four cases: static create table, insert column value, synamic create table, alter tag value
...
@@ -10,152 +17,152 @@ sql create table mt_float (ts timestamp, c float) tags (tagname float)
...
@@ -10,152 +17,152 @@ sql create table mt_float (ts timestamp, c float) tags (tagname float)
## case 00: static create table for test tag values
## case 00: static create table for test tag values
sql create table st_float_0 using mt_float tags (NULL)
sql create table st_float_0 using mt_float tags (NULL)
sql s
elect tagname
from st_float_0
sql s
how tags
from st_float_0
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql create table st_float_1 using mt_float tags (NULL)
sql create table st_float_1 using mt_float tags (NULL)
sql s
elect tagname
from st_float_1
sql s
how tags
from st_float_1
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql create table st_float_2 using mt_float tags ('NULL')
sql create table st_float_2 using mt_float tags ('NULL')
sql s
elect tagname
from st_float_2
sql s
how tags
from st_float_2
if $data0
0 != NULL
then
if $data0
5 != 0.00000
then
return -1
return -1
endi
endi
sql create table st_float_3 using mt_float tags ('NULL')
sql create table st_float_3 using mt_float tags ('NULL')
sql s
elect tagname
from st_float_3
sql s
how tags
from st_float_3
if $data0
0 != NULL
then
if $data0
5 != 0.00000
then
return -1
return -1
endi
endi
sql create table st_float_4 using mt_float tags ("NULL")
sql create table st_float_4 using mt_float tags ("NULL")
sql s
elect tagname
from st_float_4
sql s
how tags
from st_float_4
if $data0
0 != NULL
then
if $data0
5 != 0.00000
then
return -1
return -1
endi
endi
sql create table st_float_5 using mt_float tags ("NULL")
sql create table st_float_5 using mt_float tags ("NULL")
sql s
elect tagname
from st_float_5
sql s
how tags
from st_float_5
if $data0
0 != NULL
then
if $data0
5 != 0.00000
then
return -1
return -1
endi
endi
sql create table st_float_6 using mt_float tags (-123.321)
sql create table st_float_6 using mt_float tags (-123.321)
sql s
elect tagname
from st_float_6
sql s
how tags
from st_float_6
if $data0
0
!= -123.32100 then
if $data0
5
!= -123.32100 then
print expect -123.32100, actual: $data0
0
print expect -123.32100, actual: $data0
5
return -1
return -1
endi
endi
sql create table st_float_7 using mt_float tags (+1.567)
sql create table st_float_7 using mt_float tags (+1.567)
sql s
elect tagname
from st_float_7
sql s
how tags
from st_float_7
if $data0
0
!= 1.56700 then
if $data0
5
!= 1.56700 then
print expect 1.56700, actual: $data0
0
print expect 1.56700, actual: $data0
5
return -1
return -1
endi
endi
sql create table st_float_8 using mt_float tags (379.001)
sql create table st_float_8 using mt_float tags (379.001)
sql s
elect tagname
from st_float_8
sql s
how tags
from st_float_8
if $data0
0
!= 379.00101 then
if $data0
5
!= 379.00101 then
print expect 379.00101, actual: $data0
0
print expect 379.00101, actual: $data0
5
return -1
return -1
endi
endi
sql create table st_float_9 using mt_float tags (1.5e+3)
sql create table st_float_9 using mt_float tags (1.5e+3)
sql s
elect tagname
from st_float_9
sql s
how tags
from st_float_9
if $data0
0
!= 1500.00000 then
if $data0
5
!= 1500.00000 then
print expect 1500.00000, actual: $data0
0
print expect 1500.00000, actual: $data0
5
return -1
return -1
endi
endi
sql create table st_float_10 using mt_float tags (-1.5e-3)
sql create table st_float_10 using mt_float tags (-1.5e-3)
sql s
elect tagname
from st_float_10
sql s
how tags
from st_float_10
if $data0
0
!= -0.00150 then
if $data0
5
!= -0.00150 then
print expect -0.00150, actual: $data0
0
print expect -0.00150, actual: $data0
5
return -1
return -1
endi
endi
sql create table st_float_11 using mt_float tags (+1.5e+3)
sql create table st_float_11 using mt_float tags (+1.5e+3)
sql s
elect tagname
from st_float_11
sql s
how tags
from st_float_11
if $data0
0
!= 1500.00000 then
if $data0
5
!= 1500.00000 then
print expect 1500.00000, actual: $data0
0
print expect 1500.00000, actual: $data0
5
return -1
return -1
endi
endi
sql create table st_float_12 using mt_float tags (-1.5e+3)
sql create table st_float_12 using mt_float tags (-1.5e+3)
sql s
elect tagname
from st_float_12
sql s
how tags
from st_float_12
if $data0
0
!= -1500.00000 then
if $data0
5
!= -1500.00000 then
print expect -1500.00000, actual: $data0
0
print expect -1500.00000, actual: $data0
5
return -1
return -1
endi
endi
sql create table st_float_13 using mt_float tags (1.5e-3)
sql create table st_float_13 using mt_float tags (1.5e-3)
sql s
elect tagname
from st_float_13
sql s
how tags
from st_float_13
if $data0
0
!= 0.00150 then
if $data0
5
!= 0.00150 then
print expect 0.00150, actual: $data0
0
print expect 0.00150, actual: $data0
5
return -1
return -1
endi
endi
sql create table st_float_14 using mt_float tags (1.5E-3)
sql create table st_float_14 using mt_float tags (1.5E-3)
sql s
elect tagname
from st_float_14
sql s
how tags
from st_float_14
if $data0
0
!= 0.00150 then
if $data0
5
!= 0.00150 then
print expect 0.00150, actual: $data0
0
print expect 0.00150, actual: $data0
5
return -1
return -1
endi
endi
sql create table st_float_6_0 using mt_float tags ('-123.321')
sql create table st_float_6_0 using mt_float tags ('-123.321')
sql s
elect tagname
from st_float_6_0
sql s
how tags
from st_float_6_0
if $data0
0
!= -123.32100 then
if $data0
5
!= -123.32100 then
print expect -123.32100, actual: $data0
0
print expect -123.32100, actual: $data0
5
return -1
return -1
endi
endi
sql create table st_float_7_0 using mt_float tags ('+1.567')
sql create table st_float_7_0 using mt_float tags ('+1.567')
sql s
elect tagname
from st_float_7_0
sql s
how tags
from st_float_7_0
if $data0
0
!= 1.56700 then
if $data0
5
!= 1.56700 then
print expect 1.56700, actual: $data0
0
print expect 1.56700, actual: $data0
5
return -1
return -1
endi
endi
sql create table st_float_8_0 using mt_float tags ('379.001')
sql create table st_float_8_0 using mt_float tags ('379.001')
sql s
elect tagname
from st_float_8_0
sql s
how tags
from st_float_8_0
if $data0
0
!= 379.00101 then
if $data0
5
!= 379.00101 then
print expect 379.00101, actual: $data0
0
print expect 379.00101, actual: $data0
5
return -1
return -1
endi
endi
sql create table st_float_9_0 using mt_float tags ('1.5e+3')
sql create table st_float_9_0 using mt_float tags ('1.5e+3')
sql s
elect tagname
from st_float_9_0
sql s
how tags
from st_float_9_0
if $data0
0
!= 1500.00000 then
if $data0
5
!= 1500.00000 then
print expect 1500.00000, actual: $data0
0
print expect 1500.00000, actual: $data0
5
return -1
return -1
endi
endi
sql create table st_float_10_0 using mt_float tags ('-1.5e-3')
sql create table st_float_10_0 using mt_float tags ('-1.5e-3')
sql s
elect tagname
from st_float_10_0
sql s
how tags
from st_float_10_0
if $data0
0
!= -0.00150 then
if $data0
5
!= -0.00150 then
print expect -0.00150, actual: $data0
0
print expect -0.00150, actual: $data0
5
return -1
return -1
endi
endi
sql create table st_float_11_0 using mt_float tags ('+1.5e+3')
sql create table st_float_11_0 using mt_float tags ('+1.5e+3')
sql s
elect tagname
from st_float_11_0
sql s
how tags
from st_float_11_0
if $data0
0
!= 1500.00000 then
if $data0
5
!= 1500.00000 then
print expect 1500.00000, actual: $data0
0
print expect 1500.00000, actual: $data0
5
return -1
return -1
endi
endi
sql create table st_float_12_0 using mt_float tags ('-1.5e+3')
sql create table st_float_12_0 using mt_float tags ('-1.5e+3')
sql s
elect tagname
from st_float_12_0
sql s
how tags
from st_float_12_0
if $data0
0
!= -1500.00000 then
if $data0
5
!= -1500.00000 then
print expect -1500.00000, actual: $data0
0
print expect -1500.00000, actual: $data0
5
return -1
return -1
endi
endi
sql create table st_float_13_0 using mt_float tags ('1.5e-3')
sql create table st_float_13_0 using mt_float tags ('1.5e-3')
sql s
elect tagname
from st_float_13_0
sql s
how tags
from st_float_13_0
if $data0
0
!= 0.00150 then
if $data0
5
!= 0.00150 then
print expect 0.00150, actual: $data0
0
print expect 0.00150, actual: $data0
5
return -1
return -1
endi
endi
sql create table st_float_14_0 using mt_float tags ('1.5E-3')
sql create table st_float_14_0 using mt_float tags ('1.5E-3')
sql s
elect tagname
from st_float_14_0
sql s
how tags
from st_float_14_0
if $data0
0
!= 0.00150 then
if $data0
5
!= 0.00150 then
print expect 0.00150, actual: $data0
0
print expect 0.00150, actual: $data0
5
return -1
return -1
endi
endi
#sql create table st_float_15_0 using mt_float tags (3.40282347e+38)
#sql create table st_float_15_0 using mt_float tags (3.40282347e+38)
#sql s
elect tagname
from st_float_15_0
#sql s
how tags
from st_float_15_0
#if $data0
0
!= 0.001500 then
#if $data0
5
!= 0.001500 then
# return -1
# return -1
#endi
#endi
#sql create table st_float_16_0 using mt_float tags (-3.40282347e+38)
#sql create table st_float_16_0 using mt_float tags (-3.40282347e+38)
#sql s
elect tagname
from st_float_16_0
#sql s
how tags
from st_float_16_0
#if $data0
0
!= 0.001500 then
#if $data0
5
!= 0.001500 then
# return -1
# return -1
#endi
#endi
...
@@ -292,8 +299,8 @@ endi
...
@@ -292,8 +299,8 @@ endi
## case 02: dynamic create table for test tag values
## case 02: dynamic create table for test tag values
sql insert into st_float_16 using mt_float tags (NULL) values (now, NULL)
sql insert into st_float_16 using mt_float tags (NULL) values (now, NULL)
sql s
elect tagname
from st_float_16
sql s
how tags
from st_float_16
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_float_16
sql select * from st_float_16
...
@@ -302,8 +309,8 @@ if $data01 != NULL then
...
@@ -302,8 +309,8 @@ if $data01 != NULL then
endi
endi
sql insert into st_float_17 using mt_float tags (NULL) values (now, NULL)
sql insert into st_float_17 using mt_float tags (NULL) values (now, NULL)
sql s
elect tagname
from st_float_17
sql s
how tags
from st_float_17
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_float_17
sql select * from st_float_17
...
@@ -311,8 +318,8 @@ if $data01 != NULL then
...
@@ -311,8 +318,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_float_18 using mt_float tags ('NULL') values (now, 'NULL')
sql insert into st_float_18 using mt_float tags ('NULL') values (now, 'NULL')
sql s
elect tagname
from st_float_18
sql s
how tags
from st_float_18
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_float_18
sql select * from st_float_18
...
@@ -320,8 +327,8 @@ if $data01 != NULL then
...
@@ -320,8 +327,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_float_19 using mt_float tags ('NULL') values (now, 'NULL')
sql insert into st_float_19 using mt_float tags ('NULL') values (now, 'NULL')
sql s
elect tagname
from st_float_19
sql s
how tags
from st_float_19
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_float_19
sql select * from st_float_19
...
@@ -329,8 +336,8 @@ if $data01 != NULL then
...
@@ -329,8 +336,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_float_20 using mt_float tags ("NULL") values (now, "NULL")
sql insert into st_float_20 using mt_float tags ("NULL") values (now, "NULL")
sql s
elect tagname
from st_float_20
sql s
how tags
from st_float_20
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_float_20
sql select * from st_float_20
...
@@ -338,8 +345,8 @@ if $data01 != NULL then
...
@@ -338,8 +345,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_float_21 using mt_float tags ("NULL") values (now, "NULL")
sql insert into st_float_21 using mt_float tags ("NULL") values (now, "NULL")
sql s
elect tagname
from st_float_21
sql s
how tags
from st_float_21
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_float_21
sql select * from st_float_21
...
@@ -350,9 +357,9 @@ endi
...
@@ -350,9 +357,9 @@ endi
sql_error insert into st_float_22 using mt_float tags (127) values (now, 3.40282347e+38)
sql_error insert into st_float_22 using mt_float tags (127) values (now, 3.40282347e+38)
sql insert into st_float_22 using mt_float tags (127) values (now, 340282346638528859811704183484516925440.00000)
sql insert into st_float_22 using mt_float tags (127) values (now, 340282346638528859811704183484516925440.00000)
sql s
elect tagname
from st_float_22
sql s
how tags
from st_float_22
if $data0
0
!= 127.00000 then
if $data0
5
!= 127.00000 then
print expect 127.00000, actual: $data0
0
print expect 127.00000, actual: $data0
5
return -1
return -1
endi
endi
...
@@ -362,14 +369,14 @@ if $data01 != 127.00000 then
...
@@ -362,14 +369,14 @@ if $data01 != 127.00000 then
endi
endi
sql insert into st_float_23 using mt_float tags (-127) values (now, -340282346638528859811704183484516925440.00000)
sql insert into st_float_23 using mt_float tags (-127) values (now, -340282346638528859811704183484516925440.00000)
sql s
elect tagname
from st_float_23
sql s
how tags
from st_float_23
if $data0
0
!= -127.00000 then
if $data0
5
!= -127.00000 then
return -1
return -1
endi
endi
sql insert into st_float_24 using mt_float tags (10) values (now, 10)
sql insert into st_float_24 using mt_float tags (10) values (now, 10)
sql s
elect tagname
from st_float_24
sql s
how tags
from st_float_24
if $data0
0
!= 10.00000 then
if $data0
5
!= 10.00000 then
return -1
return -1
endi
endi
sql select * from st_float_24
sql select * from st_float_24
...
@@ -378,9 +385,9 @@ if $data01 != 10.00000 then
...
@@ -378,9 +385,9 @@ if $data01 != 10.00000 then
endi
endi
sql insert into st_float_25 using mt_float tags ("-0") values (now, "-0")
sql insert into st_float_25 using mt_float tags ("-0") values (now, "-0")
sql s
elect tagname
from st_float_25
sql s
how tags
from st_float_25
if $data0
0
!= -0.00000 then
if $data0
5
!= -0.00000 then
print expect -0.00000, actual: $data0
0
print expect -0.00000, actual: $data0
5
return -1
return -1
endi
endi
sql select * from st_float_25
sql select * from st_float_25
...
@@ -388,9 +395,9 @@ if $data01 != -0.00000 then
...
@@ -388,9 +395,9 @@ if $data01 != -0.00000 then
return -1
return -1
endi
endi
sql insert into st_float_26 using mt_float tags ('123') values (now, '12.3')
sql insert into st_float_26 using mt_float tags ('123') values (now, '12.3')
sql s
elect tagname
from st_float_26
sql s
how tags
from st_float_26
if $data0
0
!= 123.00000 then
if $data0
5
!= 123.00000 then
print expect 123.00000, actual: $data0
0
print expect 123.00000, actual: $data0
5
return -1
return -1
endi
endi
sql select * from st_float_26
sql select * from st_float_26
...
@@ -398,9 +405,9 @@ if $data01 != 12.30000 then
...
@@ -398,9 +405,9 @@ if $data01 != 12.30000 then
return -1
return -1
endi
endi
sql insert into st_float_27 using mt_float tags (+056) values (now, +0005.6)
sql insert into st_float_27 using mt_float tags (+056) values (now, +0005.6)
sql s
elect tagname
from st_float_27
sql s
how tags
from st_float_27
if $data0
0
!= 56.00000 then
if $data0
5
!= 56.00000 then
print expect 56.00000, actual:$data0
0
print expect 56.00000, actual:$data0
5
return -1
return -1
endi
endi
sql select * from st_float_27
sql select * from st_float_27
...
@@ -408,8 +415,8 @@ if $data01 != 5.60000 then
...
@@ -408,8 +415,8 @@ if $data01 != 5.60000 then
return -1
return -1
endi
endi
sql insert into st_float_28 using mt_float tags (-056) values (now, -005.6)
sql insert into st_float_28 using mt_float tags (-056) values (now, -005.6)
sql s
elect tagname
from st_float_28
sql s
how tags
from st_float_28
if $data0
0
!= -56.00000 then
if $data0
5
!= -56.00000 then
return -1
return -1
endi
endi
sql select * from st_float_28
sql select * from st_float_28
...
@@ -419,44 +426,44 @@ endi
...
@@ -419,44 +426,44 @@ endi
### case 03: alter tag values
### case 03: alter tag values
sql alter table st_float_0 set tag tagname=340282346638528859811704183484516925440.00000
sql alter table st_float_0 set tag tagname=340282346638528859811704183484516925440.00000
sql s
elect tagname
from st_float_0
sql s
how tags
from st_float_0
if $data0
0
!= 340282346638528859811704183484516925440.00000 then
if $data0
5
!= 340282346638528859811704183484516925440.00000 then
return -1
return -1
endi
endi
sql alter table st_float_0 set tag tagname=-340282346638528859811704183484516925440.00000
sql alter table st_float_0 set tag tagname=-340282346638528859811704183484516925440.00000
sql s
elect tagname
from st_float_0
sql s
how tags
from st_float_0
if $data0
0
!= -340282346638528859811704183484516925440.00000 then
if $data0
5
!= -340282346638528859811704183484516925440.00000 then
return -1
return -1
endi
endi
sql alter table st_float_0 set tag tagname=+10.340
sql alter table st_float_0 set tag tagname=+10.340
sql s
elect tagname
from st_float_0
sql s
how tags
from st_float_0
if $data0
0
!= 10.34000 then
if $data0
5
!= 10.34000 then
return -1
return -1
endi
endi
sql alter table st_float_0 set tag tagname=-33.87
sql alter table st_float_0 set tag tagname=-33.87
sql s
elect tagname
from st_float_0
sql s
how tags
from st_float_0
if $data0
0
!= -33.87000 then
if $data0
5
!= -33.87000 then
return -1
return -1
endi
endi
sql alter table st_float_0 set tag tagname='+9.8'
sql alter table st_float_0 set tag tagname='+9.8'
sql s
elect tagname
from st_float_0
sql s
how tags
from st_float_0
if $data0
0
!= 9.80000 then
if $data0
5
!= 9.80000 then
return -1
return -1
endi
endi
sql alter table st_float_0 set tag tagname='-07.6'
sql alter table st_float_0 set tag tagname='-07.6'
sql s
elect tagname
from st_float_0
sql s
how tags
from st_float_0
if $data0
0
!= -7.60000 then
if $data0
5
!= -7.60000 then
return -1
return -1
endi
endi
sql alter table st_float_0 set tag tagname=+0012.871
sql alter table st_float_0 set tag tagname=+0012.871
sql s
elect tagname
from st_float_0
sql s
how tags
from st_float_0
if $data0
0
!= 12.87100 then
if $data0
5
!= 12.87100 then
return -1
return -1
endi
endi
sql alter table st_float_0 set tag tagname=-00063.582
sql alter table st_float_0 set tag tagname=-00063.582
sql s
elect tagname
from st_float_0
sql s
how tags
from st_float_0
if $data0
0
!= -63.58200 then
if $data0
5
!= -63.58200 then
return -1
return -1
endi
endi
...
@@ -468,11 +475,11 @@ sql_error create table st_float_e0 using mt_float tags (-333.40282347e+38)
...
@@ -468,11 +475,11 @@ sql_error create table st_float_e0 using mt_float tags (-333.40282347e+38)
#sql_error create table st_float_e0 using mt_float tags (12.80) truncate integer part
#sql_error create table st_float_e0 using mt_float tags (12.80) truncate integer part
#sql_error create table st_float_e0 using mt_float tags (-11.80)
#sql_error create table st_float_e0 using mt_float tags (-11.80)
sql_error create table st_float_e0 using mt_float tags (123abc)
sql_error create table st_float_e0 using mt_float tags (123abc)
sql
_error create table st_float_e0
using mt_float tags ("123abc")
sql
create table st_float_e0_1
using mt_float tags ("123abc")
sql_error create table st_float_e0 using mt_float tags (abc)
sql_error create table st_float_e0 using mt_float tags (abc)
sql
_error create table st_float_e0
using mt_float tags ("abc")
sql
create table st_float_e0_2
using mt_float tags ("abc")
sql
_error create table st_float_e0
using mt_float tags (" ")
sql
create table st_float_e0_3
using mt_float tags (" ")
sql
_error create table st_float_e0
using mt_float tags ('')
sql
create table st_float_e0_4
using mt_float tags ('')
sql create table st_float_e0 using mt_float tags (123)
sql create table st_float_e0 using mt_float tags (123)
sql create table st_float_e1 using mt_float tags (123)
sql create table st_float_e1 using mt_float tags (123)
...
@@ -499,7 +506,7 @@ sql_error insert into st_float_e7 values (now, "123abc")
...
@@ -499,7 +506,7 @@ sql_error insert into st_float_e7 values (now, "123abc")
sql_error insert into st_float_e9 values (now, abc)
sql_error insert into st_float_e9 values (now, abc)
sql_error insert into st_float_e10 values (now, "abc")
sql_error insert into st_float_e10 values (now, "abc")
sql_error insert into st_float_e11 values (now, " ")
sql_error insert into st_float_e11 values (now, " ")
sql
_error
insert into st_float_e12 values (now, '')
sql insert into st_float_e12 values (now, '')
sql_error insert into st_float_e13 using mt_float tags (033) values (now, 3.50282347e+38)
sql_error insert into st_float_e13 using mt_float tags (033) values (now, 3.50282347e+38)
sql_error insert into st_float_e14 using mt_float tags (033) values (now, -3.50282347e+38)
sql_error insert into st_float_e14 using mt_float tags (033) values (now, -3.50282347e+38)
...
@@ -512,7 +519,7 @@ sql_error insert into st_float_e20 using mt_float tags (033) values (now, "123ab
...
@@ -512,7 +519,7 @@ sql_error insert into st_float_e20 using mt_float tags (033) values (now, "123ab
sql_error insert into st_float_e22 using mt_float tags (033) values (now, abc)
sql_error insert into st_float_e22 using mt_float tags (033) values (now, abc)
sql_error insert into st_float_e23 using mt_float tags (033) values (now, "abc")
sql_error insert into st_float_e23 using mt_float tags (033) values (now, "abc")
sql_error insert into st_float_e24 using mt_float tags (033) values (now, " ")
sql_error insert into st_float_e24 using mt_float tags (033) values (now, " ")
sql
_error insert into st_float_e25
using mt_float tags (033) values (now, '')
sql
insert into st_float_e25_1
using mt_float tags (033) values (now, '')
sql_error insert into st_float_e13 using mt_float tags (3.50282347e+38) values (now, -033)
sql_error insert into st_float_e13 using mt_float tags (3.50282347e+38) values (now, -033)
sql_error insert into st_float_e14 using mt_float tags (-3.50282347e+38) values (now, -033)
sql_error insert into st_float_e14 using mt_float tags (-3.50282347e+38) values (now, -033)
...
@@ -525,7 +532,7 @@ sql_error insert into st_float_e20 using mt_float tags ("123abc") values (now, -
...
@@ -525,7 +532,7 @@ sql_error insert into st_float_e20 using mt_float tags ("123abc") values (now, -
sql_error insert into st_float_e22 using mt_float tags (abc) values (now, -033)
sql_error insert into st_float_e22 using mt_float tags (abc) values (now, -033)
sql_error insert into st_float_e23 using mt_float tags ("abc") values (now, -033)
sql_error insert into st_float_e23 using mt_float tags ("abc") values (now, -033)
sql_error insert into st_float_e24 using mt_float tags (" ") values (now, -033)
sql_error insert into st_float_e24 using mt_float tags (" ") values (now, -033)
sql
_error insert into st_float_e25
using mt_float tags ('') values (now, -033)
sql
insert into st_float_e25_3
using mt_float tags ('') values (now, -033)
sql insert into st_float_e13 using mt_float tags (033) values (now, 00062)
sql insert into st_float_e13 using mt_float tags (033) values (now, 00062)
sql insert into st_float_e14 using mt_float tags (033) values (now, 00062)
sql insert into st_float_e14 using mt_float tags (033) values (now, 00062)
...
@@ -546,8 +553,8 @@ sql_error alter table st_float_e14 set tag tagname=-3.50282347e+38
...
@@ -546,8 +553,8 @@ sql_error alter table st_float_e14 set tag tagname=-3.50282347e+38
sql_error alter table st_float_e15 set tag tagname=13.40282347e+38
sql_error alter table st_float_e15 set tag tagname=13.40282347e+38
sql_error alter table st_float_e16 set tag tagname=-13.40282347e+38
sql_error alter table st_float_e16 set tag tagname=-13.40282347e+38
sql_error alter table st_float_e19 set tag tagname=123abc
sql_error alter table st_float_e19 set tag tagname=123abc
sql
_error
alter table st_float_e20 set tag tagname="123abc"
sql alter table st_float_e20 set tag tagname="123abc"
sql_error alter table st_float_e22 set tag tagname=abc
sql_error alter table st_float_e22 set tag tagname=abc
sql
_error
alter table st_float_e23 set tag tagname="abc"
sql alter table st_float_e23 set tag tagname="abc"
sql
_error
alter table st_float_e24 set tag tagname=" "
sql alter table st_float_e24 set tag tagname=" "
sql
_error
alter table st_float_e25 set tag tagname=''
sql alter table st_float_e25 set tag tagname=''
tests/script/tsim/parser/columnValue_int.sim
浏览文件 @
81d42419
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sql connect
sql connect
sql create database if not exists db
print ========== columnValues.sim
sql drop database if exists db
sql create database db
sql use db
sql use db
#### test the value of all data types in four cases: static create table, insert column value, synamic create table, alter tag value
#### test the value of all data types in four cases: static create table, insert column value, synamic create table, alter tag value
...
@@ -10,78 +17,64 @@ sql create table mt_int (ts timestamp, c int) tags (tagname int)
...
@@ -10,78 +17,64 @@ sql create table mt_int (ts timestamp, c int) tags (tagname int)
## case 00: static create table for test tag values
## case 00: static create table for test tag values
sql create table st_int_0 using mt_int tags (NULL)
sql create table st_int_0 using mt_int tags (NULL)
sql s
elect tagname
from st_int_0
sql s
how tags
from st_int_0
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql create table st_int_1 using mt_int tags (NULL)
sql create table st_int_1 using mt_int tags (NULL)
sql select tagname from st_int_1
sql show tags from st_int_1
if $data00 != NULL then
if $data05 != NULL then
return -1
endi
sql create table st_int_2 using mt_int tags ('NULL')
sql select tagname from st_int_2
if $data00 != NULL then
return -1
endi
sql create table st_int_3 using mt_int tags ('NULL')
sql select tagname from st_int_3
if $data00 != NULL then
return -1
endi
sql create table st_int_4 using mt_int tags ("NULL")
sql select tagname from st_int_4
if $data00 != NULL then
return -1
endi
sql create table st_int_5 using mt_int tags ("NULL")
sql select tagname from st_int_5
if $data00 != NULL then
return -1
return -1
endi
endi
sql_error create table st_int_2 using mt_int tags ('NULL')
sql_error create table st_int_3 using mt_int tags ('NULL')
sql_error create table st_int_4 using mt_int tags ("NULL")
sql_error create table st_int_5 using mt_int tags ("NULL")
sql create table st_int_6 using mt_int tags (-2147483647)
sql create table st_int_6 using mt_int tags (-2147483647)
sql s
elect tagname
from st_int_6
sql s
how tags
from st_int_6
if $data0
0
!= -2147483647 then
if $data0
5
!= -2147483647 then
return -1
return -1
endi
endi
sql create table st_int_7 using mt_int tags (2147483647)
sql create table st_int_7 using mt_int tags (2147483647)
sql s
elect tagname
from st_int_7
sql s
how tags
from st_int_7
if $data0
0
!= 2147483647 then
if $data0
5
!= 2147483647 then
return -1
return -1
endi
endi
sql create table st_int_8 using mt_int tags (37)
sql create table st_int_8 using mt_int tags (37)
sql s
elect tagname
from st_int_8
sql s
how tags
from st_int_8
if $data0
0
!= 37 then
if $data0
5
!= 37 then
return -1
return -1
endi
endi
sql create table st_int_9 using mt_int tags (-100)
sql create table st_int_9 using mt_int tags (-100)
sql s
elect tagname
from st_int_9
sql s
how tags
from st_int_9
if $data0
0
!= -100 then
if $data0
5
!= -100 then
return -1
return -1
endi
endi
sql create table st_int_10 using mt_int tags (+113)
sql create table st_int_10 using mt_int tags (+113)
sql s
elect tagname
from st_int_10
sql s
how tags
from st_int_10
if $data0
0
!= 113 then
if $data0
5
!= 113 then
return -1
return -1
endi
endi
sql create table st_int_11 using mt_int tags ('-100')
sql create table st_int_11 using mt_int tags ('-100')
sql s
elect tagname
from st_int_11
sql s
how tags
from st_int_11
if $data0
0
!= -100 then
if $data0
5
!= -100 then
return -1
return -1
endi
endi
sql create table st_int_12 using mt_int tags ("+78")
sql create table st_int_12 using mt_int tags ("+78")
sql s
elect tagname
from st_int_12
sql s
how tags
from st_int_12
if $data0
0
!= 78 then
if $data0
5
!= 78 then
return -1
return -1
endi
endi
sql create table st_int_13 using mt_int tags (+0078)
sql create table st_int_13 using mt_int tags (+0078)
sql s
elect tagname
from st_int_13
sql s
how tags
from st_int_13
if $data0
0
!= 78 then
if $data0
5
!= 78 then
return -1
return -1
endi
endi
sql create table st_int_14 using mt_int tags (-00078)
sql create table st_int_14 using mt_int tags (-00078)
sql s
elect tagname
from st_int_14
sql s
how tags
from st_int_14
if $data0
0
!= -78 then
if $data0
5
!= -78 then
return -1
return -1
endi
endi
...
@@ -102,38 +95,6 @@ endi
...
@@ -102,38 +95,6 @@ endi
if $data01 != NULL then
if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_int_2 values (now, 'NULL')
sql select * from st_int_2
if $rows != 1 then
return -1
endi
if $data01 != NULL then
return -1
endi
sql insert into st_int_3 values (now, 'NULL')
sql select * from st_int_3
if $rows != 1 then
return -1
endi
if $data01 != NULL then
return -1
endi
sql insert into st_int_4 values (now, "NULL")
sql select * from st_int_4
if $rows != 1 then
return -1
endi
if $data01 != NULL then
return -1
endi
sql insert into st_int_5 values (now, "NULL")
sql select * from st_int_5
if $rows != 1 then
return -1
endi
if $data01 != NULL then
return -1
endi
sql insert into st_int_6 values (now, 2147483647)
sql insert into st_int_6 values (now, 2147483647)
sql select * from st_int_6
sql select * from st_int_6
if $rows != 1 then
if $rows != 1 then
...
@@ -211,8 +172,8 @@ endi
...
@@ -211,8 +172,8 @@ endi
## case 02: dynamic create table for test tag values
## case 02: dynamic create table for test tag values
sql insert into st_int_16 using mt_int tags (NULL) values (now, NULL)
sql insert into st_int_16 using mt_int tags (NULL) values (now, NULL)
sql s
elect tagname
from st_int_16
sql s
how tags
from st_int_16
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_int_16
sql select * from st_int_16
...
@@ -221,8 +182,8 @@ if $data01 != NULL then
...
@@ -221,8 +182,8 @@ if $data01 != NULL then
endi
endi
sql insert into st_int_17 using mt_int tags (NULL) values (now, NULL)
sql insert into st_int_17 using mt_int tags (NULL) values (now, NULL)
sql s
elect tagname
from st_int_17
sql s
how tags
from st_int_17
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_int_17
sql select * from st_int_17
...
@@ -230,8 +191,8 @@ if $data01 != NULL then
...
@@ -230,8 +191,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_int_18 using mt_int tags ('NULL') values (now, 'NULL')
sql insert into st_int_18 using mt_int tags ('NULL') values (now, 'NULL')
sql s
elect tagname
from st_int_18
sql s
how tags
from st_int_18
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_int_18
sql select * from st_int_18
...
@@ -239,8 +200,8 @@ if $data01 != NULL then
...
@@ -239,8 +200,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_int_19 using mt_int tags ('NULL') values (now, 'NULL')
sql insert into st_int_19 using mt_int tags ('NULL') values (now, 'NULL')
sql s
elect tagname
from st_int_19
sql s
how tags
from st_int_19
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_int_19
sql select * from st_int_19
...
@@ -248,8 +209,8 @@ if $data01 != NULL then
...
@@ -248,8 +209,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_int_20 using mt_int tags ("NULL") values (now, "NULL")
sql insert into st_int_20 using mt_int tags ("NULL") values (now, "NULL")
sql s
elect tagname
from st_int_20
sql s
how tags
from st_int_20
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_int_20
sql select * from st_int_20
...
@@ -257,8 +218,8 @@ if $data01 != NULL then
...
@@ -257,8 +218,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_int_21 using mt_int tags ("NULL") values (now, "NULL")
sql insert into st_int_21 using mt_int tags ("NULL") values (now, "NULL")
sql s
elect tagname
from st_int_21
sql s
how tags
from st_int_21
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_int_21
sql select * from st_int_21
...
@@ -266,8 +227,8 @@ if $data01 != NULL then
...
@@ -266,8 +227,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_int_22 using mt_int tags (2147483647) values (now, 2147483647)
sql insert into st_int_22 using mt_int tags (2147483647) values (now, 2147483647)
sql s
elect tagname
from st_int_22
sql s
how tags
from st_int_22
if $data0
0
!= 2147483647 then
if $data0
5
!= 2147483647 then
return -1
return -1
endi
endi
sql select * from st_int_22
sql select * from st_int_22
...
@@ -275,8 +236,8 @@ if $data01 != 2147483647 then
...
@@ -275,8 +236,8 @@ if $data01 != 2147483647 then
return -1
return -1
endi
endi
sql insert into st_int_23 using mt_int tags (-2147483647) values (now, -2147483647)
sql insert into st_int_23 using mt_int tags (-2147483647) values (now, -2147483647)
sql s
elect tagname
from st_int_23
sql s
how tags
from st_int_23
if $data0
0
!= -2147483647 then
if $data0
5
!= -2147483647 then
return -1
return -1
endi
endi
sql select * from st_int_23
sql select * from st_int_23
...
@@ -284,8 +245,8 @@ if $data01 != -2147483647 then
...
@@ -284,8 +245,8 @@ if $data01 != -2147483647 then
return -1
return -1
endi
endi
sql insert into st_int_24 using mt_int tags (10) values (now, 10)
sql insert into st_int_24 using mt_int tags (10) values (now, 10)
sql s
elect tagname
from st_int_24
sql s
how tags
from st_int_24
if $data0
0
!= 10 then
if $data0
5
!= 10 then
return -1
return -1
endi
endi
sql select * from st_int_24
sql select * from st_int_24
...
@@ -293,8 +254,8 @@ if $data01 != 10 then
...
@@ -293,8 +254,8 @@ if $data01 != 10 then
return -1
return -1
endi
endi
sql insert into st_int_25 using mt_int tags ("-0") values (now, "-0")
sql insert into st_int_25 using mt_int tags ("-0") values (now, "-0")
sql s
elect tagname
from st_int_25
sql s
how tags
from st_int_25
if $data0
0
!= 0 then
if $data0
5
!= 0 then
return -1
return -1
endi
endi
sql select * from st_int_25
sql select * from st_int_25
...
@@ -302,8 +263,8 @@ if $data01 != 0 then
...
@@ -302,8 +263,8 @@ if $data01 != 0 then
return -1
return -1
endi
endi
sql insert into st_int_26 using mt_int tags ('123') values (now, '123')
sql insert into st_int_26 using mt_int tags ('123') values (now, '123')
sql s
elect tagname
from st_int_26
sql s
how tags
from st_int_26
if $data0
0
!= 123 then
if $data0
5
!= 123 then
return -1
return -1
endi
endi
sql select * from st_int_26
sql select * from st_int_26
...
@@ -311,8 +272,8 @@ if $data01 != 123 then
...
@@ -311,8 +272,8 @@ if $data01 != 123 then
return -1
return -1
endi
endi
sql insert into st_int_27 using mt_int tags (+056) values (now, +00056)
sql insert into st_int_27 using mt_int tags (+056) values (now, +00056)
sql s
elect tagname
from st_int_27
sql s
how tags
from st_int_27
if $data0
0
!= 56 then
if $data0
5
!= 56 then
return -1
return -1
endi
endi
sql select * from st_int_27
sql select * from st_int_27
...
@@ -320,8 +281,8 @@ if $data01 != 56 then
...
@@ -320,8 +281,8 @@ if $data01 != 56 then
return -1
return -1
endi
endi
sql insert into st_int_28 using mt_int tags (-056) values (now, -0056)
sql insert into st_int_28 using mt_int tags (-056) values (now, -0056)
sql s
elect tagname
from st_int_28
sql s
how tags
from st_int_28
if $data0
0
!= -56 then
if $data0
5
!= -56 then
return -1
return -1
endi
endi
sql select * from st_int_28
sql select * from st_int_28
...
@@ -331,49 +292,49 @@ endi
...
@@ -331,49 +292,49 @@ endi
### case 03: alter tag values
### case 03: alter tag values
#sql alter table st_int_0 set tag tagname=2147483647
#sql alter table st_int_0 set tag tagname=2147483647
#sql s
elect tagname
from st_int_0
#sql s
how tags
from st_int_0
#if $data0
0
!= 2147483647 then
#if $data0
5
!= 2147483647 then
# return -1
# return -1
#endi
#endi
#sql alter table st_int_0 set tag tagname=-2147483647
#sql alter table st_int_0 set tag tagname=-2147483647
#sql s
elect tagname
from st_int_0
#sql s
how tags
from st_int_0
#if $data0
0
!= -2147483647 then
#if $data0
5
!= -2147483647 then
# return -1
# return -1
#endi
#endi
#sql alter table st_int_0 set tag tagname=+100
#sql alter table st_int_0 set tag tagname=+100
#sql s
elect tagname
from st_int_0
#sql s
how tags
from st_int_0
#if $data0
0
!= 100 then
#if $data0
5
!= 100 then
# return -1
# return -1
#endi
#endi
#sql alter table st_int_0 set tag tagname=-33
#sql alter table st_int_0 set tag tagname=-33
#sql s
elect tagname
from st_int_0
#sql s
how tags
from st_int_0
#if $data0
0
!= -33 then
#if $data0
5
!= -33 then
# return -1
# return -1
#endi
#endi
#sql alter table st_int_0 set tag tagname='+98'
#sql alter table st_int_0 set tag tagname='+98'
#sql s
elect tagname
from st_int_0
#sql s
how tags
from st_int_0
#if $data0
0
!= 98 then
#if $data0
5
!= 98 then
# return -1
# return -1
#endi
#endi
#sql alter table st_int_0 set tag tagname='-076'
#sql alter table st_int_0 set tag tagname='-076'
#sql s
elect tagname
from st_int_0
#sql s
how tags
from st_int_0
#if $data0
0
!= -76 then
#if $data0
5
!= -76 then
# return -1
# return -1
#endi
#endi
#sql alter table st_int_0 set tag tagname=+0012
#sql alter table st_int_0 set tag tagname=+0012
#sql s
elect tagname
from st_int_0
#sql s
how tags
from st_int_0
#if $data0
0
!= 12 then
#if $data0
5
!= 12 then
# return -1
# return -1
#endi
#endi
#sql alter table st_int_0 set tag tagname=-00063
#sql alter table st_int_0 set tag tagname=-00063
#sql s
elect tagname
from st_int_0
#sql s
how tags
from st_int_0
#if $data0
0
!= -63 then
#if $data0
5
!= -63 then
# return -1
# return -1
#endi
#endi
## case 04: illegal input
## case 04: illegal input
sql_error create table st_int_e0 using mt_int tags (2147483648)
sql_error create table st_int_e0 using mt_int tags (2147483648)
sql
_error create table st_int_e0
using mt_int tags (-2147483648)
sql
create table st_int_e0_err1
using mt_int tags (-2147483648)
sql_error create table st_int_e0 using mt_int tags (214748364800)
sql_error create table st_int_e0 using mt_int tags (214748364800)
sql_error create table st_int_e0 using mt_int tags (-214748364800)
sql_error create table st_int_e0 using mt_int tags (-214748364800)
#sql_error create table st_int_e0 using mt_int tags (12.80) truncate integer part
#sql_error create table st_int_e0 using mt_int tags (12.80) truncate integer part
...
@@ -383,7 +344,7 @@ sql_error create table st_int_e0 using mt_int tags ("123abc")
...
@@ -383,7 +344,7 @@ sql_error create table st_int_e0 using mt_int tags ("123abc")
sql_error create table st_int_e0 using mt_int tags (abc)
sql_error create table st_int_e0 using mt_int tags (abc)
sql_error create table st_int_e0 using mt_int tags ("abc")
sql_error create table st_int_e0 using mt_int tags ("abc")
sql_error create table st_int_e0 using mt_int tags (" ")
sql_error create table st_int_e0 using mt_int tags (" ")
sql
_error create table st_int_e0
using mt_int tags ('')
sql
create table st_int_e0_err2
using mt_int tags ('')
sql create table st_int_e0 using mt_int tags (123)
sql create table st_int_e0 using mt_int tags (123)
sql create table st_int_e1 using mt_int tags (123)
sql create table st_int_e1 using mt_int tags (123)
...
@@ -400,7 +361,7 @@ sql create table st_int_e11 using mt_int tags (123)
...
@@ -400,7 +361,7 @@ sql create table st_int_e11 using mt_int tags (123)
sql create table st_int_e12 using mt_int tags (123)
sql create table st_int_e12 using mt_int tags (123)
sql_error insert into st_int_e0 values (now, 2147483648)
sql_error insert into st_int_e0 values (now, 2147483648)
sql
_error
insert into st_int_e1 values (now, -2147483648)
sql insert into st_int_e1 values (now, -2147483648)
sql_error insert into st_int_e2 values (now, 3147483648)
sql_error insert into st_int_e2 values (now, 3147483648)
sql_error insert into st_int_e3 values (now, -21474836481)
sql_error insert into st_int_e3 values (now, -21474836481)
#sql_error insert into st_int_e4 values (now, 12.80)
#sql_error insert into st_int_e4 values (now, 12.80)
...
@@ -410,10 +371,10 @@ sql_error insert into st_int_e7 values (now, "123abc")
...
@@ -410,10 +371,10 @@ sql_error insert into st_int_e7 values (now, "123abc")
sql_error insert into st_int_e9 values (now, abc)
sql_error insert into st_int_e9 values (now, abc)
sql_error insert into st_int_e10 values (now, "abc")
sql_error insert into st_int_e10 values (now, "abc")
sql_error insert into st_int_e11 values (now, " ")
sql_error insert into st_int_e11 values (now, " ")
sql
_error
insert into st_int_e12 values (now, '')
sql insert into st_int_e12 values (now, '')
sql_error insert into st_int_e13 using mt_int tags (033) values (now, 2147483648)
sql_error insert into st_int_e13 using mt_int tags (033) values (now, 2147483648)
sql
_error
insert into st_int_e14 using mt_int tags (033) values (now, -2147483648)
sql insert into st_int_e14 using mt_int tags (033) values (now, -2147483648)
sql_error insert into st_int_e15 using mt_int tags (033) values (now, 5147483648)
sql_error insert into st_int_e15 using mt_int tags (033) values (now, 5147483648)
sql_error insert into st_int_e16 using mt_int tags (033) values (now, -21474836481)
sql_error insert into st_int_e16 using mt_int tags (033) values (now, -21474836481)
#sql_error insert into st_int_e17 using mt_int tags (033) values (now, 12.80)
#sql_error insert into st_int_e17 using mt_int tags (033) values (now, 12.80)
...
@@ -423,10 +384,10 @@ sql_error insert into st_int_e20 using mt_int tags (033) values (now, "123abc")
...
@@ -423,10 +384,10 @@ sql_error insert into st_int_e20 using mt_int tags (033) values (now, "123abc")
sql_error insert into st_int_e22 using mt_int tags (033) values (now, abc)
sql_error insert into st_int_e22 using mt_int tags (033) values (now, abc)
sql_error insert into st_int_e23 using mt_int tags (033) values (now, "abc")
sql_error insert into st_int_e23 using mt_int tags (033) values (now, "abc")
sql_error insert into st_int_e24 using mt_int tags (033) values (now, " ")
sql_error insert into st_int_e24 using mt_int tags (033) values (now, " ")
sql
_error
insert into st_int_e25 using mt_int tags (033) values (now, '')
sql insert into st_int_e25 using mt_int tags (033) values (now, '')
sql_error insert into st_int_e13 using mt_int tags (2147483648) values (now, -033)
sql_error insert into st_int_e13 using mt_int tags (2147483648) values (now, -033)
sql
_error insert into st_int_e14
using mt_int tags (-2147483648) values (now, -033)
sql
insert into st_int_e14_1
using mt_int tags (-2147483648) values (now, -033)
sql_error insert into st_int_e15 using mt_int tags (21474836480) values (now, -033)
sql_error insert into st_int_e15 using mt_int tags (21474836480) values (now, -033)
sql_error insert into st_int_e16 using mt_int tags (-2147483649) values (now, -033)
sql_error insert into st_int_e16 using mt_int tags (-2147483649) values (now, -033)
#sql_error insert into st_int_e17 using mt_int tags (12.80) values (now, -033)
#sql_error insert into st_int_e17 using mt_int tags (12.80) values (now, -033)
...
@@ -436,7 +397,7 @@ sql_error insert into st_int_e20 using mt_int tags ("123abc") values (now, -033)
...
@@ -436,7 +397,7 @@ sql_error insert into st_int_e20 using mt_int tags ("123abc") values (now, -033)
sql_error insert into st_int_e22 using mt_int tags (abc) values (now, -033)
sql_error insert into st_int_e22 using mt_int tags (abc) values (now, -033)
sql_error insert into st_int_e23 using mt_int tags ("abc") values (now, -033)
sql_error insert into st_int_e23 using mt_int tags ("abc") values (now, -033)
sql_error insert into st_int_e24 using mt_int tags (" ") values (now, -033)
sql_error insert into st_int_e24 using mt_int tags (" ") values (now, -033)
sql
_error insert into st_int_e25
using mt_int tags ('') values (now, -033)
sql
insert into st_int_e25_1
using mt_int tags ('') values (now, -033)
sql insert into st_int_e13 using mt_int tags (033) values (now, 00062)
sql insert into st_int_e13 using mt_int tags (033) values (now, 00062)
sql insert into st_int_e14 using mt_int tags (033) values (now, 00062)
sql insert into st_int_e14 using mt_int tags (033) values (now, 00062)
...
@@ -453,7 +414,7 @@ sql insert into st_int_e24 using mt_int tags (033) values (now, 00062)
...
@@ -453,7 +414,7 @@ sql insert into st_int_e24 using mt_int tags (033) values (now, 00062)
sql insert into st_int_e25 using mt_int tags (033) values (now, 00062)
sql insert into st_int_e25 using mt_int tags (033) values (now, 00062)
sql_error alter table st_int_e13 set tag tagname=2147483648
sql_error alter table st_int_e13 set tag tagname=2147483648
sql
_error
alter table st_int_e14 set tag tagname=-2147483648
sql alter table st_int_e14 set tag tagname=-2147483648
sql_error alter table st_int_e15 set tag tagname=12147483648
sql_error alter table st_int_e15 set tag tagname=12147483648
sql_error alter table st_int_e16 set tag tagname=-3147483648
sql_error alter table st_int_e16 set tag tagname=-3147483648
sql_error alter table st_int_e19 set tag tagname=123abc
sql_error alter table st_int_e19 set tag tagname=123abc
...
@@ -461,4 +422,4 @@ sql_error alter table st_int_e20 set tag tagname="123abc"
...
@@ -461,4 +422,4 @@ sql_error alter table st_int_e20 set tag tagname="123abc"
sql_error alter table st_int_e22 set tag tagname=abc
sql_error alter table st_int_e22 set tag tagname=abc
sql_error alter table st_int_e23 set tag tagname="abc"
sql_error alter table st_int_e23 set tag tagname="abc"
sql_error alter table st_int_e24 set tag tagname=" "
sql_error alter table st_int_e24 set tag tagname=" "
sql
_error
alter table st_int_e25 set tag tagname=''
sql alter table st_int_e25 set tag tagname=''
tests/script/tsim/parser/columnValue_smallint.sim
浏览文件 @
81d42419
sql create database if not exists db
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sql connect
print ========== columnValues.sim
sql drop database if exists db
sql create database db
sql use db
sql use db
print ========== columnValues.sim
sql drop database if exists db
sql create database db
#### test the value of all data types in four cases: static create table, insert column value, synamic create table, alter tag value
#### test the value of all data types in four cases: static create table, insert column value, synamic create table, alter tag value
######## case 0: smallint
######## case 0: smallint
...
@@ -9,78 +20,64 @@ sql create table mt_smallint (ts timestamp, c smallint) tags (tagname smallint)
...
@@ -9,78 +20,64 @@ sql create table mt_smallint (ts timestamp, c smallint) tags (tagname smallint)
## case 00: static create table for test tag values
## case 00: static create table for test tag values
sql create table st_smallint_0 using mt_smallint tags (NULL)
sql create table st_smallint_0 using mt_smallint tags (NULL)
sql s
elect tagname
from st_smallint_0
sql s
how tags
from st_smallint_0
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql create table st_smallint_1 using mt_smallint tags (NULL)
sql create table st_smallint_1 using mt_smallint tags (NULL)
sql select tagname from st_smallint_1
sql show tags from st_smallint_1
if $data00 != NULL then
if $data05 != NULL then
return -1
endi
sql create table st_smallint_2 using mt_smallint tags ('NULL')
sql select tagname from st_smallint_2
if $data00 != NULL then
return -1
endi
sql create table st_smallint_3 using mt_smallint tags ('NULL')
sql select tagname from st_smallint_3
if $data00 != NULL then
return -1
endi
sql create table st_smallint_4 using mt_smallint tags ("NULL")
sql select tagname from st_smallint_4
if $data00 != NULL then
return -1
endi
sql create table st_smallint_5 using mt_smallint tags ("NULL")
sql select tagname from st_smallint_5
if $data00 != NULL then
return -1
return -1
endi
endi
sql_error create table st_smallint_2 using mt_smallint tags ('NULL')
sql_error create table st_smallint_3 using mt_smallint tags ('NULL')
sql_error create table st_smallint_4 using mt_smallint tags ("NULL")
sql_error create table st_smallint_5 using mt_smallint tags ("NULL")
sql create table st_smallint_6 using mt_smallint tags (-32767)
sql create table st_smallint_6 using mt_smallint tags (-32767)
sql s
elect tagname
from st_smallint_6
sql s
how tags
from st_smallint_6
if $data0
0
!= -32767 then
if $data0
5
!= -32767 then
return -1
return -1
endi
endi
sql create table st_smallint_7 using mt_smallint tags (32767)
sql create table st_smallint_7 using mt_smallint tags (32767)
sql s
elect tagname
from st_smallint_7
sql s
how tags
from st_smallint_7
if $data0
0
!= 32767 then
if $data0
5
!= 32767 then
return -1
return -1
endi
endi
sql create table st_smallint_8 using mt_smallint tags (37)
sql create table st_smallint_8 using mt_smallint tags (37)
sql s
elect tagname
from st_smallint_8
sql s
how tags
from st_smallint_8
if $data0
0
!= 37 then
if $data0
5
!= 37 then
return -1
return -1
endi
endi
sql create table st_smallint_9 using mt_smallint tags (-100)
sql create table st_smallint_9 using mt_smallint tags (-100)
sql s
elect tagname
from st_smallint_9
sql s
how tags
from st_smallint_9
if $data0
0
!= -100 then
if $data0
5
!= -100 then
return -1
return -1
endi
endi
sql create table st_smallint_10 using mt_smallint tags (+113)
sql create table st_smallint_10 using mt_smallint tags (+113)
sql s
elect tagname
from st_smallint_10
sql s
how tags
from st_smallint_10
if $data0
0
!= 113 then
if $data0
5
!= 113 then
return -1
return -1
endi
endi
sql create table st_smallint_11 using mt_smallint tags ('-100')
sql create table st_smallint_11 using mt_smallint tags ('-100')
sql s
elect tagname
from st_smallint_11
sql s
how tags
from st_smallint_11
if $data0
0
!= -100 then
if $data0
5
!= -100 then
return -1
return -1
endi
endi
sql create table st_smallint_12 using mt_smallint tags ("+78")
sql create table st_smallint_12 using mt_smallint tags ("+78")
sql s
elect tagname
from st_smallint_12
sql s
how tags
from st_smallint_12
if $data0
0
!= 78 then
if $data0
5
!= 78 then
return -1
return -1
endi
endi
sql create table st_smallint_13 using mt_smallint tags (+0078)
sql create table st_smallint_13 using mt_smallint tags (+0078)
sql s
elect tagname
from st_smallint_13
sql s
how tags
from st_smallint_13
if $data0
0
!= 78 then
if $data0
5
!= 78 then
return -1
return -1
endi
endi
sql create table st_smallint_14 using mt_smallint tags (-00078)
sql create table st_smallint_14 using mt_smallint tags (-00078)
sql s
elect tagname
from st_smallint_14
sql s
how tags
from st_smallint_14
if $data0
0
!= -78 then
if $data0
5
!= -78 then
return -1
return -1
endi
endi
...
@@ -101,38 +98,6 @@ endi
...
@@ -101,38 +98,6 @@ endi
if $data01 != NULL then
if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_smallint_2 values (now, 'NULL')
sql select * from st_smallint_2
if $rows != 1 then
return -1
endi
if $data01 != NULL then
return -1
endi
sql insert into st_smallint_3 values (now, 'NULL')
sql select * from st_smallint_3
if $rows != 1 then
return -1
endi
if $data01 != NULL then
return -1
endi
sql insert into st_smallint_4 values (now, "NULL")
sql select * from st_smallint_4
if $rows != 1 then
return -1
endi
if $data01 != NULL then
return -1
endi
sql insert into st_smallint_5 values (now, "NULL")
sql select * from st_smallint_5
if $rows != 1 then
return -1
endi
if $data01 != NULL then
return -1
endi
sql insert into st_smallint_6 values (now, 32767)
sql insert into st_smallint_6 values (now, 32767)
sql select * from st_smallint_6
sql select * from st_smallint_6
if $rows != 1 then
if $rows != 1 then
...
@@ -210,8 +175,8 @@ endi
...
@@ -210,8 +175,8 @@ endi
## case 02: dynamic create table for test tag values
## case 02: dynamic create table for test tag values
sql insert into st_smallint_16 using mt_smallint tags (NULL) values (now, NULL)
sql insert into st_smallint_16 using mt_smallint tags (NULL) values (now, NULL)
sql s
elect tagname
from st_smallint_16
sql s
how tags
from st_smallint_16
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_smallint_16
sql select * from st_smallint_16
...
@@ -220,8 +185,8 @@ if $data01 != NULL then
...
@@ -220,8 +185,8 @@ if $data01 != NULL then
endi
endi
sql insert into st_smallint_17 using mt_smallint tags (NULL) values (now, NULL)
sql insert into st_smallint_17 using mt_smallint tags (NULL) values (now, NULL)
sql s
elect tagname
from st_smallint_17
sql s
how tags
from st_smallint_17
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_smallint_17
sql select * from st_smallint_17
...
@@ -229,8 +194,8 @@ if $data01 != NULL then
...
@@ -229,8 +194,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_smallint_18 using mt_smallint tags ('NULL') values (now, 'NULL')
sql insert into st_smallint_18 using mt_smallint tags ('NULL') values (now, 'NULL')
sql s
elect tagname
from st_smallint_18
sql s
how tags
from st_smallint_18
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_smallint_18
sql select * from st_smallint_18
...
@@ -238,8 +203,8 @@ if $data01 != NULL then
...
@@ -238,8 +203,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_smallint_19 using mt_smallint tags ('NULL') values (now, 'NULL')
sql insert into st_smallint_19 using mt_smallint tags ('NULL') values (now, 'NULL')
sql s
elect tagname
from st_smallint_19
sql s
how tags
from st_smallint_19
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_smallint_19
sql select * from st_smallint_19
...
@@ -247,8 +212,8 @@ if $data01 != NULL then
...
@@ -247,8 +212,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_smallint_20 using mt_smallint tags ("NULL") values (now, "NULL")
sql insert into st_smallint_20 using mt_smallint tags ("NULL") values (now, "NULL")
sql s
elect tagname
from st_smallint_20
sql s
how tags
from st_smallint_20
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_smallint_20
sql select * from st_smallint_20
...
@@ -256,8 +221,8 @@ if $data01 != NULL then
...
@@ -256,8 +221,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_smallint_21 using mt_smallint tags ("NULL") values (now, "NULL")
sql insert into st_smallint_21 using mt_smallint tags ("NULL") values (now, "NULL")
sql s
elect tagname
from st_smallint_21
sql s
how tags
from st_smallint_21
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_smallint_21
sql select * from st_smallint_21
...
@@ -265,8 +230,8 @@ if $data01 != NULL then
...
@@ -265,8 +230,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_smallint_22 using mt_smallint tags (32767) values (now, 32767)
sql insert into st_smallint_22 using mt_smallint tags (32767) values (now, 32767)
sql s
elect tagname
from st_smallint_22
sql s
how tags
from st_smallint_22
if $data0
0
!= 32767 then
if $data0
5
!= 32767 then
return -1
return -1
endi
endi
sql select * from st_smallint_22
sql select * from st_smallint_22
...
@@ -274,8 +239,8 @@ if $data01 != 32767 then
...
@@ -274,8 +239,8 @@ if $data01 != 32767 then
return -1
return -1
endi
endi
sql insert into st_smallint_23 using mt_smallint tags (-32767) values (now, -32767)
sql insert into st_smallint_23 using mt_smallint tags (-32767) values (now, -32767)
sql s
elect tagname
from st_smallint_23
sql s
how tags
from st_smallint_23
if $data0
0
!= -32767 then
if $data0
5
!= -32767 then
return -1
return -1
endi
endi
sql select * from st_smallint_23
sql select * from st_smallint_23
...
@@ -283,8 +248,8 @@ if $data01 != -32767 then
...
@@ -283,8 +248,8 @@ if $data01 != -32767 then
return -1
return -1
endi
endi
sql insert into st_smallint_24 using mt_smallint tags (10) values (now, 10)
sql insert into st_smallint_24 using mt_smallint tags (10) values (now, 10)
sql s
elect tagname
from st_smallint_24
sql s
how tags
from st_smallint_24
if $data0
0
!= 10 then
if $data0
5
!= 10 then
return -1
return -1
endi
endi
sql select * from st_smallint_24
sql select * from st_smallint_24
...
@@ -292,8 +257,8 @@ if $data01 != 10 then
...
@@ -292,8 +257,8 @@ if $data01 != 10 then
return -1
return -1
endi
endi
sql insert into st_smallint_25 using mt_smallint tags ("-0") values (now, "-0")
sql insert into st_smallint_25 using mt_smallint tags ("-0") values (now, "-0")
sql s
elect tagname
from st_smallint_25
sql s
how tags
from st_smallint_25
if $data0
0
!= 0 then
if $data0
5
!= 0 then
return -1
return -1
endi
endi
sql select * from st_smallint_25
sql select * from st_smallint_25
...
@@ -301,8 +266,8 @@ if $data01 != 0 then
...
@@ -301,8 +266,8 @@ if $data01 != 0 then
return -1
return -1
endi
endi
sql insert into st_smallint_26 using mt_smallint tags ('123') values (now, '123')
sql insert into st_smallint_26 using mt_smallint tags ('123') values (now, '123')
sql s
elect tagname
from st_smallint_26
sql s
how tags
from st_smallint_26
if $data0
0
!= 123 then
if $data0
5
!= 123 then
return -1
return -1
endi
endi
sql select * from st_smallint_26
sql select * from st_smallint_26
...
@@ -310,8 +275,8 @@ if $data01 != 123 then
...
@@ -310,8 +275,8 @@ if $data01 != 123 then
return -1
return -1
endi
endi
sql insert into st_smallint_27 using mt_smallint tags (+056) values (now, +00056)
sql insert into st_smallint_27 using mt_smallint tags (+056) values (now, +00056)
sql s
elect tagname
from st_smallint_27
sql s
how tags
from st_smallint_27
if $data0
0
!= 56 then
if $data0
5
!= 56 then
return -1
return -1
endi
endi
sql select * from st_smallint_27
sql select * from st_smallint_27
...
@@ -319,8 +284,8 @@ if $data01 != 56 then
...
@@ -319,8 +284,8 @@ if $data01 != 56 then
return -1
return -1
endi
endi
sql insert into st_smallint_28 using mt_smallint tags (-056) values (now, -0056)
sql insert into st_smallint_28 using mt_smallint tags (-056) values (now, -0056)
sql s
elect tagname
from st_smallint_28
sql s
how tags
from st_smallint_28
if $data0
0
!= -56 then
if $data0
5
!= -56 then
return -1
return -1
endi
endi
sql select * from st_smallint_28
sql select * from st_smallint_28
...
@@ -330,49 +295,49 @@ endi
...
@@ -330,49 +295,49 @@ endi
## case 03: alter tag values
## case 03: alter tag values
#sql alter table st_smallint_0 set tag tagname=32767
#sql alter table st_smallint_0 set tag tagname=32767
#sql s
elect tagname
from st_smallint_0
#sql s
how tags
from st_smallint_0
#if $data0
0
!= 32767 then
#if $data0
5
!= 32767 then
# return -1
# return -1
#endi
#endi
#sql alter table st_smallint_0 set tag tagname=-32767
#sql alter table st_smallint_0 set tag tagname=-32767
#sql s
elect tagname
from st_smallint_0
#sql s
how tags
from st_smallint_0
#if $data0
0
!= -32767 then
#if $data0
5
!= -32767 then
# return -1
# return -1
#endi
#endi
#sql alter table st_smallint_0 set tag tagname=+100
#sql alter table st_smallint_0 set tag tagname=+100
#sql s
elect tagname
from st_smallint_0
#sql s
how tags
from st_smallint_0
#if $data0
0
!= 100 then
#if $data0
5
!= 100 then
# return -1
# return -1
#endi
#endi
#sql alter table st_smallint_0 set tag tagname=-33
#sql alter table st_smallint_0 set tag tagname=-33
#sql s
elect tagname
from st_smallint_0
#sql s
how tags
from st_smallint_0
#if $data0
0
!= -33 then
#if $data0
5
!= -33 then
# return -1
# return -1
#endi
#endi
#sql alter table st_smallint_0 set tag tagname='+98'
#sql alter table st_smallint_0 set tag tagname='+98'
#sql s
elect tagname
from st_smallint_0
#sql s
how tags
from st_smallint_0
#if $data0
0
!= 98 then
#if $data0
5
!= 98 then
# return -1
# return -1
#endi
#endi
#sql alter table st_smallint_0 set tag tagname='-076'
#sql alter table st_smallint_0 set tag tagname='-076'
#sql s
elect tagname
from st_smallint_0
#sql s
how tags
from st_smallint_0
#if $data0
0
!= -76 then
#if $data0
5
!= -76 then
# return -1
# return -1
#endi
#endi
#sql alter table st_smallint_0 set tag tagname=+0012
#sql alter table st_smallint_0 set tag tagname=+0012
#sql s
elect tagname
from st_smallint_0
#sql s
how tags
from st_smallint_0
#if $data0
0
!= 12 then
#if $data0
5
!= 12 then
# return -1
# return -1
#endi
#endi
#sql alter table st_smallint_0 set tag tagname=-00063
#sql alter table st_smallint_0 set tag tagname=-00063
#sql s
elect tagname
from st_smallint_0
#sql s
how tags
from st_smallint_0
#if $data0
0
!= -63 then
#if $data0
5
!= -63 then
# return -1
# return -1
#endi
#endi
## case 04: illegal input
## case 04: illegal input
sql_error create table st_smallint_e0 using mt_smallint tags (32768)
sql_error create table st_smallint_e0 using mt_smallint tags (32768)
sql
_error create table st_smallint_e
0 using mt_smallint tags (-32768)
sql
create table st_smallint_e0_
0 using mt_smallint tags (-32768)
sql_error create table st_smallint_e0 using mt_smallint tags (3276899)
sql_error create table st_smallint_e0 using mt_smallint tags (3276899)
sql_error create table st_smallint_e0 using mt_smallint tags (-3276833)
sql_error create table st_smallint_e0 using mt_smallint tags (-3276833)
#sql_error create table st_smallint_e0 using mt_smallint tags (12.80) truncate integer part
#sql_error create table st_smallint_e0 using mt_smallint tags (12.80) truncate integer part
...
@@ -382,7 +347,7 @@ sql_error create table st_smallint_e0 using mt_smallint tags ("123abc")
...
@@ -382,7 +347,7 @@ sql_error create table st_smallint_e0 using mt_smallint tags ("123abc")
sql_error create table st_smallint_e0 using mt_smallint tags (abc)
sql_error create table st_smallint_e0 using mt_smallint tags (abc)
sql_error create table st_smallint_e0 using mt_smallint tags ("abc")
sql_error create table st_smallint_e0 using mt_smallint tags ("abc")
sql_error create table st_smallint_e0 using mt_smallint tags (" ")
sql_error create table st_smallint_e0 using mt_smallint tags (" ")
sql
_error create table st_smallint_e0
using mt_smallint tags ('')
sql
create table st_smallint_e0_1
using mt_smallint tags ('')
sql create table st_smallint_e0 using mt_smallint tags (123)
sql create table st_smallint_e0 using mt_smallint tags (123)
sql create table st_smallint_e1 using mt_smallint tags (123)
sql create table st_smallint_e1 using mt_smallint tags (123)
...
@@ -399,7 +364,7 @@ sql create table st_smallint_e11 using mt_smallint tags (123)
...
@@ -399,7 +364,7 @@ sql create table st_smallint_e11 using mt_smallint tags (123)
sql create table st_smallint_e12 using mt_smallint tags (123)
sql create table st_smallint_e12 using mt_smallint tags (123)
sql_error insert into st_smallint_e0 values (now, 32768)
sql_error insert into st_smallint_e0 values (now, 32768)
sql
_error
insert into st_smallint_e1 values (now, -32768)
sql insert into st_smallint_e1 values (now, -32768)
sql_error insert into st_smallint_e2 values (now, 42768)
sql_error insert into st_smallint_e2 values (now, 42768)
sql_error insert into st_smallint_e3 values (now, -32769)
sql_error insert into st_smallint_e3 values (now, -32769)
#sql_error insert into st_smallint_e4 values (now, 12.80)
#sql_error insert into st_smallint_e4 values (now, 12.80)
...
@@ -409,10 +374,10 @@ sql_error insert into st_smallint_e7 values (now, "123abc")
...
@@ -409,10 +374,10 @@ sql_error insert into st_smallint_e7 values (now, "123abc")
sql_error insert into st_smallint_e9 values (now, abc)
sql_error insert into st_smallint_e9 values (now, abc)
sql_error insert into st_smallint_e10 values (now, "abc")
sql_error insert into st_smallint_e10 values (now, "abc")
sql_error insert into st_smallint_e11 values (now, " ")
sql_error insert into st_smallint_e11 values (now, " ")
sql
_error
insert into st_smallint_e12 values (now, '')
sql insert into st_smallint_e12 values (now, '')
sql_error insert into st_smallint_e13 using mt_smallint tags (033) values (now, 32768)
sql_error insert into st_smallint_e13 using mt_smallint tags (033) values (now, 32768)
sql
_error insert into st_smallint_e14
using mt_smallint tags (033) values (now, -32768)
sql
insert into st_smallint_e14_1
using mt_smallint tags (033) values (now, -32768)
sql_error insert into st_smallint_e15 using mt_smallint tags (033) values (now, 32968)
sql_error insert into st_smallint_e15 using mt_smallint tags (033) values (now, 32968)
sql_error insert into st_smallint_e16 using mt_smallint tags (033) values (now, -33768)
sql_error insert into st_smallint_e16 using mt_smallint tags (033) values (now, -33768)
#sql_error insert into st_smallint_e17 using mt_smallint tags (033) values (now, 12.80)
#sql_error insert into st_smallint_e17 using mt_smallint tags (033) values (now, 12.80)
...
@@ -422,10 +387,10 @@ sql_error insert into st_smallint_e20 using mt_smallint tags (033) values (now,
...
@@ -422,10 +387,10 @@ sql_error insert into st_smallint_e20 using mt_smallint tags (033) values (now,
sql_error insert into st_smallint_e22 using mt_smallint tags (033) values (now, abc)
sql_error insert into st_smallint_e22 using mt_smallint tags (033) values (now, abc)
sql_error insert into st_smallint_e23 using mt_smallint tags (033) values (now, "abc")
sql_error insert into st_smallint_e23 using mt_smallint tags (033) values (now, "abc")
sql_error insert into st_smallint_e24 using mt_smallint tags (033) values (now, " ")
sql_error insert into st_smallint_e24 using mt_smallint tags (033) values (now, " ")
sql
_error insert into st_smallint_e25
using mt_smallint tags (033) values (now, '')
sql
insert into st_smallint_e25_1
using mt_smallint tags (033) values (now, '')
sql_error insert into st_smallint_e13 using mt_smallint tags (32768) values (now, -033)
sql_error insert into st_smallint_e13 using mt_smallint tags (32768) values (now, -033)
sql
_error
insert into st_smallint_e14 using mt_smallint tags (-32768) values (now, -033)
sql insert into st_smallint_e14 using mt_smallint tags (-32768) values (now, -033)
sql_error insert into st_smallint_e15 using mt_smallint tags (72768) values (now, -033)
sql_error insert into st_smallint_e15 using mt_smallint tags (72768) values (now, -033)
sql_error insert into st_smallint_e16 using mt_smallint tags (-92768) values (now, -033)
sql_error insert into st_smallint_e16 using mt_smallint tags (-92768) values (now, -033)
#sql_error insert into st_smallint_e17 using mt_smallint tags (12.80) values (now, -033)
#sql_error insert into st_smallint_e17 using mt_smallint tags (12.80) values (now, -033)
...
@@ -435,7 +400,7 @@ sql_error insert into st_smallint_e20 using mt_smallint tags ("123abc") values (
...
@@ -435,7 +400,7 @@ sql_error insert into st_smallint_e20 using mt_smallint tags ("123abc") values (
sql_error insert into st_smallint_e22 using mt_smallint tags (abc) values (now, -033)
sql_error insert into st_smallint_e22 using mt_smallint tags (abc) values (now, -033)
sql_error insert into st_smallint_e23 using mt_smallint tags ("abc") values (now, -033)
sql_error insert into st_smallint_e23 using mt_smallint tags ("abc") values (now, -033)
sql_error insert into st_smallint_e24 using mt_smallint tags (" ") values (now, -033)
sql_error insert into st_smallint_e24 using mt_smallint tags (" ") values (now, -033)
sql
_error
insert into st_smallint_e25 using mt_smallint tags ('') values (now, -033)
sql insert into st_smallint_e25 using mt_smallint tags ('') values (now, -033)
sql insert into st_smallint_e13 using mt_smallint tags (033) values (now, 00062)
sql insert into st_smallint_e13 using mt_smallint tags (033) values (now, 00062)
sql insert into st_smallint_e14 using mt_smallint tags (033) values (now, 00062)
sql insert into st_smallint_e14 using mt_smallint tags (033) values (now, 00062)
...
@@ -452,7 +417,7 @@ sql insert into st_smallint_e24 using mt_smallint tags (033) values (now, 00062)
...
@@ -452,7 +417,7 @@ sql insert into st_smallint_e24 using mt_smallint tags (033) values (now, 00062)
sql insert into st_smallint_e25 using mt_smallint tags (033) values (now, 00062)
sql insert into st_smallint_e25 using mt_smallint tags (033) values (now, 00062)
sql_error alter table st_smallint_e13 set tag tagname=32768
sql_error alter table st_smallint_e13 set tag tagname=32768
sql
_error
alter table st_smallint_e14 set tag tagname=-32768
sql alter table st_smallint_e14 set tag tagname=-32768
sql_error alter table st_smallint_e15 set tag tagname=52768
sql_error alter table st_smallint_e15 set tag tagname=52768
sql_error alter table st_smallint_e16 set tag tagname=-32778
sql_error alter table st_smallint_e16 set tag tagname=-32778
sql_error alter table st_smallint_e19 set tag tagname=123abc
sql_error alter table st_smallint_e19 set tag tagname=123abc
...
@@ -460,4 +425,4 @@ sql_error alter table st_smallint_e20 set tag tagname="123abc"
...
@@ -460,4 +425,4 @@ sql_error alter table st_smallint_e20 set tag tagname="123abc"
sql_error alter table st_smallint_e22 set tag tagname=abc
sql_error alter table st_smallint_e22 set tag tagname=abc
sql_error alter table st_smallint_e23 set tag tagname="abc"
sql_error alter table st_smallint_e23 set tag tagname="abc"
sql_error alter table st_smallint_e24 set tag tagname=" "
sql_error alter table st_smallint_e24 set tag tagname=" "
sql
_error
alter table st_smallint_e25 set tag tagname=''
sql alter table st_smallint_e25 set tag tagname=''
tests/script/tsim/parser/columnValue_tinyint.sim
浏览文件 @
81d42419
sql create database if not exists db
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sql connect
print ========== columnValues.sim
sql drop database if exists db
sql create database db
sql use db
sql use db
#### test the value of all data types in four cases: static create table, insert column value, synamic create table, alter tag value
#### test the value of all data types in four cases: static create table, insert column value, synamic create table, alter tag value
...
@@ -9,79 +17,65 @@ sql create table mt_tinyint (ts timestamp, c tinyint) tags (tagname tinyint)
...
@@ -9,79 +17,65 @@ sql create table mt_tinyint (ts timestamp, c tinyint) tags (tagname tinyint)
## case 00: static create table for test tag values
## case 00: static create table for test tag values
sql create table st_tinyint_0 using mt_tinyint tags (NULL)
sql create table st_tinyint_0 using mt_tinyint tags (NULL)
sql s
elect tagname
from st_tinyint_0
sql s
how tags
from st_tinyint_0
if $data0
0
!= NULL then
if $data0
5
!= NULL then
print expect NULL, actually: $data0
0
print expect NULL, actually: $data0
5
return -1
return -1
endi
endi
sql create table st_tinyint_1 using mt_tinyint tags (NULL)
sql create table st_tinyint_1 using mt_tinyint tags (NULL)
sql select tagname from st_tinyint_1
sql show tags from st_tinyint_1
if $data00 != NULL then
if $data05 != NULL then
return -1
endi
sql create table st_tinyint_2 using mt_tinyint tags ('NULL')
sql select tagname from st_tinyint_2
if $data00 != NULL then
return -1
endi
sql create table st_tinyint_3 using mt_tinyint tags ('NULL')
sql select tagname from st_tinyint_3
if $data00 != NULL then
return -1
endi
sql create table st_tinyint_4 using mt_tinyint tags ("NULL")
sql select tagname from st_tinyint_4
if $data00 != NULL then
return -1
endi
sql create table st_tinyint_5 using mt_tinyint tags ("NULL")
sql select tagname from st_tinyint_5
if $data00 != NULL then
return -1
return -1
endi
endi
sql_error create table st_tinyint_2 using mt_tinyint tags ('NULL')
sql_error create table st_tinyint_3 using mt_tinyint tags ('NULL')
sql_error create table st_tinyint_4 using mt_tinyint tags ("NULL")
sql_error create table st_tinyint_5 using mt_tinyint tags ("NULL")
sql create table st_tinyint_6 using mt_tinyint tags (-127)
sql create table st_tinyint_6 using mt_tinyint tags (-127)
sql s
elect tagname
from st_tinyint_6
sql s
how tags
from st_tinyint_6
if $data0
0
!= -127 then
if $data0
5
!= -127 then
return -1
return -1
endi
endi
sql create table st_tinyint_7 using mt_tinyint tags (127)
sql create table st_tinyint_7 using mt_tinyint tags (127)
sql s
elect tagname
from st_tinyint_7
sql s
how tags
from st_tinyint_7
if $data0
0
!= 127 then
if $data0
5
!= 127 then
return -1
return -1
endi
endi
sql create table st_tinyint_8 using mt_tinyint tags (37)
sql create table st_tinyint_8 using mt_tinyint tags (37)
sql s
elect tagname
from st_tinyint_8
sql s
how tags
from st_tinyint_8
if $data0
0
!= 37 then
if $data0
5
!= 37 then
return -1
return -1
endi
endi
sql create table st_tinyint_9 using mt_tinyint tags (-100)
sql create table st_tinyint_9 using mt_tinyint tags (-100)
sql s
elect tagname
from st_tinyint_9
sql s
how tags
from st_tinyint_9
if $data0
0
!= -100 then
if $data0
5
!= -100 then
return -1
return -1
endi
endi
sql create table st_tinyint_10 using mt_tinyint tags (+113)
sql create table st_tinyint_10 using mt_tinyint tags (+113)
sql s
elect tagname
from st_tinyint_10
sql s
how tags
from st_tinyint_10
if $data0
0
!= 113 then
if $data0
5
!= 113 then
return -1
return -1
endi
endi
sql create table st_tinyint_11 using mt_tinyint tags ('-100')
sql create table st_tinyint_11 using mt_tinyint tags ('-100')
sql s
elect tagname
from st_tinyint_11
sql s
how tags
from st_tinyint_11
if $data0
0
!= -100 then
if $data0
5
!= -100 then
return -1
return -1
endi
endi
sql create table st_tinyint_12 using mt_tinyint tags ("+78")
sql create table st_tinyint_12 using mt_tinyint tags ("+78")
sql s
elect tagname
from st_tinyint_12
sql s
how tags
from st_tinyint_12
if $data0
0
!= 78 then
if $data0
5
!= 78 then
return -1
return -1
endi
endi
sql create table st_tinyint_13 using mt_tinyint tags (+0078)
sql create table st_tinyint_13 using mt_tinyint tags (+0078)
sql s
elect tagname
from st_tinyint_13
sql s
how tags
from st_tinyint_13
if $data0
0
!= 78 then
if $data0
5
!= 78 then
return -1
return -1
endi
endi
sql create table st_tinyint_14 using mt_tinyint tags (-00078)
sql create table st_tinyint_14 using mt_tinyint tags (-00078)
sql s
elect tagname
from st_tinyint_14
sql s
how tags
from st_tinyint_14
if $data0
0
!= -78 then
if $data0
5
!= -78 then
return -1
return -1
endi
endi
...
@@ -102,38 +96,6 @@ endi
...
@@ -102,38 +96,6 @@ endi
if $data01 != NULL then
if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_tinyint_2 values (now, 'NULL')
sql select * from st_tinyint_2
if $rows != 1 then
return -1
endi
if $data01 != NULL then
return -1
endi
sql insert into st_tinyint_3 values (now, 'NULL')
sql select * from st_tinyint_3
if $rows != 1 then
return -1
endi
if $data01 != NULL then
return -1
endi
sql insert into st_tinyint_4 values (now, "NULL")
sql select * from st_tinyint_4
if $rows != 1 then
return -1
endi
if $data01 != NULL then
return -1
endi
sql insert into st_tinyint_5 values (now, "NULL")
sql select * from st_tinyint_5
if $rows != 1 then
return -1
endi
if $data01 != NULL then
return -1
endi
sql insert into st_tinyint_6 values (now, 127)
sql insert into st_tinyint_6 values (now, 127)
sql select * from st_tinyint_6
sql select * from st_tinyint_6
if $rows != 1 then
if $rows != 1 then
...
@@ -211,8 +173,8 @@ endi
...
@@ -211,8 +173,8 @@ endi
## case 02: dynamic create table for test tag values
## case 02: dynamic create table for test tag values
sql insert into st_tinyint_16 using mt_tinyint tags (NULL) values (now, NULL)
sql insert into st_tinyint_16 using mt_tinyint tags (NULL) values (now, NULL)
sql s
elect tagname
from st_tinyint_16
sql s
how tags
from st_tinyint_16
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_tinyint_16
sql select * from st_tinyint_16
...
@@ -221,8 +183,8 @@ if $data01 != NULL then
...
@@ -221,8 +183,8 @@ if $data01 != NULL then
endi
endi
sql insert into st_tinyint_17 using mt_tinyint tags (NULL) values (now, NULL)
sql insert into st_tinyint_17 using mt_tinyint tags (NULL) values (now, NULL)
sql s
elect tagname
from st_tinyint_17
sql s
how tags
from st_tinyint_17
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_tinyint_17
sql select * from st_tinyint_17
...
@@ -230,8 +192,8 @@ if $data01 != NULL then
...
@@ -230,8 +192,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_tinyint_18 using mt_tinyint tags ('NULL') values (now, 'NULL')
sql insert into st_tinyint_18 using mt_tinyint tags ('NULL') values (now, 'NULL')
sql s
elect tagname
from st_tinyint_18
sql s
how tags
from st_tinyint_18
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_tinyint_18
sql select * from st_tinyint_18
...
@@ -239,8 +201,8 @@ if $data01 != NULL then
...
@@ -239,8 +201,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_tinyint_19 using mt_tinyint tags ('NULL') values (now, 'NULL')
sql insert into st_tinyint_19 using mt_tinyint tags ('NULL') values (now, 'NULL')
sql s
elect tagname
from st_tinyint_19
sql s
how tags
from st_tinyint_19
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_tinyint_19
sql select * from st_tinyint_19
...
@@ -248,8 +210,8 @@ if $data01 != NULL then
...
@@ -248,8 +210,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_tinyint_20 using mt_tinyint tags ("NULL") values (now, "NULL")
sql insert into st_tinyint_20 using mt_tinyint tags ("NULL") values (now, "NULL")
sql s
elect tagname
from st_tinyint_20
sql s
how tags
from st_tinyint_20
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_tinyint_20
sql select * from st_tinyint_20
...
@@ -257,8 +219,8 @@ if $data01 != NULL then
...
@@ -257,8 +219,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_tinyint_21 using mt_tinyint tags ("NULL") values (now, "NULL")
sql insert into st_tinyint_21 using mt_tinyint tags ("NULL") values (now, "NULL")
sql s
elect tagname
from st_tinyint_21
sql s
how tags
from st_tinyint_21
if $data0
0
!= NULL then
if $data0
5
!= NULL then
return -1
return -1
endi
endi
sql select * from st_tinyint_21
sql select * from st_tinyint_21
...
@@ -266,8 +228,8 @@ if $data01 != NULL then
...
@@ -266,8 +228,8 @@ if $data01 != NULL then
return -1
return -1
endi
endi
sql insert into st_tinyint_22 using mt_tinyint tags (127) values (now, 127)
sql insert into st_tinyint_22 using mt_tinyint tags (127) values (now, 127)
sql s
elect tagname
from st_tinyint_22
sql s
how tags
from st_tinyint_22
if $data0
0
!= 127 then
if $data0
5
!= 127 then
return -1
return -1
endi
endi
sql select * from st_tinyint_22
sql select * from st_tinyint_22
...
@@ -275,8 +237,8 @@ if $data01 != 127 then
...
@@ -275,8 +237,8 @@ if $data01 != 127 then
return -1
return -1
endi
endi
sql insert into st_tinyint_23 using mt_tinyint tags (-127) values (now, -127)
sql insert into st_tinyint_23 using mt_tinyint tags (-127) values (now, -127)
sql s
elect tagname
from st_tinyint_23
sql s
how tags
from st_tinyint_23
if $data0
0
!= -127 then
if $data0
5
!= -127 then
return -1
return -1
endi
endi
sql select * from st_tinyint_23
sql select * from st_tinyint_23
...
@@ -284,8 +246,8 @@ if $data01 != -127 then
...
@@ -284,8 +246,8 @@ if $data01 != -127 then
return -1
return -1
endi
endi
sql insert into st_tinyint_24 using mt_tinyint tags (10) values (now, 10)
sql insert into st_tinyint_24 using mt_tinyint tags (10) values (now, 10)
sql s
elect tagname
from st_tinyint_24
sql s
how tags
from st_tinyint_24
if $data0
0
!= 10 then
if $data0
5
!= 10 then
return -1
return -1
endi
endi
sql select * from st_tinyint_24
sql select * from st_tinyint_24
...
@@ -293,8 +255,8 @@ if $data01 != 10 then
...
@@ -293,8 +255,8 @@ if $data01 != 10 then
return -1
return -1
endi
endi
sql insert into st_tinyint_25 using mt_tinyint tags ("-0") values (now, "-0")
sql insert into st_tinyint_25 using mt_tinyint tags ("-0") values (now, "-0")
sql s
elect tagname
from st_tinyint_25
sql s
how tags
from st_tinyint_25
if $data0
0
!= 0 then
if $data0
5
!= 0 then
return -1
return -1
endi
endi
sql select * from st_tinyint_25
sql select * from st_tinyint_25
...
@@ -302,8 +264,8 @@ if $data01 != 0 then
...
@@ -302,8 +264,8 @@ if $data01 != 0 then
return -1
return -1
endi
endi
sql insert into st_tinyint_26 using mt_tinyint tags ('123') values (now, '123')
sql insert into st_tinyint_26 using mt_tinyint tags ('123') values (now, '123')
sql s
elect tagname
from st_tinyint_26
sql s
how tags
from st_tinyint_26
if $data0
0
!= 123 then
if $data0
5
!= 123 then
return -1
return -1
endi
endi
sql select * from st_tinyint_26
sql select * from st_tinyint_26
...
@@ -311,8 +273,8 @@ if $data01 != 123 then
...
@@ -311,8 +273,8 @@ if $data01 != 123 then
return -1
return -1
endi
endi
sql insert into st_tinyint_27 using mt_tinyint tags (+056) values (now, +00056)
sql insert into st_tinyint_27 using mt_tinyint tags (+056) values (now, +00056)
sql s
elect tagname
from st_tinyint_27
sql s
how tags
from st_tinyint_27
if $data0
0
!= 56 then
if $data0
5
!= 56 then
return -1
return -1
endi
endi
sql select * from st_tinyint_27
sql select * from st_tinyint_27
...
@@ -320,8 +282,8 @@ if $data01 != 56 then
...
@@ -320,8 +282,8 @@ if $data01 != 56 then
return -1
return -1
endi
endi
sql insert into st_tinyint_28 using mt_tinyint tags (-056) values (now, -0056)
sql insert into st_tinyint_28 using mt_tinyint tags (-056) values (now, -0056)
sql s
elect tagname
from st_tinyint_28
sql s
how tags
from st_tinyint_28
if $data0
0
!= -56 then
if $data0
5
!= -56 then
return -1
return -1
endi
endi
sql select * from st_tinyint_28
sql select * from st_tinyint_28
...
@@ -331,49 +293,49 @@ endi
...
@@ -331,49 +293,49 @@ endi
## case 03: alter tag values
## case 03: alter tag values
#sql alter table st_tinyint_0 set tag tagname=127
#sql alter table st_tinyint_0 set tag tagname=127
#sql s
elect tagname
from st_tinyint_0
#sql s
how tags
from st_tinyint_0
#if $data0
0
!= 127 then
#if $data0
5
!= 127 then
# return -1
# return -1
#endi
#endi
#sql alter table st_tinyint_0 set tag tagname=-127
#sql alter table st_tinyint_0 set tag tagname=-127
#sql s
elect tagname
from st_tinyint_0
#sql s
how tags
from st_tinyint_0
#if $data0
0
!= -127 then
#if $data0
5
!= -127 then
# return -1
# return -1
#endi
#endi
#sql alter table st_tinyint_0 set tag tagname=+100
#sql alter table st_tinyint_0 set tag tagname=+100
#sql s
elect tagname
from st_tinyint_0
#sql s
how tags
from st_tinyint_0
#if $data0
0
!= 100 then
#if $data0
5
!= 100 then
# return -1
# return -1
#endi
#endi
#sql alter table st_tinyint_0 set tag tagname=-33
#sql alter table st_tinyint_0 set tag tagname=-33
#sql s
elect tagname
from st_tinyint_0
#sql s
how tags
from st_tinyint_0
#if $data0
0
!= -33 then
#if $data0
5
!= -33 then
# return -1
# return -1
#endi
#endi
#sql alter table st_tinyint_0 set tag tagname='+98'
#sql alter table st_tinyint_0 set tag tagname='+98'
#sql s
elect tagname
from st_tinyint_0
#sql s
how tags
from st_tinyint_0
#if $data0
0
!= 98 then
#if $data0
5
!= 98 then
# return -1
# return -1
#endi
#endi
#sql alter table st_tinyint_0 set tag tagname='-076'
#sql alter table st_tinyint_0 set tag tagname='-076'
#sql s
elect tagname
from st_tinyint_0
#sql s
how tags
from st_tinyint_0
#if $data0
0
!= -76 then
#if $data0
5
!= -76 then
# return -1
# return -1
#endi
#endi
#sql alter table st_tinyint_0 set tag tagname=+0012
#sql alter table st_tinyint_0 set tag tagname=+0012
#sql s
elect tagname
from st_tinyint_0
#sql s
how tags
from st_tinyint_0
#if $data0
0
!= 12 then
#if $data0
5
!= 12 then
# return -1
# return -1
#endi
#endi
#sql alter table st_tinyint_0 set tag tagname=-00063
#sql alter table st_tinyint_0 set tag tagname=-00063
#sql s
elect tagname
from st_tinyint_0
#sql s
how tags
from st_tinyint_0
#if $data0
0
!= -63 then
#if $data0
5
!= -63 then
# return -1
# return -1
#endi
#endi
## case 04: illegal input
## case 04: illegal input
sql_error create table st_tinyint_e0 using mt_tinyint tags (128)
sql_error create table st_tinyint_e0 using mt_tinyint tags (128)
sql
_error create table st_tinyint_e0
using mt_tinyint tags (-128)
sql
create table st_tinyint_e0_1
using mt_tinyint tags (-128)
sql_error create table st_tinyint_e0 using mt_tinyint tags (1280)
sql_error create table st_tinyint_e0 using mt_tinyint tags (1280)
sql_error create table st_tinyint_e0 using mt_tinyint tags (-1280)
sql_error create table st_tinyint_e0 using mt_tinyint tags (-1280)
#sql_error create table st_tinyint_e0 using mt_tinyint tags (12.80) truncate integer part
#sql_error create table st_tinyint_e0 using mt_tinyint tags (12.80) truncate integer part
...
@@ -383,7 +345,7 @@ sql_error create table st_tinyint_e0 using mt_tinyint tags ("123abc")
...
@@ -383,7 +345,7 @@ sql_error create table st_tinyint_e0 using mt_tinyint tags ("123abc")
sql_error create table st_tinyint_e0 using mt_tinyint tags (abc)
sql_error create table st_tinyint_e0 using mt_tinyint tags (abc)
sql_error create table st_tinyint_e0 using mt_tinyint tags ("abc")
sql_error create table st_tinyint_e0 using mt_tinyint tags ("abc")
sql_error create table st_tinyint_e0 using mt_tinyint tags (" ")
sql_error create table st_tinyint_e0 using mt_tinyint tags (" ")
sql
_error create table st_tinyint_e0
using mt_tinyint tags ('')
sql
create table st_tinyint_e0_2
using mt_tinyint tags ('')
sql create table st_tinyint_e0 using mt_tinyint tags (123)
sql create table st_tinyint_e0 using mt_tinyint tags (123)
sql create table st_tinyint_e1 using mt_tinyint tags (123)
sql create table st_tinyint_e1 using mt_tinyint tags (123)
...
@@ -400,7 +362,7 @@ sql create table st_tinyint_e11 using mt_tinyint tags (123)
...
@@ -400,7 +362,7 @@ sql create table st_tinyint_e11 using mt_tinyint tags (123)
sql create table st_tinyint_e12 using mt_tinyint tags (123)
sql create table st_tinyint_e12 using mt_tinyint tags (123)
sql_error insert into st_tinyint_e0 values (now, 128)
sql_error insert into st_tinyint_e0 values (now, 128)
sql
_error
insert into st_tinyint_e1 values (now, -128)
sql insert into st_tinyint_e1 values (now, -128)
sql_error insert into st_tinyint_e2 values (now, 1280)
sql_error insert into st_tinyint_e2 values (now, 1280)
sql_error insert into st_tinyint_e3 values (now, -1280)
sql_error insert into st_tinyint_e3 values (now, -1280)
#sql_error insert into st_tinyint_e4 values (now, 12.80)
#sql_error insert into st_tinyint_e4 values (now, 12.80)
...
@@ -410,10 +372,10 @@ sql_error insert into st_tinyint_e7 values (now, "123abc")
...
@@ -410,10 +372,10 @@ sql_error insert into st_tinyint_e7 values (now, "123abc")
sql_error insert into st_tinyint_e9 values (now, abc)
sql_error insert into st_tinyint_e9 values (now, abc)
sql_error insert into st_tinyint_e10 values (now, "abc")
sql_error insert into st_tinyint_e10 values (now, "abc")
sql_error insert into st_tinyint_e11 values (now, " ")
sql_error insert into st_tinyint_e11 values (now, " ")
sql
_error
insert into st_tinyint_e12 values (now, '')
sql insert into st_tinyint_e12 values (now, '')
sql_error insert into st_tinyint_e13 using mt_tinyint tags (033) values (now, 128)
sql_error insert into st_tinyint_e13 using mt_tinyint tags (033) values (now, 128)
sql
_error insert into st_tinyint_e14
using mt_tinyint tags (033) values (now, -128)
sql
insert into st_tinyint_e14_1
using mt_tinyint tags (033) values (now, -128)
sql_error insert into st_tinyint_e15 using mt_tinyint tags (033) values (now, 1280)
sql_error insert into st_tinyint_e15 using mt_tinyint tags (033) values (now, 1280)
sql_error insert into st_tinyint_e16 using mt_tinyint tags (033) values (now, -1280)
sql_error insert into st_tinyint_e16 using mt_tinyint tags (033) values (now, -1280)
#sql_error insert into st_tinyint_e17 using mt_tinyint tags (033) values (now, 12.80)
#sql_error insert into st_tinyint_e17 using mt_tinyint tags (033) values (now, 12.80)
...
@@ -423,10 +385,10 @@ sql_error insert into st_tinyint_e20 using mt_tinyint tags (033) values (now, "1
...
@@ -423,10 +385,10 @@ sql_error insert into st_tinyint_e20 using mt_tinyint tags (033) values (now, "1
sql_error insert into st_tinyint_e22 using mt_tinyint tags (033) values (now, abc)
sql_error insert into st_tinyint_e22 using mt_tinyint tags (033) values (now, abc)
sql_error insert into st_tinyint_e23 using mt_tinyint tags (033) values (now, "abc")
sql_error insert into st_tinyint_e23 using mt_tinyint tags (033) values (now, "abc")
sql_error insert into st_tinyint_e24 using mt_tinyint tags (033) values (now, " ")
sql_error insert into st_tinyint_e24 using mt_tinyint tags (033) values (now, " ")
sql
_error insert into st_tinyint_e25
using mt_tinyint tags (033) values (now, '')
sql
insert into st_tinyint_e25_2
using mt_tinyint tags (033) values (now, '')
sql_error insert into st_tinyint_e13 using mt_tinyint tags (128) values (now, -033)
sql_error insert into st_tinyint_e13 using mt_tinyint tags (128) values (now, -033)
sql
_error
insert into st_tinyint_e14 using mt_tinyint tags (-128) values (now, -033)
sql insert into st_tinyint_e14 using mt_tinyint tags (-128) values (now, -033)
sql_error insert into st_tinyint_e15 using mt_tinyint tags (1280) values (now, -033)
sql_error insert into st_tinyint_e15 using mt_tinyint tags (1280) values (now, -033)
sql_error insert into st_tinyint_e16 using mt_tinyint tags (-1280) values (now, -033)
sql_error insert into st_tinyint_e16 using mt_tinyint tags (-1280) values (now, -033)
#sql_error insert into st_tinyint_e17 using mt_tinyint tags (12.80) values (now, -033)
#sql_error insert into st_tinyint_e17 using mt_tinyint tags (12.80) values (now, -033)
...
@@ -436,7 +398,7 @@ sql_error insert into st_tinyint_e20 using mt_tinyint tags ("123abc") values (no
...
@@ -436,7 +398,7 @@ sql_error insert into st_tinyint_e20 using mt_tinyint tags ("123abc") values (no
sql_error insert into st_tinyint_e22 using mt_tinyint tags (abc) values (now, -033)
sql_error insert into st_tinyint_e22 using mt_tinyint tags (abc) values (now, -033)
sql_error insert into st_tinyint_e23 using mt_tinyint tags ("abc") values (now, -033)
sql_error insert into st_tinyint_e23 using mt_tinyint tags ("abc") values (now, -033)
sql_error insert into st_tinyint_e24 using mt_tinyint tags (" ") values (now, -033)
sql_error insert into st_tinyint_e24 using mt_tinyint tags (" ") values (now, -033)
sql
_error
insert into st_tinyint_e25 using mt_tinyint tags ('') values (now, -033)
sql insert into st_tinyint_e25 using mt_tinyint tags ('') values (now, -033)
sql insert into st_tinyint_e13 using mt_tinyint tags (033) values (now, 00062)
sql insert into st_tinyint_e13 using mt_tinyint tags (033) values (now, 00062)
sql insert into st_tinyint_e14 using mt_tinyint tags (033) values (now, 00062)
sql insert into st_tinyint_e14 using mt_tinyint tags (033) values (now, 00062)
...
@@ -453,7 +415,7 @@ sql insert into st_tinyint_e24 using mt_tinyint tags (033) values (now, 00062)
...
@@ -453,7 +415,7 @@ sql insert into st_tinyint_e24 using mt_tinyint tags (033) values (now, 00062)
sql insert into st_tinyint_e25 using mt_tinyint tags (033) values (now, 00062)
sql insert into st_tinyint_e25 using mt_tinyint tags (033) values (now, 00062)
sql_error alter table st_tinyint_e13 set tag tagname=128
sql_error alter table st_tinyint_e13 set tag tagname=128
sql
_error
alter table st_tinyint_e14 set tag tagname=-128
sql alter table st_tinyint_e14 set tag tagname=-128
sql_error alter table st_tinyint_e15 set tag tagname=1280
sql_error alter table st_tinyint_e15 set tag tagname=1280
sql_error alter table st_tinyint_e16 set tag tagname=-1280
sql_error alter table st_tinyint_e16 set tag tagname=-1280
sql_error alter table st_tinyint_e19 set tag tagname=123abc
sql_error alter table st_tinyint_e19 set tag tagname=123abc
...
@@ -461,4 +423,4 @@ sql_error alter table st_tinyint_e20 set tag tagname="123abc"
...
@@ -461,4 +423,4 @@ sql_error alter table st_tinyint_e20 set tag tagname="123abc"
sql_error alter table st_tinyint_e22 set tag tagname=abc
sql_error alter table st_tinyint_e22 set tag tagname=abc
sql_error alter table st_tinyint_e23 set tag tagname="abc"
sql_error alter table st_tinyint_e23 set tag tagname="abc"
sql_error alter table st_tinyint_e24 set tag tagname=" "
sql_error alter table st_tinyint_e24 set tag tagname=" "
sql
_error
alter table st_tinyint_e25 set tag tagname=''
sql alter table st_tinyint_e25 set tag tagname=''
tests/script/tsim/parser/columnValue_unsign.sim
浏览文件 @
81d42419
sql create database if not exists db
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sql connect
print ========== columnValues.sim
sql drop database if exists db
sql create database db
sql use db
sql use db
sql drop table if exists mt_unsigned;
sql drop table if exists mt_unsigned;
...
@@ -10,28 +18,21 @@ sql alter table mt_unsigned_1 set tag t1=138;
...
@@ -10,28 +18,21 @@ sql alter table mt_unsigned_1 set tag t1=138;
sql alter table mt_unsigned_1 set tag t2=32769;
sql alter table mt_unsigned_1 set tag t2=32769;
sql alter table mt_unsigned_1 set tag t3=294967295;
sql alter table mt_unsigned_1 set tag t3=294967295;
sql alter table mt_unsigned_1 set tag t4=446744073709551615;
sql alter table mt_unsigned_1 set tag t4=446744073709551615;
sql insert into mt_unsigned_1 values (now, 0, 0, 0, 0, 0, 0, 0, 0, 0)
sql select t1,t2,t3,t4 from mt_unsigned_1
sql select t1,t2,t3,t4 from mt_unsigned_1
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
print $data01, $data02, $data03
print $data00, $data01, $data02, $data03
if $data00 != 138 then
print expect 138, actual: $data00
return -1
endi
if $data01 != 32769 then
if $data01 != 32769 then
return -1
return -1
endi
endi
if $data02 != 294967295 then
if $data02 != 294967295 then
return -1
return -1
endi
endi
if $data03 != 446744073709551615 then
if $data03 != 446744073709551615 then
return -1
return -1
endi
endi
sql_error sql alter table mt_unsigned_1 set tag t1 = 999;
sql_error sql alter table mt_unsigned_1 set tag t1 = 999;
...
@@ -44,10 +45,10 @@ sql_error create table mt_unsigned_3 using mt_unsigned tags(0, -1, 0, 0, 0, 0, 0
...
@@ -44,10 +45,10 @@ sql_error create table mt_unsigned_3 using mt_unsigned tags(0, -1, 0, 0, 0, 0, 0
sql_error create table mt_unsigned_4 using mt_unsigned tags(0, 0, -1, 0, 0, 0, 0, 0);
sql_error create table mt_unsigned_4 using mt_unsigned tags(0, 0, -1, 0, 0, 0, 0, 0);
sql_error create table mt_unsigned_5 using mt_unsigned tags(0, 0, 0, -1, 0, 0, 0, 0);
sql_error create table mt_unsigned_5 using mt_unsigned tags(0, 0, 0, -1, 0, 0, 0, 0);
sql
_error create table mt_unsigned_2
using mt_unsigned tags(255, 0, 0, 0, 0, 0, 0, 0);
sql
create table mt_unsigned_21
using mt_unsigned tags(255, 0, 0, 0, 0, 0, 0, 0);
sql
_error create table mt_unsigned_3
using mt_unsigned tags(0, 65535, 0, 0, 0, 0, 0, 0);
sql
create table mt_unsigned_31
using mt_unsigned tags(0, 65535, 0, 0, 0, 0, 0, 0);
sql
_error create table mt_unsigned_4
using mt_unsigned tags(0, 0, 4294967295, 0, 0, 0, 0, 0);
sql
create table mt_unsigned_41
using mt_unsigned tags(0, 0, 4294967295, 0, 0, 0, 0, 0);
sql
_error create table mt_unsigned_5
using mt_unsigned tags(0, 0, 0, 18446744073709551615, 0, 0, 0, 0);
sql
create table mt_unsigned_51
using mt_unsigned tags(0, 0, 0, 18446744073709551615, 0, 0, 0, 0);
sql_error create table mt_unsigned_2 using mt_unsigned tags(999, 0, 0, 0, 0, 0, 0, 0);
sql_error create table mt_unsigned_2 using mt_unsigned tags(999, 0, 0, 0, 0, 0, 0, 0);
sql_error create table mt_unsigned_3 using mt_unsigned tags(0, 95535, 0, 0, 0, 0, 0, 0);
sql_error create table mt_unsigned_3 using mt_unsigned tags(0, 95535, 0, 0, 0, 0, 0, 0);
...
@@ -63,11 +64,6 @@ if $rows != 1 then
...
@@ -63,11 +64,6 @@ if $rows != 1 then
return -1;
return -1;
endi
endi
if $data00 != NULL then
print expect NULL, actual: $data00
return -1
endi
if $data01 != NULL then
if $data01 != NULL then
return -1
return -1
endi
endi
...
@@ -87,82 +83,44 @@ sql_error insert into mt_unsigned_1 values(now, -1, NULL, NULL, NULL, NULL, NULL
...
@@ -87,82 +83,44 @@ sql_error insert into mt_unsigned_1 values(now, -1, NULL, NULL, NULL, NULL, NULL
sql_error insert into mt_unsigned_1 values(now, NULL, -1, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
sql_error insert into mt_unsigned_1 values(now, NULL, -1, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
sql_error insert into mt_unsigned_1 values(now, NULL, NULL, -1, NULL, NULL, NULL, NULL, NULL, NULL);
sql_error insert into mt_unsigned_1 values(now, NULL, NULL, -1, NULL, NULL, NULL, NULL, NULL, NULL);
sql_error insert into mt_unsigned_1 values(now, NULL, NULL, NULL, -1, NULL, NULL, NULL, NULL, NULL);
sql_error insert into mt_unsigned_1 values(now, NULL, NULL, NULL, -1, NULL, NULL, NULL, NULL, NULL);
sql_error insert into mt_unsigned_1 values(now, 255, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
sql insert into mt_unsigned_1 values(now, 255, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
sql_error insert into mt_unsigned_1 values(now, NULL, 65535, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
sql insert into mt_unsigned_1 values(now, NULL, 65535, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
sql_error insert into mt_unsigned_1 values(now, NULL, NULL, 4294967295, NULL, NULL, NULL, NULL, NULL, NULL);
sql insert into mt_unsigned_1 values(now, NULL, NULL, 4294967295, NULL, NULL, NULL, NULL, NULL, NULL);
sql_error insert into mt_unsigned_1 values(now, NULL, NULL, NULL, 18446744073709551615, NULL, NULL, NULL, NULL, NULL);
sql insert into mt_unsigned_1 values(now, NULL, NULL, NULL, 18446744073709551615, NULL, NULL, NULL, NULL, NULL);
sql select count(a),count(b),count(c),count(d), count(e) from mt_unsigned_1
sql select count(a),count(b),count(c),count(d), count(e) from mt_unsigned_1
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data00 != 1 then
if $data01 != 3 then
return -1
endi
if $data01 != 1 then
return -1
return -1
endi
endi
sql select a+b+c from mt_unsigned_1 where a is null;
sql select a+b+c from mt_unsigned_1 where a is null;
if $rows != 1 then
if $rows != 4 then
return -1
endi
if $data00 != NULL then
print expect NULL, actual:$data00
return -1
return -1
endi
endi
sql select count(*), a from mt_unsigned_1 group by a;
sql select count(*), a from mt_unsigned_1 group by a;
if $rows != 1 then
if $rows != 4 then
return -1
endi
if $data00 != 1 then
return -1
endi
if $data01 != 1 then
return -1
return -1
endi
endi
sql select count(*), b from mt_unsigned_1 group by b;
sql select count(*), b from mt_unsigned_1 group by b;
if $rows !=
1
then
if $rows !=
4
then
return -1
return -1
endi
endi
if $data00 != 1 then
return -1
endi
if $data01 != 2 then
return -1
endi
sql select count(*), c from mt_unsigned_1 group by c;
sql select count(*), c from mt_unsigned_1 group by c;
if $rows !=
1
then
if $rows !=
4
then
return -1
return -1
endi
endi
if $data00 != 1 then
return -1
endi
if $data01 != 3 then
return -1
endi
sql select count(*), d from mt_unsigned_1 group by d;
sql select count(*), d from mt_unsigned_1 group by d;
if $rows != 1 then
if $rows != 4 then
return -1
endi
if $data00 != 1 then
return -1
endi
if $data01 != 4 then
return -1
return -1
endi
endi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录