fix test cases
This commit is contained in:
parent
593fdce02e
commit
3d4807fbe9
|
@ -95,7 +95,7 @@ sql_error alter table db.stb add tag t1 int
|
|||
sql_error alter table db.stb add tag t2 int
|
||||
sql_error alter table db.stb add tag t3 int
|
||||
sql alter table db.stb add tag t4 bigint
|
||||
sql alter table db.stb add tag c1 int
|
||||
sql alter table db.stb add tag c1 int
|
||||
sql alter table db.stb add tag t5 binary(12)
|
||||
|
||||
sql select * from information_schema.ins_stables where db_name = 'db'
|
||||
|
|
|
@ -5,8 +5,8 @@ print ========= start dnode1 as master
|
|||
system sh/exec.sh -n dnode1 -s start
|
||||
sql connect
|
||||
|
||||
print ======== step1
|
||||
sql create database d1 replica 1 duration 7 keep 50
|
||||
print ======== step1
|
||||
sql create database d1 replica 1 duration 7 keep 50
|
||||
sql use d1
|
||||
sql create table tb (ts timestamp, a int)
|
||||
sql insert into tb values(now-28d, -28)
|
||||
|
@ -83,7 +83,7 @@ if $data00 != 3 then
|
|||
endi
|
||||
|
||||
print ======== step8
|
||||
# sql alter table tb(ts timestamp, a int, b smallint, c tinyint, d int, e bigint, f float, g double, h binary(10) )
|
||||
# sql alter table tb(ts timestamp, a int, b smallint, c tinyint, d int, e bigint, f float, g double, h binary(10) )
|
||||
sql alter table tb add column h binary(10)
|
||||
sql insert into tb values(now-7d, -7, 18, 0, 0, 0, 0, 0, '0')
|
||||
sql insert into tb values(now-6d, -6, 19, 1, 1, 1, 1, 1, '1')
|
||||
|
@ -260,4 +260,4 @@ if $data00 != 31 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -5,7 +5,7 @@ print ========= start dnode1 as master
|
|||
system sh/exec.sh -n dnode1 -s start
|
||||
sql connect
|
||||
|
||||
print ======== step1
|
||||
print ======== step1
|
||||
sql create database d1 replica 1 duration 7 keep 50
|
||||
sql use d1
|
||||
sql create table tb (ts timestamp, a int)
|
||||
|
@ -42,4 +42,4 @@ if $data00 != 6 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -3,7 +3,7 @@ system sh/deploy.sh -n dnode1 -i 1
|
|||
system sh/exec.sh -n dnode1 -s start
|
||||
sql connect
|
||||
|
||||
print ======== step1
|
||||
print ======== step1
|
||||
sql create database d3
|
||||
sql use d3
|
||||
sql create table tb (ts timestamp, a int)
|
||||
|
@ -1137,4 +1137,4 @@ if $data79 != null then
|
|||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -3,7 +3,7 @@ system sh/deploy.sh -n dnode1 -i 1
|
|||
system sh/exec.sh -n dnode1 -s start
|
||||
sql connect
|
||||
|
||||
print ======== step1
|
||||
print ======== step1
|
||||
sql create database d4
|
||||
sql use d4
|
||||
sql create table tb (ts timestamp, a int, b smallint, c tinyint, d int, e bigint, f float, g double, h binary(10))
|
||||
|
@ -662,4 +662,4 @@ if $data62 != null then
|
|||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -3,7 +3,7 @@ system sh/deploy.sh -n dnode1 -i 1
|
|||
system sh/exec.sh -n dnode1 -s start
|
||||
sql connect
|
||||
|
||||
print ======== step1
|
||||
print ======== step1
|
||||
sql create database d2
|
||||
sql use d2
|
||||
sql create table mt (ts timestamp, a int) TAGS (t int)
|
||||
|
@ -757,8 +757,8 @@ endi
|
|||
print ======= over
|
||||
sql drop database d2
|
||||
sql select * from information_schema.ins_databases
|
||||
if $rows != 2 then
|
||||
if $rows != 2 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -116,7 +116,7 @@ if $data[0][1] != 1 then
|
|||
endi
|
||||
if $data[0][2] != 2 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
if $data[0][3] != NULL then
|
||||
return -1
|
||||
endi
|
||||
|
@ -153,7 +153,7 @@ if $data[0][1] != 1 then
|
|||
endi
|
||||
if $data[0][2] != 2 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
if $data[0][3] != NULL then
|
||||
return -1
|
||||
endi
|
||||
|
@ -299,4 +299,4 @@ if $rows != 10 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -31,7 +31,7 @@ if $data[0][1] != 1 then
|
|||
endi
|
||||
if $data[0][2] != 1234 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
if $data[0][3] != 101 then
|
||||
return -1
|
||||
endi
|
||||
|
@ -92,7 +92,7 @@ if $data[0][1] != 1 then
|
|||
endi
|
||||
if $data[0][2] != 1234 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
if $data[0][3] != 101 then
|
||||
return -1
|
||||
endi
|
||||
|
@ -106,4 +106,4 @@ if $data[1][3] != 101 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -188,4 +188,4 @@ if $rows != 2 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -123,4 +123,4 @@ if $rows != 2 then
|
|||
endi
|
||||
|
||||
print =============== step6
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -139,7 +139,7 @@ if $data[0][1] != 1 then
|
|||
endi
|
||||
if $data[0][2] != 2 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
if $data[0][3] != 101 then
|
||||
return -1
|
||||
endi
|
||||
|
@ -170,7 +170,7 @@ if $data[0][1] != 1 then
|
|||
endi
|
||||
if $data[0][2] != 2 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
if $data[0][3] != 101 then
|
||||
return -1
|
||||
endi
|
||||
|
@ -190,4 +190,4 @@ if $rows != 7 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -165,7 +165,7 @@ if $data[0][1] != 1 then
|
|||
endi
|
||||
if $data[0][2] != 2 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
if $data[0][3] != 101 then
|
||||
return -1
|
||||
endi
|
||||
|
@ -196,7 +196,7 @@ if $data[0][1] != 1 then
|
|||
endi
|
||||
if $data[0][2] != 2 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
if $data[0][3] != 201 then
|
||||
return -1
|
||||
endi
|
||||
|
@ -229,7 +229,7 @@ if $data[0][1] != 1 then
|
|||
endi
|
||||
if $data[0][2] != 2 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
if $data[0][3] != 201 then
|
||||
return -1
|
||||
endi
|
||||
|
@ -261,7 +261,7 @@ if $data[0][1] != 1 then
|
|||
endi
|
||||
if $data[0][2] != 2 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
if $data[0][3] != 301 then
|
||||
return -1
|
||||
endi
|
||||
|
@ -323,7 +323,7 @@ if $data[0][1] != 1 then
|
|||
endi
|
||||
if $data[0][2] != 2 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
if $data[0][3] != 302 then
|
||||
return -1
|
||||
endi
|
||||
|
@ -334,4 +334,4 @@ if $data[0][5] != 304 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -27,47 +27,47 @@ sql create table db.ctb6 using db.stb tags(6, "102")
|
|||
sql insert into db.ctb6 values(now, 6, "2")
|
||||
|
||||
sql select * from db.stb where t1 = 1
|
||||
if $rows != 1 then
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select * from db.stb where t1 < 1
|
||||
if $rows != 0 then
|
||||
sql select * from db.stb where t1 < 1
|
||||
if $rows != 0 then
|
||||
return -=1
|
||||
endi
|
||||
|
||||
sql select * from db.stb where t1 < 2
|
||||
if $rows != 1 then
|
||||
sql select * from db.stb where t1 < 2
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select * from db.stb where t1 <= 2
|
||||
if $rows != 2 then
|
||||
sql select * from db.stb where t1 <= 2
|
||||
if $rows != 2 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select * from db.stb where t1 >= 1
|
||||
if $rows != 6 then
|
||||
sql select * from db.stb where t1 >= 1
|
||||
if $rows != 6 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select * from db.stb where t1 > 1
|
||||
if $rows != 5 then
|
||||
sql select * from db.stb where t1 > 1
|
||||
if $rows != 5 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select * from db.stb where t1 between 1 and 1
|
||||
if $rows != 1 then
|
||||
sql select * from db.stb where t1 between 1 and 1
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select * from db.stb where t1 between 1 and 6
|
||||
if $rows != 6 then
|
||||
sql select * from db.stb where t1 between 1 and 6
|
||||
if $rows != 6 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql select * from db.stb where t1 between 1 and 7
|
||||
if $rows != 6 then
|
||||
sql select * from db.stb where t1 between 1 and 7
|
||||
if $rows != 6 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -88,25 +88,25 @@ sql insert into db.ctbBin2 values(now, 3, "2")
|
|||
sql create table db.ctbBin3 using db.stbBin tags("d")
|
||||
sql insert into db.ctbBin3 values(now, 4, "2")
|
||||
|
||||
sql select * from db.stbBin where t1 = "a"
|
||||
if $rows != 1 then
|
||||
sql select * from db.stbBin where t1 = "a"
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
||||
sql select * from db.stbBin where t1 < "a"
|
||||
if $rows != 0 then
|
||||
sql select * from db.stbBin where t1 < "a"
|
||||
if $rows != 0 then
|
||||
return -=1
|
||||
endi
|
||||
|
||||
sql select * from db.stbBin where t1 < "b"
|
||||
if $rows != 1 then
|
||||
sql select * from db.stbBin where t1 < "b"
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
||||
sql select * from db.stbBin where t1 between "a" and "e"
|
||||
if $rows != 4 then
|
||||
sql select * from db.stbBin where t1 between "a" and "e"
|
||||
if $rows != 4 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -127,25 +127,25 @@ sql insert into db.ctbNc2 values(now, 3, "2")
|
|||
sql create table db.ctbNc3 using db.stbNc tags("d")
|
||||
sql insert into db.ctbNc3 values(now, 4, "2")
|
||||
|
||||
sql select * from db.stbNc where t1 = "a"
|
||||
if $rows != 1 then
|
||||
sql select * from db.stbNc where t1 = "a"
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
||||
sql select * from db.stbNc where t1 < "a"
|
||||
if $rows != 0 then
|
||||
sql select * from db.stbNc where t1 < "a"
|
||||
if $rows != 0 then
|
||||
return -=1
|
||||
endi
|
||||
|
||||
sql select * from db.stbNc where t1 < "b"
|
||||
if $rows != 1 then
|
||||
sql select * from db.stbNc where t1 < "b"
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
||||
sql select * from db.stbNc where t1 between "a" and "e"
|
||||
if $rows != 4 then
|
||||
sql select * from db.stbNc where t1 between "a" and "e"
|
||||
if $rows != 4 then
|
||||
return -1
|
||||
endi
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -28,7 +28,7 @@ if $data[0][1] != 1 then
|
|||
endi
|
||||
if $data[0][2] != 1234 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
if $data[0][3] != 101 then
|
||||
return -1
|
||||
endi
|
||||
|
@ -55,7 +55,7 @@ if $data[0][1] != 1 then
|
|||
endi
|
||||
if $data[0][2] != 1234 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
if $data[0][3] != 101 then
|
||||
return -1
|
||||
endi
|
||||
|
@ -120,4 +120,4 @@ if $data[4][2] != 5 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
|
@ -28,7 +28,7 @@ if $data[0][1] != 1 then
|
|||
endi
|
||||
if $data[0][2] != 1234 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
if $data[0][3] != 101 then
|
||||
return -1
|
||||
endi
|
||||
|
@ -52,7 +52,7 @@ if $data[0][1] != 1 then
|
|||
endi
|
||||
if $data[0][2] != 1234 then
|
||||
return -1
|
||||
endi
|
||||
endi
|
||||
if $data[0][3] != 101 then
|
||||
return -1
|
||||
endi
|
||||
|
@ -117,4 +117,4 @@ if $data[4][2] != 4 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
Loading…
Reference in New Issue