diff --git a/tests/script/tsim/parser/limit.sim b/tests/script/tsim/parser/limit.sim index e79640f3af..900ca220ad 100644 --- a/tests/script/tsim/parser/limit.sim +++ b/tests/script/tsim/parser/limit.sim @@ -40,16 +40,19 @@ while $i < $halfNum $c = $x / 10 $c = $c * 10 $c = $x - $c + $c2 = $c $binary = 'binary . $c $binary = $binary . ' $nchar = 'nchar . $c $nchar = $nchar . ' $ts = $ts + $i + print insert into $tb values ( $ts , $c , $c , $c , $c , $c , $c , true, $binary , $nchar ) sql insert into $tb values ( $ts , $c , $c , $c , $c , $c , $c , true, $binary , $nchar ) $ts = $ts + $halfNum - sql insert into $tb1 values ( $ts , $c , NULL , $c , NULL , $c , $c , true, $binary , $nchar ) + print insert into $tb1 values ( $ts , $c2 , NULL , $c2 , NULL , $c2 , $c2 , true, $binary , $nchar ) + sql insert into $tb1 values ( $ts , $c2 , NULL , $c2 , NULL , $c2 , $c2 , true, $binary , $nchar ) $x = $x + 1 endw diff --git a/tests/script/tsim/parser/limit_stb.sim b/tests/script/tsim/parser/limit_stb.sim index 46bd6260c3..7d6aff3b51 100644 --- a/tests/script/tsim/parser/limit_stb.sim +++ b/tests/script/tsim/parser/limit_stb.sim @@ -32,11 +32,13 @@ sql select * from $stb limit 5 if $rows != 5 then return -1 endi -sql select * from $stb limit 5 offset 1 +print select * from $stb order by ts limit 5 offset 1 +sql select * from $stb order by ts limit 5 offset 1 if $rows != 5 then return -1 endi -if $data01 != 1 then +print $data01 $data41 +if $data01 != 0 then return -1 endi #if $data41 != 5 then @@ -48,10 +50,12 @@ if $rows != 5 then return -1 endi +print select * from $stb order by ts desc limit 5 offset 1 sql select * from $stb order by ts desc limit 5 offset 1 if $rows != 5 then return -1 endi +print $data01 $data11 $data41 if $data01 != 9 then return -1 endi