diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/win_big-mdev-11697.test | |
parent | Initial commit. (diff) | |
download | mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/win_big-mdev-11697.test')
-rw-r--r-- | mysql-test/main/win_big-mdev-11697.test | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/mysql-test/main/win_big-mdev-11697.test b/mysql-test/main/win_big-mdev-11697.test new file mode 100644 index 00000000..ae0b2834 --- /dev/null +++ b/mysql-test/main/win_big-mdev-11697.test @@ -0,0 +1,54 @@ +--source include/no_valgrind_without_big.inc + +set max_recursive_iterations=200000; +create table test_table (id int, random_data varchar(36), static_int int, static_varchar varchar(10)); + +insert into test_table(id, random_data, static_int, static_varchar) +select id, random_data, 42, 'Hello' + from ( + with recursive data_generator(id, random_data) as ( + select 1 as id, uuid() as random_data + union all + select id + 1, uuid() from data_generator where id < 1000 + ) + select * from data_generator + ) as a; + +commit; + +analyze table test_table; + +explain select * from (select id, lead(id) over(order by id) next_id from test_table order by id) a limit 10; + +select * from (select id, lead(id) over(order by id) next_id from test_table order by id) a limit 10; + +drop table if exists test_table; + +create table test_table (id int, random_data varchar(36), static_int int, static_varchar varchar(10)); + +insert into test_table(id, random_data, static_int, static_varchar) +select id, random_data, 42, 'Hello' + from ( + with recursive data_generator(id, random_data) as ( + select 1 as id, uuid() as random_data + union all + select id + 1, uuid() from data_generator where id < 100000 + ) + select * from data_generator + ) as a; + +commit; + +analyze table test_table; + +explain select * from (select id, lead(id) over(order by id) next_id from test_table order by id) a limit 10; + +flush status; +select * from (select id, lead(id) over(order by id) next_id from test_table order by id) a limit 10; +select variable_name, + case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end as exp +from information_schema.session_status +where variable_name like 'Sort_merge_passes'; + +drop table test_table; +set max_recursive_iterations=default; |