提交 f78555c7 编写于 作者: S Shengliang Guan

test: restore 2.0 case

上级 d9f7c34a
......@@ -4,23 +4,17 @@ system sh/exec.sh -n dnode1 -s start
sql connect
print ======================== dnode1 start
$db = testdb
sql create database $db
sql use $db
sql create stable st2 (ts timestamp, f1 int) tags (id int, t1 int, t2 nchar(4), t3 double)
sql insert into tb1 using st2 (id, t1) tags(1,2) values (now, 1)
sql select id,t1,t2,t3 from tb1
if $rows != 1 then
return -1
endi
if $data00 != 1 then
return -1
endi
......@@ -35,124 +29,98 @@ if $data03 != NULL then
endi
sql create table tb2 using st2 (t2,t3) tags ("12",22.0)
sql select id,t1,t2,t3 from tb2;
if $rows != 1 then
sql show tags from tb2
if $rows != 4 then
return -1
endi
if $data00 != NULL then
if $data05 != NULL then
return -1
endi
if $data01 != NULL then
if $data15 != NULL then
return -1
endi
if $data02 != 12 then
if $data25 != 12 then
return -1
endi
if $data03 != 22.000000000 then
if $data35 != 22.000000000 then
return -1
endi
sql create table tb3 using st2 tags (1,2,"3",33.0);
sql select id,t1,t2,t3 from tb3;
if $rows != 1 then
sql show tags from tb3;
if $rows != 4 then
return -1
endi
if $data00 != 1 then
if $data05 != 1 then
return -1
endi
if $data01 != 2 then
if $data15 != 2 then
return -1
endi
if $data02 != 3 then
if $data25 != 3 then
return -1
endi
if $data03 != 33.000000000 then
if $data35 != 33.000000000 then
return -1
endi
sql insert into tb4 using st2 tags(1,2,"33",44.0) values (now, 1);
sql select id,t1,t2,t3 from tb4;
if $rows != 1 then
return -1
endi
if $data00 != 1 then
sql show tags from tb4;
if $rows != 4 then
return -1
endi
if $data01 != 2 then
if $data05 != 1 then
return -1
endi
if $data02 != 33 then
if $data15 != 2 then
return -1
endi
if $data03 != 44.000000000 then
if $data25 != 33 then
return -1
endi
sql_error create table tb5 using st2() tags (3,3,"3",33.0);
sql_error create table tb6 using st2 (id,t1) tags (3,3,"3",33.0);
sql_error create table tb7 using st2 (id,t1) tags (3);
sql_error create table tb8 using st2 (ide) tags (3);
sql_error create table tb9 using st2 (id);
sql_error create table tb10 using st2 (id t1) tags (1,1);
sql_error create table tb10 using st2 (id,,t1) tags (1,1,1);
sql_error create table tb11 using st2 (id,t1,) tags (1,1,1);
sql create table tb12 using st2 (t1,id) tags (2,1);
sql select id,t1,t2,t3 from tb12;
if $rows != 1 then
sql show tags from tb12;
if $rows != 5 then
return -1
endi
if $data00 != 1 then
if $data05 != 1 then
return -1
endi
if $data01 != 2 then
if $data15 != 2 then
return -1
endi
if $data02 != NULL then
if $data25 != NULL then
return -1
endi
if $data03 != NULL then
if $data35 != NULL then
return -1
endi
sql create table tb13 using st2 ("t1",'id') tags (2,1);
sql select id,t1,t2,t3 from tb13;
if $rows != 1 then
sql show tags from tb13;
if $rows != 2 then
return -1
endi
if $data00 != 1 then
if $data05 != 1 then
return -1
endi
if $data01 != 2 then
if $data15 != 2 then
return -1
endi
if $data02 != NULL then
if $data25 != NULL then
return -1
endi
if $data03 != NULL then
if $data35 != NULL then
return -1
endi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册