mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-23 17:05:36 +01:00
Merge 'btree: fix infinite looping in backwards iteration of btree table' from Jussi Saurio
Closes #1562 Existing "fuzz test" (not really fuzz, but kinda) didn't catch this due to `LIMIT 3` clause Closes #1563
This commit is contained in:
@@ -199,4 +199,15 @@ do_execsql_test orderby_desc_with_filter_id_le {
|
||||
6665
|
||||
6664
|
||||
6663
|
||||
6662}
|
||||
6662}
|
||||
|
||||
# regression test where backwards iteration used to hang indefinitely
|
||||
do_execsql_test orderby_desc_regression {
|
||||
select count(1) from (select * from users where id < 100 order by id desc)
|
||||
} {99}
|
||||
|
||||
do_execsql_test orderby_desc_regression_verify_order {
|
||||
select id from users where id < 100 order by id desc limit 3;
|
||||
} {99
|
||||
98
|
||||
97}
|
||||
Reference in New Issue
Block a user