提交 13230df9 编写于 作者: S Shengliang Guan

test: restore some 2.0 case

上级 bfb2900c
......@@ -103,34 +103,33 @@
./test.sh -f tsim/show/basic.sim
# ---- table
# ./test.sh -f tsim/table/autocreate.sim
./test.sh -f tsim/table/autocreate.sim
./test.sh -f tsim/table/basic1.sim
# ./test.sh -f tsim/table/basic2.sim
# ./test.sh -f tsim/table/basic3.sim
# ./test.sh -f tsim/table/bigint.sim
# ./test.sh -f tsim/table/binary.sim
# ./test.sh -f tsim/table/bool.sim
# ./test.sh -f tsim/table/column_name.sim
# ./test.sh -f tsim/table/column_num.sim
# ./test.sh -f tsim/table/column_value.sim
# ./test.sh -f tsim/table/column2.sim
# ./test.sh -f tsim/table/createmulti.sim
# ./test.sh -f tsim/table/date.sim
# ./test.sh -f tsim/table/db.table.sim
./test.sh -f tsim/table/basic2.sim
./test.sh -f tsim/table/basic3.sim
./test.sh -f tsim/table/bigint.sim
./test.sh -f tsim/table/binary.sim
./test.sh -f tsim/table/bool.sim
./test.sh -f tsim/table/column_name.sim
./test.sh -f tsim/table/column_num.sim
./test.sh -f tsim/table/column_value.sim
./test.sh -f tsim/table/column2.sim
./test.sh -f tsim/table/createmulti.sim
./test.sh -f tsim/table/date.sim
./test.sh -f tsim/table/db.table.sim
# ./test.sh -f tsim/table/delete_reuse1.sim
# ./test.sh -f tsim/table/delete_reuse2.sim
# ./test.sh -f tsim/table/delete_writing.sim
# ./test.sh -f tsim/table/describe.sim
# ./test.sh -f tsim/table/double.sim
# ./test.sh -f tsim/table/fill.sim
# ./test.sh -f tsim/table/float.sim
# ./test.sh -f tsim/table/int.sim
# ./test.sh -f tsim/table/limit.sim
# ./test.sh -f tsim/table/smallint.sim
# ./test.sh -f tsim/table/table_len.sim
# ./test.sh -f tsim/table/table.sim
# ./test.sh -f tsim/table/tinyint.sim
# ./test.sh -f tsim/table/vgroup.sim
./test.sh -f tsim/table/describe.sim
./test.sh -f tsim/table/double.sim
./test.sh -f tsim/table/float.sim
./test.sh -f tsim/table/int.sim
./test.sh -f tsim/table/limit.sim
./test.sh -f tsim/table/smallint.sim
./test.sh -f tsim/table/table_len.sim
./test.sh -f tsim/table/table.sim
./test.sh -f tsim/table/tinyint.sim
./test.sh -f tsim/table/vgroup.sim
# ---- stream
./test.sh -f tsim/stream/basic0.sim
......
......@@ -6,7 +6,7 @@ sql connect
print =============== create database
sql create database db
sql show databases
if $rows != 1 then
if $rows != 3 then
return -1
endi
......
......@@ -213,23 +213,6 @@ endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
print =============== query data
sql select * from c1
print rows: $rows
......
......@@ -20,11 +20,11 @@ endi
print =============== show
sql show databases
if $data02 != 2 then
if $data22 != 2 then
return -1
endi
if $data03 != 1 then
if $data24 != 1 then
return -1
endi
......@@ -33,7 +33,7 @@ if $data00 != 2 then
return -1
endi
if $data01 != 2 then
if $data01 != d1 then
return -1
endi
......
......@@ -6,7 +6,7 @@ sql connect
print =============== create database
sql create database db
sql show databases
if $rows != 1 then
if $rows != 3 then
return -1
endi
......@@ -72,7 +72,7 @@ endi
print =============== drop stable
sql drop table db.st
sql show db.stables
if $rows != 2 then
if $rows != 0 then
return -1
endi
......
......@@ -6,7 +6,7 @@ sql connect
print =============== create database
sql create database db
sql show databases
if $rows != 1 then
if $rows != 3 then
return -1
endi
......
......@@ -24,18 +24,18 @@ if $data00 != @17-01-01 08:00:00.001@ then
endi
print =============== step2
sql insert into $tb values ('2017-08-28 00:23:46.429+ 1a', 2)
#sql insert into $tb values ('2017-08-28 00:23:46cd .429', 2)
sql_error insert into $tb values ('2017-08-28 00:23:46.429+ 1a', 2)
sql_error insert into $tb values ('2017-08-28 00:23:46cd .429', 2)
sql select ts from $tb
if $rows != 2 then
if $rows != 1 then
return -1
endi
print =============== step3
#sql insert into $tb values ('1970-01-01 08:00:00.000', 3)
#sql insert into $tb values ('1970-01-01 08:00:00.000', 3)
sql_error insert into $tb values ('1970-01-01 08:00:00.000', 3)
sql_error insert into $tb values ('1970-01-01 08:00:00.000', 3)
sql select ts from $tb
if $rows != 2 then
if $rows != 1 then
return -1
endi
......@@ -54,7 +54,7 @@ print =============== step5
sql_error insert into $tb values ('9999-12-31 213:59:59.999', 13)
sql select ts from $tb
print $rows
if $rows != 8 then
if $rows != 7 then
return -1
endi
......@@ -62,7 +62,7 @@ print =============== step6
sql_error insert into $tb values ('9999-12-99 23:59:59.999', 13)
sql select ts from $tb
if $rows != 8 then
if $rows != 7 then
return -1
endi
......
......@@ -24,12 +24,10 @@ if $data01 != NULL then
endi
print =============== step2
sql insert into $tb values (now+1m, -2147483648) -x step2
return -1
step2:
sql insert into $tb values (now+1m, NULL)
sql insert into $tb values (now+1m, -2147483648)
sql insert into $tb values (now+2m, NULL)
sql select * from $tb order by ts desc
if $rows != 2 then
if $rows != 3 then
return -1
endi
if $data01 != NULL then
......@@ -37,9 +35,9 @@ if $data01 != NULL then
endi
print =============== step3
sql insert into $tb values (now+2m, 2147483647)
sql insert into $tb values (now+3m, 2147483647)
sql select * from $tb order by ts desc
if $rows != 3 then
if $rows != 4 then
return -1
endi
if $data01 != 2147483647 then
......@@ -47,12 +45,10 @@ if $data01 != 2147483647 then
endi
print =============== step4
sql insert into $tb values (now+3m, 2147483648) -x step4
return -1
step4:
sql insert into $tb values (now+3m, NULL)
sql_error insert into $tb values (now+4m, 2147483648)
sql insert into $tb values (now+5m, NULL)
sql select * from $tb order by ts desc
if $rows != 4 then
if $rows != 5 then
return -1
endi
if $data01 != NULL then
......@@ -60,10 +56,10 @@ if $data01 != NULL then
endi
print =============== step5
sql_error insert into $tb values (now+4m, a2)
sql insert into $tb values (now+4m, 0)
sql_error insert into $tb values (now+6m, a2)
sql insert into $tb values (now+7m, 0)
sql select * from $tb order by ts desc
if $rows != 5 then
if $rows != 6 then
return -1
endi
if $data01 != 0 then
......@@ -71,10 +67,10 @@ if $data01 != 0 then
endi
print =============== step6
sql_error insert into $tb values (now+5m, 2a)
sql insert into $tb values (now+5m, 2)
sql_error insert into $tb values (now+8m, 2a)
sql insert into $tb values (now+9m, 2)
sql select * from $tb order by ts desc
if $rows != 6 then
if $rows != 7 then
return -1
endi
if $data01 != 2 then
......@@ -82,10 +78,10 @@ if $data01 != 2 then
endi
print =============== step7
sql_error insert into $tb values (now+6m, 2a'1)
sql insert into $tb values (now+6m, 2)
sql_error insert into $tb values (now+10m, 2a'1)
sql insert into $tb values (now+11m, 2)
sql select * from $tb order by ts desc
if $rows != 7 then
if $rows != 8 then
return -1
endi
if $data01 != 2 then
......@@ -93,9 +89,9 @@ if $data01 != 2 then
endi
print =============== step8
sql insert into $tb values (now+8m, "NULL")
sql insert into $tb values (now+12m, "NULL")
sql select * from $tb order by ts desc
if $rows != 8 then
if $rows != 9 then
return -1
endi
if $data01 != NULL then
......@@ -103,9 +99,9 @@ if $data01 != NULL then
endi
print =============== step9
sql insert into $tb values (now+9m, 'NULL')
sql insert into $tb values (now+13m, 'NULL')
sql select * from $tb order by ts desc
if $rows != 9 then
if $rows != 10 then
return -1
endi
if $data01 != NULL then
......@@ -113,9 +109,9 @@ if $data01 != NULL then
endi
print =============== step10
sql insert into $tb values (now+10m, -123)
sql insert into $tb values (now+14m, -123)
sql select * from $tb order by ts desc
if $rows != 10 then
if $rows != 11 then
return -1
endi
if $data01 != -123 then
......
......@@ -12,10 +12,10 @@ $db = $dbPrefix . $i
$tb = $tbPrefix . $i
print =================== step 0
sql create database $db
sql create database $db vgroups 8
sql use $db
sql show vgroups
if $rows != 0 then
if $rows != 8 then
return -1
endi
......
......@@ -25,12 +25,10 @@ if $data01 != NULL then
endi
print =============== step2
sql insert into $tb values (now+1m, -32768) -x step2
return -1
step2:
sql insert into $tb values (now+1m, NULL)
sql insert into $tb values (now+1m, -32768)
sql insert into $tb values (now+2m, NULL)
sql select * from $tb order by ts desc
if $rows != 2 then
if $rows != 3 then
return -1
endi
if $data01 != NULL then
......@@ -38,9 +36,9 @@ if $data01 != NULL then
endi
print =============== step3
sql insert into $tb values (now+2m, 32767)
sql insert into $tb values (now+3m, 32767)
sql select * from $tb order by ts desc
if $rows != 3 then
if $rows != 4 then
return -1
endi
if $data01 != 32767 then
......@@ -48,12 +46,12 @@ if $data01 != 32767 then
endi
print =============== step4
sql insert into $tb values (now+3m, 32768) -x step4
sql insert into $tb values (now+4m, 32768) -x step4
return -1
step4:
sql insert into $tb values (now+3m, NULL)
sql insert into $tb values (now+5m, NULL)
sql select * from $tb order by ts desc
if $rows != 4 then
if $rows != 5 then
return -1
endi
if $data01 != NULL then
......@@ -61,10 +59,10 @@ if $data01 != NULL then
endi
print =============== step5
sql_error insert into $tb values (now+4m, a2)
sql insert into $tb values (now+4m, 0)
sql_error insert into $tb values (now+6m, a2)
sql insert into $tb values (now+7m, 0)
sql select * from $tb order by ts desc
if $rows != 5 then
if $rows != 6 then
return -1
endi
if $data01 != 0 then
......@@ -72,10 +70,10 @@ if $data01 != 0 then
endi
print =============== step6
sql_error insert into $tb values (now+5m, 2a)
sql insert into $tb values (now+5m, 2)
sql_error insert into $tb values (now+8m, 2a)
sql insert into $tb values (now+9m, 2)
sql select * from $tb order by ts desc
if $rows != 6 then
if $rows != 7 then
return -1
endi
if $data01 != 2 then
......@@ -83,16 +81,16 @@ if $data01 != 2 then
endi
print =============== step7
sql_error insert into $tb values (now+6m, 2a'1)
sql insert into $tb values (now+6m, 2)
sql_error insert into $tb values (now+10m, 2a'1)
sql insert into $tb values (now+11m, 2)
sql select * from $tb order by ts desc
if $rows != 7 then
if $rows != 8 then
return -1
endi
if $data01 != 2 then
return -1
endi
return
sql drop database $db
sql show databases
if $rows != 2 then
......
......@@ -197,16 +197,15 @@ if $data01 != 7 then
endi
print =============== step10
$i = 1
$tb = $tbPrefix . $i
sql create table $tb (ts timestamp, val tinyint, val2 tinyint)
sql_error create table $tb (ts timestamp, val tinyint, val2 tinyint)
sql show tables
if $rows != 7 then
return -1
endi
print =============== step11
sql create table $tb (ts timestamp, val float, val2 double)
sql_error create table $tb (ts timestamp, val float, val2 double)
sql show tables
if $rows != 7 then
return -1
......
......@@ -24,12 +24,10 @@ if $data01 != NULL then
endi
print =============== step2
sql insert into $tb values (now+1m, -128) -x step2
return -1
step2:
sql insert into $tb values (now+1m, NULL)
sql insert into $tb values (now+1m, -128)
sql insert into $tb values (now+2m, NULL)
sql select * from $tb order by ts desc
if $rows != 2 then
if $rows != 3 then
return -1
endi
if $data01 != NULL then
......@@ -37,9 +35,9 @@ if $data01 != NULL then
endi
print =============== step3
sql insert into $tb values (now+2m, 127)
sql insert into $tb values (now+3m, 127)
sql select * from $tb order by ts desc
if $rows != 3 then
if $rows != 4 then
return -1
endi
if $data01 != 127 then
......@@ -47,12 +45,12 @@ if $data01 != 127 then
endi
print =============== step4
sql insert into $tb values (now+3m, 128) -x step4
sql insert into $tb values (now+4m, 128) -x step4
return -1
step4:
sql insert into $tb values (now+3m, NULL)
sql insert into $tb values (now+5m, NULL)
sql select * from $tb
if $rows != 4 then
if $rows != 5 then
return -1
endi
if $data01 != NULL then
......@@ -60,10 +58,10 @@ if $data01 != NULL then
endi
print =============== step5
sql_error insert into $tb values (now+4m, a2)
sql insert into $tb values (now+4m, 0)
sql_error insert into $tb values (now+6m, a2)
sql insert into $tb values (now+7m, 0)
sql select * from $tb order by ts desc
if $rows != 5 then
if $rows != 6 then
return -1
endi
if $data01 != 0 then
......@@ -71,10 +69,10 @@ if $data01 != 0 then
endi
print =============== step6
sql_error insert into $tb values (now+5m, 2a)
sql insert into $tb values (now+5m, 2)
sql_error insert into $tb values (now+8m, 2a)
sql insert into $tb values (now+9m, 2)
sql select * from $tb order by ts desc
if $rows != 6 then
if $rows != 7 then
return -1
endi
if $data01 != 2 then
......@@ -82,10 +80,10 @@ if $data01 != 2 then
endi
print =============== step7
sql_error insert into $tb values (now+6m, 2a'1)
sql insert into $tb values (now+6m, 2)
sql_error insert into $tb values (now+10m, 2a'1)
sql insert into $tb values (now+11m, 2)
sql select * from $tb order by ts desc
if $rows != 7 then
if $rows != 8 then
return -1
endi
if $data01 != 2 then
......
......@@ -12,10 +12,10 @@ $db = $dbPrefix . $i
$tb = $tbPrefix . $i
print =================== step 1
sql create database $db
sql create database $db vgroups 4
sql use $db
sql show vgroups
if $rows != 0 then
if $rows != 4 then
return -1
endi
......@@ -24,7 +24,7 @@ sql create table table2 (ts timestamp, speed int)
sql create table table3 (ts timestamp, speed int)
sql create table table4 (ts timestamp, speed int)
sql show vgroups
if $rows != 1 then
if $rows != 4 then
return -1
endi
......@@ -33,7 +33,7 @@ sql create table table6 (ts timestamp, speed int)
sql create table table7 (ts timestamp, speed int)
sql create table table8 (ts timestamp, speed int)
sql show vgroups
if $rows != 2 then
if $rows != 4 then
return -1
endi
......@@ -42,7 +42,7 @@ sql create table table10 (ts timestamp, speed int)
sql create table table11 (ts timestamp, speed int)
sql create table table12 (ts timestamp, speed int)
sql show vgroups
if $rows != 3 then
if $rows != 4 then
return -1
endi
......@@ -54,7 +54,7 @@ endi
sql drop table table13
sql show vgroups
if $rows != 3 then
if $rows != 4 then
return -1
endi
......@@ -68,10 +68,10 @@ print =================== step 2
$i = 1
$db = $dbPrefix . $i
sql create database $db
sql create database $db vgroups 2
sql use $db
sql show vgroups
if $rows != 0 then
if $rows != 2 then
return -1
endi
......@@ -84,13 +84,13 @@ $db = $dbPrefix . $i
sql use $db
sql create table table2 (ts timestamp, speed int)
sql show vgroups
if $rows != 1 then
if $rows != 2 then
return -1
endi
sql drop table table2
sql show vgroups
if $rows != 0 then
if $rows != 2 then
return -1
endi
......@@ -100,7 +100,7 @@ sql create table table3 (ts timestamp, speed int)
sql create table table4 (ts timestamp, speed int)
sql drop table table1
sql show vgroups
if $rows != 1 then
if $rows != 2 then
return -1
endi
......@@ -129,7 +129,7 @@ sql create database $db
sql use $db
sql show databases
if $rows != 5 then
if $rows != 7 then
return -1
endi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册