This commit is contained in:
Shengliang Guan 2020-10-16 18:47:02 +08:00
parent a04dff125b
commit 1ad7827fc1
4 changed files with 29 additions and 17 deletions

View File

@ -30,9 +30,12 @@ print =============== step 1
$x = $N $x = $N
$y = $N / 2 $y = $N / 2
while $x > $y while $x > $y
$y = $x * 60000
$ms = 1601481600000 - $y
$ms = $x . m $ms = $x . m
$xt = - . $x $xt = - . $x
sql insert into $tb values (now - $ms , -$x ) sql insert into $tb values ($ms , -$x )
$x = $x - 1 $x = $x - 1
endw endw
@ -45,8 +48,10 @@ endi
$x = $N / 2 $x = $N / 2
$y = $N $y = $N
while $x < $y while $x < $y
$ms = $x . m $y = $x * 60000
sql insert into $tb values (now + $ms , $x ) $ms = 1601481600000 + $y
sql insert into $tb values ($ms , $x )
$x = $x + 1 $x = $x + 1
endw endw
sql select * from $tb sql select * from $tb
@ -60,14 +65,14 @@ print =============== step 2
$N1 = $N + 1 $N1 = $N + 1
$result1 = $N / 2 $result1 = $N / 2
$result2 = $N $result2 = $N
$step = $N1 . m $step = $N1 * 60000
$start1 = now- . $step $start1 = 1601481600000 - $step
$start2 = now $start2 = 1601481600000
$start3 = now+ . $step $start3 = 1601481600000 + $step
$end1 = now- . $step $end1 = 1601481600000 - $step
$end2 = now $end2 = 1601481600000
$end3 = now+ . $step $end3 = 1601481600000 + $step
sql select * from $tb where ts < $start1 and ts > $end1 sql select * from $tb where ts < $start1 and ts > $end1
if $rows != 0 then if $rows != 0 then

View File

@ -33,7 +33,8 @@ while $i < $tbNum
$x = 0 $x = 0
while $x < $rowNum while $x < $rowNum
$ms = $x . m $y = $x * 60000
$ms = 1600099200000 + $y
$c = $x / 100 $c = $x / 100
$c = $c * 100 $c = $c * 100
$c = $x - $c $c = $x - $c
@ -41,7 +42,7 @@ while $i < $tbNum
$binary = $binary . ' $binary = $binary . '
$nchar = 'nchar . $c $nchar = 'nchar . $c
$nchar = $nchar . ' $nchar = $nchar . '
sql insert into $tb values (now + $ms , $c , $c , $c , $c , $c , $c , $c , $binary , $nchar ) sql insert into $tb values ($ms , $c , $c , $c , $c , $c , $c , $c , $binary , $nchar )
$x = $x + 1 $x = $x + 1
endw endw
@ -299,7 +300,8 @@ while $i < 1
$x = 0 $x = 0
while $x < 10000 while $x < 10000
$ms = $x . m $y = $x * 60000
$ms = 1601481600000 + $y
$c = $x / 100 $c = $x / 100
$c = $c * 100 $c = $c * 100
$c = $x - $c $c = $x - $c
@ -307,7 +309,7 @@ while $i < 1
$binary = $binary . ' $binary = $binary . '
$nchar = 'nchar . $c $nchar = 'nchar . $c
$nchar = $nchar . ' $nchar = $nchar . '
sql insert into $tb values (now + $ms , null , null , null , null , null , null , null , null , null ) sql insert into $tb values ($ms , null , null , null , null , null , null , null , null , null )
$x = $x + 1 $x = $x + 1
endw endw

View File

@ -289,3 +289,5 @@ endi
if $data09 != 20 then if $data09 != 20 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT

View File

@ -29,6 +29,9 @@ system sh/exec.sh -n dnode3 -s start
sleep 3000 sleep 3000
$maxNum = 102
$maxNum = 12
$x = 0 $x = 0
show2: show2:
$x = $x + 1 $x = $x + 1
@ -58,7 +61,7 @@ endi
print ============================== step3 print ============================== step3
$count = 2 $count = 2
while $count < 102 while $count < $maxNum
$db = d . $count $db = d . $count
$tb = $db . .t $tb = $db . .t
$tb2 = $db . .t2 $tb2 = $db . .t2
@ -73,7 +76,7 @@ endw
print ============================== step4 print ============================== step4
$count = 2 $count = 2
while $count < 102 while $count < $maxNum
$db = d . $count $db = d . $count
$tb = $db . .t $tb = $db . .t
sql select * from $tb sql select * from $tb
@ -131,7 +134,7 @@ show8:
endi endi
$count = 2 $count = 2
while $count < 102 while $count < $maxNum
$db = d . $count $db = d . $count
$tb = $db . .t $tb = $db . .t
sql select * from $tb sql select * from $tb