like.sim 1.1 KB
Newer Older
1 2 3 4
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sql connect
S
Shengliang Guan 已提交
5

6 7 8 9
print ======================== dnode1 start

$db = testdb
sql drop database if exists $db
10
sql create database $db cachemodel 'last_value'
11 12 13 14 15 16 17 18 19
sql use $db

$table1 = table_name
$table2 = tablexname

sql create table $table1 (ts timestamp, b binary(20))
sql create table $table2 (ts timestamp, b binary(20))

sql insert into $table1 values(now,    "table_name")
20
sql insert into $table1 values(now-3m, "tablexname")
21
sql insert into $table1 values(now-2m, "tablexxx")
22
sql insert into $table1 values(now-1m, "table")
23

G
Ganlin Zhao 已提交
24
sql select b from $table1
25 26 27 28
if $rows != 4 then
  return -1
endi

G
Ganlin Zhao 已提交
29
sql select b from $table1 where b like 'table_name'
30 31 32 33 34 35 36 37 38 39
if $rows != 2 then
  return -1
endi

sql select b from $table1 where b like 'table\_name'
if $rows != 1 then
  return -1
endi

sql show tables;
G
Ganlin Zhao 已提交
40
if $rows != 2 then
41 42 43 44
  return -1
endi

sql show tables like 'table_name'
G
Ganlin Zhao 已提交
45
if $rows != 2 then
46 47 48 49
  return -1
endi

sql show tables like 'table\_name'
G
Ganlin Zhao 已提交
50
if $rows != 1 then
51 52 53 54 55 56
  return -1
endi

system sh/exec.sh -n dnode1 -s stop -x SIGINT