Skip to content

Commit 1c858dd

Browse files
committed
Make win_big test specify only if Sort_merge_passes have happened
The number is irrelevant and may differ by architecture. We are only interested if it happened or not
1 parent 8b95e7e commit 1c858dd

File tree

2 files changed

+61
-24
lines changed

2 files changed

+61
-24
lines changed

mysql-test/r/win_big.result

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,25 @@ select
1818
sum(b) over (order by a rows between 2 preceding and 2 following) as SUM_B
1919
from
2020
t10;
21-
show status like 'Sort_merge_passes';
22-
Variable_name Value
23-
Sort_merge_passes 0
21+
select variable_name,
22+
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
23+
from information_schema.session_status
24+
where variable_name like 'Sort_merge_passes';
25+
variable_name case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
26+
SORT_MERGE_PASSES NO PASSES
2427
set sort_buffer_size=1024;
2528
flush status;
2629
create table t22 as
2730
select
2831
sum(b) over (order by a rows between 2 preceding and 2 following) as SUM_B
2932
from
3033
t10;
31-
show status like 'Sort_merge_passes';
32-
Variable_name Value
33-
Sort_merge_passes 35
34+
select variable_name,
35+
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
36+
from information_schema.session_status
37+
where variable_name like 'Sort_merge_passes';
38+
variable_name case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
39+
SORT_MERGE_PASSES WITH PASSES
3440
include/diff_tables.inc [t21, t22]
3541
drop table t21, t22;
3642
#################################################################
@@ -44,9 +50,12 @@ sum(b) over (order by a rows between 5 preceding and 5 following) as SUM_B2,
4450
sum(b) over (order by a rows between 20 preceding and 20 following) as SUM_B3
4551
from
4652
t10;
47-
show status like 'Sort_merge_passes';
48-
Variable_name Value
49-
Sort_merge_passes 0
53+
select variable_name,
54+
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
55+
from information_schema.session_status
56+
where variable_name like 'Sort_merge_passes';
57+
variable_name case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
58+
SORT_MERGE_PASSES NO PASSES
5059
set sort_buffer_size=1024;
5160
flush status;
5261
create table t22 as
@@ -56,9 +65,12 @@ sum(b) over (order by a rows between 5 preceding and 5 following) as SUM_B2,
5665
sum(b) over (order by a rows between 20 preceding and 20 following) as SUM_B3
5766
from
5867
t10;
59-
show status like 'Sort_merge_passes';
60-
Variable_name Value
61-
Sort_merge_passes 35
68+
select variable_name,
69+
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
70+
from information_schema.session_status
71+
where variable_name like 'Sort_merge_passes';
72+
variable_name case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
73+
SORT_MERGE_PASSES WITH PASSES
6274
include/diff_tables.inc [t21, t22]
6375
drop table t21, t22;
6476
#################################################################
@@ -72,9 +84,12 @@ a,
7284
sum(b) over (order by a range between 5000 preceding and 5000 following) as SUM_B1
7385
from
7486
t10;
75-
show status like 'Sort_merge_passes';
76-
Variable_name Value
77-
Sort_merge_passes 0
87+
select variable_name,
88+
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
89+
from information_schema.session_status
90+
where variable_name like 'Sort_merge_passes';
91+
variable_name case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
92+
SORT_MERGE_PASSES NO PASSES
7893
set sort_buffer_size=1024;
7994
flush status;
8095
create table t22 as
@@ -83,9 +98,12 @@ a,
8398
sum(b) over (order by a range between 5000 preceding and 5000 following) as SUM_B1
8499
from
85100
t10;
86-
show status like 'Sort_merge_passes';
87-
Variable_name Value
88-
Sort_merge_passes 35
101+
select variable_name,
102+
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
103+
from information_schema.session_status
104+
where variable_name like 'Sort_merge_passes';
105+
variable_name case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
106+
SORT_MERGE_PASSES WITH PASSES
89107
include/diff_tables.inc [t21, t22]
90108
drop table t21, t22;
91109
#################################################################

mysql-test/t/win_big.test

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ select
2828
sum(b) over (order by a rows between 2 preceding and 2 following) as SUM_B
2929
from
3030
t10;
31-
show status like 'Sort_merge_passes';
31+
select variable_name,
32+
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
33+
from information_schema.session_status
34+
where variable_name like 'Sort_merge_passes';
3235

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

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

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

7082
let $diff_tables= t21, t22;
7183
source include/diff_tables.inc;
@@ -82,7 +94,11 @@ select
8294
sum(b) over (order by a range between 5000 preceding and 5000 following) as SUM_B1
8395
from
8496
t10;
85-
show status like 'Sort_merge_passes';
97+
98+
select variable_name,
99+
case when variable_value > 0 then 'WITH PASSES' else 'NO PASSES' end
100+
from information_schema.session_status
101+
where variable_name like 'Sort_merge_passes';
86102

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

97116
let $diff_tables= t21, t22;
98117
source include/diff_tables.inc;

0 commit comments

Comments
 (0)