Skip to content

Commit fe03f6b

Browse files
author
gkodinov/kgeorge@macbook.gmz
committed
Bug #27531: 5.1 part of the fix
- Renamed "Using join cache" to "Using join buffer". - "Using join buffer" is now printed on the last table that "reads" from the join buffer cache.
1 parent ad5dede commit fe03f6b

31 files changed

+372
-372
lines changed

mysql-test/r/archive_gis.result

+2-2
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,8 @@ Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
402402
Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
403403
FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
404404
id select_type table type possible_keys key key_len ref rows filtered Extra
405-
1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort; Using join cache
406-
1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00
405+
1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort
406+
1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer
407407
Warnings:
408408
Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid`
409409
DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;

mysql-test/r/compress.result

+2-2
Original file line numberDiff line numberDiff line change
@@ -1434,8 +1434,8 @@ companynr companynr
14341434
41 40
14351435
explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
14361436
id select_type table type possible_keys key key_len ref rows Extra
1437-
1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary; Using join cache
1438-
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
1437+
1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary
1438+
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer
14391439
select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008;
14401440
fld1 companynr fld3 period
14411441
038008 37 reporters 1008

mysql-test/r/ctype_utf8.result

+2-2
Original file line numberDiff line numberDiff line change
@@ -1454,8 +1454,8 @@ insert into t1 values ('123'), ('456');
14541454
explain
14551455
select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
14561456
id select_type table type possible_keys key key_len ref rows Extra
1457-
1 SIMPLE Y ALL NULL NULL NULL NULL 2 Using temporary; Using filesort; Using join cache
1458-
1 SIMPLE Z ALL NULL NULL NULL NULL 2 Using where
1457+
1 SIMPLE Y ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
1458+
1 SIMPLE Z ALL NULL NULL NULL NULL 2 Using where; Using join buffer
14591459
select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
14601460
substr(Z.a,-1) a
14611461
3 123

mysql-test/r/derived.result

+10-10
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ a b a b
5757
3 c 3 c
5858
explain select * from t1 as x1, (select * from t1) as x2;
5959
id select_type table type possible_keys key key_len ref rows Extra
60-
1 PRIMARY x1 ALL NULL NULL NULL NULL 4 Using join cache
61-
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 4
60+
1 PRIMARY x1 ALL NULL NULL NULL NULL 4
61+
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 4 Using join buffer
6262
2 DERIVED t1 ALL NULL NULL NULL NULL 4
6363
drop table if exists t2,t3;
6464
select * from (select 1) as a;
@@ -188,14 +188,14 @@ pla_id test
188188
105 3
189189
explain SELECT STRAIGHT_JOIN d.pla_id, m2.mat_id FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum;
190190
id select_type table type possible_keys key key_len ref rows Extra
191-
1 PRIMARY m2 ALL NULL NULL NULL NULL 9 Using join cache
192-
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 6 Using where
191+
1 PRIMARY m2 ALL NULL NULL NULL NULL 9
192+
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 6 Using where; Using join buffer
193193
2 DERIVED mp ALL NULL NULL NULL NULL 9 Using temporary; Using filesort
194194
2 DERIVED m1 eq_ref PRIMARY PRIMARY 3 test.mp.mat_id 1
195195
explain SELECT STRAIGHT_JOIN d.pla_id, m2.test FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum;
196196
id select_type table type possible_keys key key_len ref rows Extra
197-
1 PRIMARY m2 ALL NULL NULL NULL NULL 9 Using join cache
198-
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 6 Using where
197+
1 PRIMARY m2 ALL NULL NULL NULL NULL 9
198+
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 6 Using where; Using join buffer
199199
2 DERIVED mp ALL NULL NULL NULL NULL 9 Using temporary; Using filesort
200200
2 DERIVED m1 eq_ref PRIMARY PRIMARY 3 test.mp.mat_id 1
201201
drop table t1,t2;
@@ -245,8 +245,8 @@ a a
245245
2 2
246246
explain select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b;
247247
id select_type table type possible_keys key key_len ref rows Extra
248-
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 Using join cache
249-
1 PRIMARY <derived4> ALL NULL NULL NULL NULL 2
248+
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
249+
1 PRIMARY <derived4> ALL NULL NULL NULL NULL 2 Using join buffer
250250
4 DERIVED t1 ALL NULL NULL NULL NULL 2
251251
5 UNION t1 ALL NULL NULL NULL NULL 2
252252
NULL UNION RESULT <union4,5> ALL NULL NULL NULL NULL NULL
@@ -312,8 +312,8 @@ b 3.5000
312312
explain SELECT s.name, AVG(s.val) AS median FROM (SELECT x.name, x.val FROM t1 x, t1 y WHERE x.name=y.name GROUP BY x.name, x.val HAVING SUM(y.val <= x.val) >= COUNT(*)/2 AND SUM(y.val >= x.val) >= COUNT(*)/2) AS s GROUP BY s.name;
313313
id select_type table type possible_keys key key_len ref rows Extra
314314
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 Using temporary; Using filesort
315-
2 DERIVED x ALL NULL NULL NULL NULL 17 Using temporary; Using filesort; Using join cache
316-
2 DERIVED y ALL NULL NULL NULL NULL 17 Using where
315+
2 DERIVED x ALL NULL NULL NULL NULL 17 Using temporary; Using filesort
316+
2 DERIVED y ALL NULL NULL NULL NULL 17 Using where; Using join buffer
317317
drop table t1;
318318
create table t2 (a int, b int, primary key (a));
319319
insert into t2 values (1,7),(2,7);

mysql-test/r/distinct.result

+10-10
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ INSERT INTO t3 VALUES (1,'1'),(2,'2'),(1,'1'),(2,'2');
174174
explain SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
175175
id select_type table type possible_keys key key_len ref rows Extra
176176
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 4 Using temporary
177-
1 SIMPLE t3 ref a a 5 test.t1.b 2 Using where; Using index; Using join cache
178-
1 SIMPLE t2 index a a 4 NULL 5 Using where; Using index; Distinct
177+
1 SIMPLE t3 ref a a 5 test.t1.b 2 Using where; Using index
178+
1 SIMPLE t2 index a a 4 NULL 5 Using where; Using index; Distinct; Using join buffer
179179
SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
180180
a
181181
1
@@ -299,12 +299,12 @@ WHERE
299299
((t1.id=j_lj_t2.id AND t2_lj.id IS NULL) OR (t1.id=t2.id AND t2.idx=2))
300300
AND ((t1.id=j_lj_t3.id AND t3_lj.id IS NULL) OR (t1.id=t3.id AND t3.idx=2));
301301
id select_type table type possible_keys key key_len ref rows Extra
302-
1 SIMPLE t1 index id id 4 NULL 2 Using index; Using temporary; Using join cache
303-
1 SIMPLE t2 index id id 8 NULL 1 Using index; Distinct; Using join cache
304-
1 SIMPLE t3 index id id 8 NULL 1 Using index; Distinct; Using join cache
305-
1 SIMPLE j_lj_t2 index id id 4 NULL 2 Using where; Using index; Distinct
306-
1 SIMPLE t2_lj ref id id 4 test.j_lj_t2.id 1 Using where; Using index; Distinct; Using join cache
307-
1 SIMPLE j_lj_t3 index id id 4 NULL 2 Using where; Using index; Distinct
302+
1 SIMPLE t1 index id id 4 NULL 2 Using index; Using temporary
303+
1 SIMPLE t2 index id id 8 NULL 1 Using index; Distinct; Using join buffer
304+
1 SIMPLE t3 index id id 8 NULL 1 Using index; Distinct; Using join buffer
305+
1 SIMPLE j_lj_t2 index id id 4 NULL 2 Using where; Using index; Distinct; Using join buffer
306+
1 SIMPLE t2_lj ref id id 4 test.j_lj_t2.id 1 Using where; Using index; Distinct
307+
1 SIMPLE j_lj_t3 index id id 4 NULL 2 Using where; Using index; Distinct; Using join buffer
308308
1 SIMPLE t3_lj ref id id 4 test.j_lj_t3.id 1 Using where; Using index; Distinct
309309
SELECT DISTINCT
310310
t1.id
@@ -514,8 +514,8 @@ id select_type table type possible_keys key key_len ref rows Extra
514514
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
515515
EXPLAIN SELECT DISTINCT t1_1.a, t1_1.b FROM t1 t1_1, t1 t1_2;
516516
id select_type table type possible_keys key key_len ref rows Extra
517-
1 SIMPLE t1_1 ALL NULL NULL NULL NULL 3 Using temporary; Using join cache
518-
1 SIMPLE t1_2 index NULL PRIMARY 4 NULL 3 Using index; Distinct
517+
1 SIMPLE t1_1 ALL NULL NULL NULL NULL 3 Using temporary
518+
1 SIMPLE t1_2 index NULL PRIMARY 4 NULL 3 Using index; Distinct; Using join buffer
519519
EXPLAIN SELECT DISTINCT t1_1.a, t1_1.b FROM t1 t1_1, t1 t1_2
520520
WHERE t1_1.a = t1_2.a;
521521
id select_type table type possible_keys key key_len ref rows Extra

mysql-test/r/func_group.result

+4-4
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,8 @@ id select_type table type possible_keys key key_len ref rows Extra
613613
explain
614614
select max(t1.a3), min(t2.a2) from t1, t2 where t1.a2 = 2 and t1.a3 < 'MIN' and t2.a3 > 'CA';
615615
id select_type table type possible_keys key key_len ref rows Extra
616-
1 SIMPLE t1 range k1 k1 7 NULL 1 Using where; Using index; Using join cache
617-
1 SIMPLE t2 range k1 k1 3 NULL 4 Using where; Using index
616+
1 SIMPLE t1 range k1 k1 7 NULL 1 Using where; Using index
617+
1 SIMPLE t2 range k1 k1 3 NULL 4 Using where; Using index; Using join buffer
618618
explain
619619
select min(a4 - 0.01) from t1;
620620
id select_type table type possible_keys key key_len ref rows Extra
@@ -650,8 +650,8 @@ id select_type table type possible_keys key key_len ref rows Extra
650650
explain
651651
select concat(min(t1.a1),min(t2.a4)) from t1, t2 where t2.a4 <> 'AME';
652652
id select_type table type possible_keys key key_len ref rows Extra
653-
1 SIMPLE t2 range k2 k2 4 NULL 6 Using where; Using index; Using join cache
654-
1 SIMPLE t1 index NULL PRIMARY 3 NULL 15 Using index
653+
1 SIMPLE t2 range k2 k2 4 NULL 6 Using where; Using index
654+
1 SIMPLE t1 index NULL PRIMARY 3 NULL 15 Using index; Using join buffer
655655
drop table t1, t2;
656656
create table t1 (a char(10));
657657
insert into t1 values ('a'),('b'),('c');

mysql-test/r/func_group_innodb.result

+4-4
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ min(7)
7878
7
7979
explain select min(7) from t2i join t1i;
8080
id select_type table type possible_keys key key_len ref rows Extra
81-
1 SIMPLE t2i ALL NULL NULL NULL NULL 1 Using join cache
82-
1 SIMPLE t1i ALL NULL NULL NULL NULL 1
81+
1 SIMPLE t2i ALL NULL NULL NULL NULL 1
82+
1 SIMPLE t1i ALL NULL NULL NULL NULL 1 Using join buffer
8383
select min(7) from t2i join t1i;
8484
min(7)
8585
NULL
@@ -94,8 +94,8 @@ max(7)
9494
7
9595
explain select max(7) from t2i join t1i;
9696
id select_type table type possible_keys key key_len ref rows Extra
97-
1 SIMPLE t2i ALL NULL NULL NULL NULL 1 Using join cache
98-
1 SIMPLE t1i ALL NULL NULL NULL NULL 1
97+
1 SIMPLE t2i ALL NULL NULL NULL NULL 1
98+
1 SIMPLE t1i ALL NULL NULL NULL NULL 1 Using join buffer
9999
select max(7) from t2i join t1i;
100100
max(7)
101101
NULL

mysql-test/r/gis.result

+2-2
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,8 @@ Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
394394
Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
395395
FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
396396
id select_type table type possible_keys key key_len ref rows filtered Extra
397-
1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort; Using join cache
398-
1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00
397+
1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort
398+
1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer
399399
Warnings:
400400
Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid`
401401
DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;

0 commit comments

Comments
 (0)