提交 003003e6 authored 作者: Thomas Mueller's avatar Thomas Mueller

Queries that are ordered by an indexed column returned no rows in certain cases…

Queries that are ordered by an indexed column returned no rows in certain cases (if all rows were deleted from the table previously, and there is a low number of rows in the table, and when not using other conditions, and when using the default b tree index).
上级 a4992cc4
......@@ -314,7 +314,7 @@ public class BtreeNode extends BtreePage {
}
void first(BtreeCursor cursor) throws SQLException {
if (pageData.size() == 0) {
if (pageChildren.size() == 0) {
if (!Constants.ALLOW_EMPTY_BTREE_PAGES && !root) {
Message.throwInternalError("Empty btree page");
}
......
create table test(id int primary key) as select x from system_range(1, 200);
delete from test;
insert into test(id) values(1);
select * from test order by id;
> 1;
drop table test;
create memory table test(id int) as select 1 from dual not persistent;
insert into test values(1);
select count(1) from test;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论