@@ -18,19 +18,25 @@ select
18
18
sum(b) over (order by a rows between 2 preceding and 2 following) as SUM_B
19
19
from
20
20
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
24
27
set sort_buffer_size=1024;
25
28
flush status;
26
29
create table t22 as
27
30
select
28
31
sum(b) over (order by a rows between 2 preceding and 2 following) as SUM_B
29
32
from
30
33
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
34
40
include/diff_tables.inc [t21, t22]
35
41
drop table t21, t22;
36
42
#################################################################
@@ -44,9 +50,12 @@ sum(b) over (order by a rows between 5 preceding and 5 following) as SUM_B2,
44
50
sum(b) over (order by a rows between 20 preceding and 20 following) as SUM_B3
45
51
from
46
52
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
50
59
set sort_buffer_size=1024;
51
60
flush status;
52
61
create table t22 as
@@ -56,9 +65,12 @@ sum(b) over (order by a rows between 5 preceding and 5 following) as SUM_B2,
56
65
sum(b) over (order by a rows between 20 preceding and 20 following) as SUM_B3
57
66
from
58
67
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
62
74
include/diff_tables.inc [t21, t22]
63
75
drop table t21, t22;
64
76
#################################################################
72
84
sum(b) over (order by a range between 5000 preceding and 5000 following) as SUM_B1
73
85
from
74
86
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
78
93
set sort_buffer_size=1024;
79
94
flush status;
80
95
create table t22 as
83
98
sum(b) over (order by a range between 5000 preceding and 5000 following) as SUM_B1
84
99
from
85
100
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
89
107
include/diff_tables.inc [t21, t22]
90
108
drop table t21, t22;
91
109
#################################################################
0 commit comments