fix: limit error

This commit is contained in:
slzhou 2023-09-24 22:31:40 +08:00
parent d5d7029338
commit 61f006809f
2 changed files with 10 additions and 3 deletions

View File

@ -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

View File

@ -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