single_row_in_tb.sim 1.0 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sql connect

$dbPrefix = sr_db
$tbPrefix = sr_tb
$stbPrefix = sr_stb
$ts0 = 1537146000000
print ========== single_row_in_tb.sim
$db = $dbPrefix
$stb = $stbPrefix

sql drop database if exists $db
sql create database $db maxrows 200
print ====== create tables
sql use $db
sql create table $stb (ts timestamp, c1 int, c2 bigint, c3 float, c4 double, c5 bool, c6 binary(10), c7 nchar(10)) tags(t1 int)

$i = 0
$ts = $ts0
$tb1 = $tbPrefix . 1
sql create table $tb1 using $stb tags( 1 )
sql insert into $tb1 values ( $ts0 , 1, 2, 3, 4, true, 'binay10', '涛思nchar10' )
print ====== tables created

S
Shengliang Guan 已提交
27
run tsim/parser/single_row_in_tb_query.sim
28 29 30 31 32 33

print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed

S
Shengliang Guan 已提交
34
run tsim/parser/single_row_in_tb_query.sim
35

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