single_row_in_tb.sim 1.1 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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
system sh/stop_dnodes.sh

system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/cfg.sh -n dnode1 -c maxtablespervnode -v 4
system sh/exec.sh -n dnode1 -s start
sleep 100
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

run general/parser/single_row_in_tb_query.sim

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

run general/parser/single_row_in_tb_query.sim

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