single_row_in_tb.sim 1.1 KB
Newer Older
S
slguan 已提交
1
system sh/stop_dnodes.sh
S
slguan 已提交
2 3

system sh/deploy.sh -n dnode1 -i 1
H
hjxilinx 已提交
4
system sh/cfg.sh -n dnode1 -c walLevel -v 0
H
Haojun Liao 已提交
5
system sh/cfg.sh -n dnode1 -c maxtablespervnode -v 4
S
slguan 已提交
6
system sh/exec.sh -n dnode1 -s start
H
Haojun Liao 已提交
7
sleep 1000
S
slguan 已提交
8 9 10 11 12 13 14 15 16 17 18
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
H
Haojun Liao 已提交
19
sql create database $db maxrows 200
S
slguan 已提交
20 21 22 23 24 25 26 27 28 29 30
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
scripts  
slguan 已提交
31
run general/parser/single_row_in_tb_query.sim
S
slguan 已提交
32 33 34

print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
S
scripts  
Shengliang Guan 已提交
35
sleep 5000
S
slguan 已提交
36 37 38
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed

S
scripts  
slguan 已提交
39
run general/parser/single_row_in_tb_query.sim
S
scripts  
Shengliang Guan 已提交
40 41

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