--
-- ### Advanced btree checks
--

drop if exists table t1;
create table t1 ( a int );

insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 75 );
insert into t1 values ( 1234 );
insert into t1 values ( 19 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 56 );
insert into t1 values ( 1256 );
insert into t1 values ( 5631 );
insert into t1 values ( 754 );
insert into t1 values ( 1234 );
insert into t1 values ( 1922 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 1256 );
insert into t1 values ( 5631 );
insert into t1 values ( 754 );
insert into t1 values ( 1234 );
insert into t1 values ( 1922 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 1256 );
insert into t1 values ( 5631 );
insert into t1 values ( 754 );
insert into t1 values ( 1234 );
insert into t1 values ( 1922 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 1256 );
insert into t1 values ( 5631 );
insert into t1 values ( 754 );
insert into t1 values ( 1234 );
insert into t1 values ( 1922 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 1256 );
insert into t1 values ( 5631 );
insert into t1 values ( 754 );
insert into t1 values ( 1234 );
insert into t1 values ( 1922 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 1256 );
insert into t1 values ( 5631 );
insert into t1 values ( 754 );
insert into t1 values ( 1234 );
insert into t1 values ( 1922 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 1256 );
insert into t1 values ( 5631 );
insert into t1 values ( 754 );
insert into t1 values ( 1234 );
insert into t1 values ( 1922 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 1256 );
insert into t1 values ( 5631 );
insert into t1 values ( 754 );
insert into t1 values ( 1234 );
insert into t1 values ( 1922 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );
insert into t1 values ( 1256 );
insert into t1 values ( 5631 );
insert into t1 values ( 754 );
insert into t1 values ( 1234 );
insert into t1 values ( 1922 );
insert into t1 values ( 672 );
insert into t1 values ( 75 );
insert into t1 values ( 9376 );
insert into t1 values ( 92 );
insert into t1 values ( 15 );
insert into t1 values ( 4556 );
insert into t1 values ( 156 );
insert into t1 values ( 56 );

select count(*) from t1;
select count(*) from t1 where a < 100;
create btree b1 on t1(a);
select count(*) from t1 where a < 100;

-- check fur any buffer fix leaks
show pool;

select count(*) from t1;
select count(*) from t1 where a = 56;
delete from t1 where a = 56;
-- check for delete on non existing entries
delete from t1 where a = 56;

select count(*) from t1;

-- further btree checks

drop if exists table t1;
create table t1 ( a int );
create btree b1 on t1 ( a );


insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );
insert into t1 values ( 5 );

insert into t1 values ( 7 );
insert into t1 values ( 7 );
insert into t1 values ( 7 );

insert into t1 values ( 8 );
insert into t1 values ( 8 );
insert into t1 values ( 9 );

select * from t1 where a > 5;
delete from t1;
-- check for empty btree page trace for several cases
select * from t1 where a > 5;
select * from t1 where a < 20;


drop if exists btree b1;
create btree b1 on t1(a);


