Skip to content

Commit

Permalink
Make win_big test specify only if Sort_merge_passes have happened
Browse files Browse the repository at this point in the history
The number is irrelevant and may differ by architecture. We are only
interested if it happened or not
  • Loading branch information
cvicentiu committed Sep 24, 2016
1 parent 8b95e7e commit 1c858dd
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 24 deletions.
54 changes: 36 additions & 18 deletions mysql-test/r/win_big.result
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,25 @@ select
sum(b) over (order by a rows between 2 preceding and 2 following) as SUM_B
from
t10;
show status like 'Sort_merge_passes';
Variable_name Value
Sort_merge_passes 0
select variable_name,
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
from information_schema.session_status
where variable_name like 'Sort_merge_passes';
variable_name case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
SORT_MERGE_PASSES NO PASSES
set sort_buffer_size=1024;
flush status;
create table t22 as
select
sum(b) over (order by a rows between 2 preceding and 2 following) as SUM_B
from
t10;
show status like 'Sort_merge_passes';
Variable_name Value
Sort_merge_passes 35
select variable_name,
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
from information_schema.session_status
where variable_name like 'Sort_merge_passes';
variable_name case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
SORT_MERGE_PASSES WITH PASSES
include/diff_tables.inc [t21, t22]
drop table t21, t22;
#################################################################
Expand All @@ -44,9 +50,12 @@ sum(b) over (order by a rows between 5 preceding and 5 following) as SUM_B2,
sum(b) over (order by a rows between 20 preceding and 20 following) as SUM_B3
from
t10;
show status like 'Sort_merge_passes';
Variable_name Value
Sort_merge_passes 0
select variable_name,
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
from information_schema.session_status
where variable_name like 'Sort_merge_passes';
variable_name case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
SORT_MERGE_PASSES NO PASSES
set sort_buffer_size=1024;
flush status;
create table t22 as
Expand All @@ -56,9 +65,12 @@ sum(b) over (order by a rows between 5 preceding and 5 following) as SUM_B2,
sum(b) over (order by a rows between 20 preceding and 20 following) as SUM_B3
from
t10;
show status like 'Sort_merge_passes';
Variable_name Value
Sort_merge_passes 35
select variable_name,
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
from information_schema.session_status
where variable_name like 'Sort_merge_passes';
variable_name case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
SORT_MERGE_PASSES WITH PASSES
include/diff_tables.inc [t21, t22]
drop table t21, t22;
#################################################################
Expand All @@ -72,9 +84,12 @@ a,
sum(b) over (order by a range between 5000 preceding and 5000 following) as SUM_B1
from
t10;
show status like 'Sort_merge_passes';
Variable_name Value
Sort_merge_passes 0
select variable_name,
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
from information_schema.session_status
where variable_name like 'Sort_merge_passes';
variable_name case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
SORT_MERGE_PASSES NO PASSES
set sort_buffer_size=1024;
flush status;
create table t22 as
Expand All @@ -83,9 +98,12 @@ a,
sum(b) over (order by a range between 5000 preceding and 5000 following) as SUM_B1
from
t10;
show status like 'Sort_merge_passes';
Variable_name Value
Sort_merge_passes 35
select variable_name,
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
from information_schema.session_status
where variable_name like 'Sort_merge_passes';
variable_name case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
SORT_MERGE_PASSES WITH PASSES
include/diff_tables.inc [t21, t22]
drop table t21, t22;
#################################################################
Expand Down
31 changes: 25 additions & 6 deletions mysql-test/t/win_big.test
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ select
sum(b) over (order by a rows between 2 preceding and 2 following) as SUM_B
from
t10;
show status like 'Sort_merge_passes';
select variable_name,
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
from information_schema.session_status
where variable_name like 'Sort_merge_passes';

set sort_buffer_size=1024;
flush status;
Expand All @@ -37,7 +40,10 @@ select
sum(b) over (order by a rows between 2 preceding and 2 following) as SUM_B
from
t10;
show status like 'Sort_merge_passes';
select variable_name,
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
from information_schema.session_status
where variable_name like 'Sort_merge_passes';

let $diff_tables= t21, t22;
source include/diff_tables.inc;
Expand All @@ -54,7 +60,10 @@ select
sum(b) over (order by a rows between 20 preceding and 20 following) as SUM_B3
from
t10;
show status like 'Sort_merge_passes';
select variable_name,
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
from information_schema.session_status
where variable_name like 'Sort_merge_passes';

set sort_buffer_size=1024;
flush status;
Expand All @@ -65,7 +74,10 @@ select
sum(b) over (order by a rows between 20 preceding and 20 following) as SUM_B3
from
t10;
show status like 'Sort_merge_passes';
select variable_name,
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
from information_schema.session_status
where variable_name like 'Sort_merge_passes';

let $diff_tables= t21, t22;
source include/diff_tables.inc;
Expand All @@ -82,7 +94,11 @@ select
sum(b) over (order by a range between 5000 preceding and 5000 following) as SUM_B1
from
t10;
show status like 'Sort_merge_passes';

select variable_name,
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
from information_schema.session_status
where variable_name like 'Sort_merge_passes';

set sort_buffer_size=1024;
flush status;
Expand All @@ -92,7 +108,10 @@ select
sum(b) over (order by a range between 5000 preceding and 5000 following) as SUM_B1
from
t10;
show status like 'Sort_merge_passes';
select variable_name,
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
from information_schema.session_status
where variable_name like 'Sort_merge_passes';

let $diff_tables= t21, t22;
source include/diff_tables.inc;
Expand Down

0 comments on commit 1c858dd

Please sign in to comment.