mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Fix another problem with reusing LSM cursors for range scans.
FossilOrigin-Name: ae3fc7652f27ba0a86f4c26f64c2e148d9496a5edb7f54dc9980edd91c326e4f
This commit is contained in:
@ -669,6 +669,18 @@ static int test_lsm_scan(
|
||||
csr = pDb->pCsr;
|
||||
}
|
||||
|
||||
/* To enhance testing, if both pLast and pFirst are defined, seek the
|
||||
** cursor to the "end" boundary here. Then the next block seeks it to
|
||||
** the "start" ready for the scan. The point is to test that cursors
|
||||
** can be reused. */
|
||||
if( pLast && pFirst ){
|
||||
if( bReverse ){
|
||||
rc = lsm_csr_seek(csr, pFirst, nFirst, LSM_SEEK_LE);
|
||||
}else{
|
||||
rc = lsm_csr_seek(csr, pLast, nLast, LSM_SEEK_GE);
|
||||
}
|
||||
}
|
||||
|
||||
if( bReverse ){
|
||||
if( pLast ){
|
||||
rc = lsm_csr_seek(csr, pLast, nLast, LSM_SEEK_LE);
|
||||
|
Reference in New Issue
Block a user