Skip to content

Commit d7d1907

Browse files
committed
MDEV-6838 Using too big key for internal temp tables
update test results after the fix
1 parent 12d87c3 commit d7d1907

File tree

6 files changed

+29
-29
lines changed

6 files changed

+29
-29
lines changed

mysql-test/r/derived_opt.result

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -413,64 +413,64 @@ create VIEW v27 AS select tab1_v27.f1,tab1_v27.f2 from t0 tab1_v27 join v26 tab2
413413
EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, CAST(f2 AS CHAR) AS f2 FROM v27;
414414
id select_type table type possible_keys key key_len ref rows Extra
415415
1 SIMPLE tab1_v27 ALL NULL NULL NULL NULL 5 Using where
416-
1 SIMPLE tab1_v26 hash_ALL NULL #hash#$hj63test1.tab1_v27.f1,test1.tab1_v27.f2 5 Using where; Using join buffer (flat, BNLH join)
416+
1 SIMPLE tab1_v26 hash_ALL NULL #hash#$hj62test1.tab1_v27.f1,test1.tab1_v27.f2 5 Using where; Using join buffer (flat, BNLH join)
417417
1 SIMPLE tab1_v25 hash_ALL NULL #hash#$hj 31 test1.tab1_v26.f1 5 Using where; Using join buffer (incremental, BNLH join)
418418
1 SIMPLE tab1_v24 hash_ALL NULL #hash#$hj 60 test1.tab1_v25.f1,test1.tab1_v25.f2 5 Using where; Using join buffer (incremental, BNLH join)
419-
1 SIMPLE tab1_v23 hash_ALL NULL #hash#$hj63test1.tab1_v24.f1,test1.tab1_v24.f2 5 Using where; Using join buffer (incremental, BNLH join)
419+
1 SIMPLE tab1_v23 hash_ALL NULL #hash#$hj62test1.tab1_v24.f1,test1.tab1_v24.f2 5 Using where; Using join buffer (incremental, BNLH join)
420420
1 SIMPLE tab1_v22 hash_ALL NULL #hash#$hj 31 test1.tab1_v23.f1 5 Using where; Using join buffer (incremental, BNLH join)
421421
1 SIMPLE tab1_v21 hash_ALL NULL #hash#$hj 60 test1.tab1_v22.f1,test1.tab1_v22.f2 5 Using where; Using join buffer (incremental, BNLH join)
422-
1 SIMPLE tab1_v20 hash_ALL NULL #hash#$hj63test1.tab1_v21.f1,test1.tab1_v21.f2 5 Using where; Using join buffer (incremental, BNLH join)
422+
1 SIMPLE tab1_v20 hash_ALL NULL #hash#$hj62test1.tab1_v21.f1,test1.tab1_v21.f2 5 Using where; Using join buffer (incremental, BNLH join)
423423
1 SIMPLE tab1_v19 hash_ALL NULL #hash#$hj 31 test1.tab1_v20.f1 5 Using where; Using join buffer (incremental, BNLH join)
424424
1 SIMPLE tab1_v18 hash_ALL NULL #hash#$hj 60 test1.tab1_v19.f1,test1.tab1_v19.f2 5 Using where; Using join buffer (incremental, BNLH join)
425-
1 SIMPLE tab1_v17 hash_ALL NULL #hash#$hj63test1.tab1_v18.f1,test1.tab1_v18.f2 5 Using where; Using join buffer (incremental, BNLH join)
425+
1 SIMPLE tab1_v17 hash_ALL NULL #hash#$hj62test1.tab1_v18.f1,test1.tab1_v18.f2 5 Using where; Using join buffer (incremental, BNLH join)
426426
1 SIMPLE tab1_v16 hash_ALL NULL #hash#$hj 31 test1.tab1_v17.f1 5 Using where; Using join buffer (incremental, BNLH join)
427427
1 SIMPLE tab1_v15 hash_ALL NULL #hash#$hj 60 test1.tab1_v16.f1,test1.tab1_v16.f2 5 Using where; Using join buffer (incremental, BNLH join)
428-
1 SIMPLE tab1_v14 hash_ALL NULL #hash#$hj63test1.tab1_v15.f1,test1.tab1_v15.f2 5 Using where; Using join buffer (incremental, BNLH join)
428+
1 SIMPLE tab1_v14 hash_ALL NULL #hash#$hj62test1.tab1_v15.f1,test1.tab1_v15.f2 5 Using where; Using join buffer (incremental, BNLH join)
429429
1 SIMPLE tab1_v13 hash_ALL NULL #hash#$hj 31 test1.tab1_v14.f1 5 Using where; Using join buffer (incremental, BNLH join)
430430
1 SIMPLE tab1_v12 hash_ALL NULL #hash#$hj 60 test1.tab1_v13.f1,test1.tab1_v13.f2 5 Using where; Using join buffer (incremental, BNLH join)
431-
1 SIMPLE tab1_v11 hash_ALL NULL #hash#$hj63test1.tab1_v12.f1,test1.tab1_v12.f2 5 Using where; Using join buffer (incremental, BNLH join)
431+
1 SIMPLE tab1_v11 hash_ALL NULL #hash#$hj62test1.tab1_v12.f1,test1.tab1_v12.f2 5 Using where; Using join buffer (incremental, BNLH join)
432432
1 SIMPLE tab1_v10 hash_ALL NULL #hash#$hj 31 test1.tab1_v11.f1 5 Using where; Using join buffer (incremental, BNLH join)
433433
1 SIMPLE tab1_v9 hash_ALL NULL #hash#$hj 60 test1.tab1_v10.f1,test1.tab1_v10.f2 5 Using where; Using join buffer (incremental, BNLH join)
434-
1 SIMPLE tab1_v8 hash_ALL NULL #hash#$hj63test1.tab1_v9.f1,test1.tab1_v9.f2 5 Using where; Using join buffer (incremental, BNLH join)
434+
1 SIMPLE tab1_v8 hash_ALL NULL #hash#$hj62test1.tab1_v9.f1,test1.tab1_v9.f2 5 Using where; Using join buffer (incremental, BNLH join)
435435
1 SIMPLE tab1_v7 hash_ALL NULL #hash#$hj 31 test1.tab1_v8.f1 5 Using where; Using join buffer (incremental, BNLH join)
436436
1 SIMPLE tab1_v6 hash_ALL NULL #hash#$hj 60 test1.tab1_v7.f1,test1.tab1_v7.f2 5 Using where; Using join buffer (incremental, BNLH join)
437-
1 SIMPLE tab1_v5 hash_ALL NULL #hash#$hj63test1.tab1_v6.f1,test1.tab1_v6.f2 5 Using where; Using join buffer (incremental, BNLH join)
437+
1 SIMPLE tab1_v5 hash_ALL NULL #hash#$hj62test1.tab1_v6.f1,test1.tab1_v6.f2 5 Using where; Using join buffer (incremental, BNLH join)
438438
1 SIMPLE tab1_v4 hash_ALL NULL #hash#$hj 31 test1.tab1_v5.f1 5 Using where; Using join buffer (incremental, BNLH join)
439439
1 SIMPLE tab1_v3 hash_ALL NULL #hash#$hj 60 test1.tab1_v4.f1,test1.tab1_v4.f2 5 Using where; Using join buffer (incremental, BNLH join)
440-
1 SIMPLE tab1_v2 hash_ALL NULL #hash#$hj63test1.tab1_v3.f1,test1.tab1_v3.f2 5 Using where; Using join buffer (incremental, BNLH join)
440+
1 SIMPLE tab1_v2 hash_ALL NULL #hash#$hj62test1.tab1_v3.f1,test1.tab1_v3.f2 5 Using where; Using join buffer (incremental, BNLH join)
441441
1 SIMPLE tab1_v1 hash_ALL NULL #hash#$hj 31 test1.tab1_v2.f1 5 Using where; Using join buffer (incremental, BNLH join)
442-
1 SIMPLE t1 hash_ALL NULL #hash#$hj85test1.tab1_v1.f1,test1.tab1_v1.f2 5 Using where; Using join buffer (incremental, BNLH join)
442+
1 SIMPLE t1 hash_ALL NULL #hash#$hj84test1.tab1_v1.f1,test1.tab1_v1.f2 5 Using where; Using join buffer (incremental, BNLH join)
443443
# This used to hang forever:
444444
EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, CAST(f2 AS CHAR) AS f2 FROM v27;
445445
id select_type table type possible_keys key key_len ref rows Extra
446446
1 SIMPLE tab1_v27 ALL NULL NULL NULL NULL 5 Using where
447-
1 SIMPLE tab1_v26 hash_ALL NULL #hash#$hj63test1.tab1_v27.f1,test1.tab1_v27.f2 5 Using where; Using join buffer (flat, BNLH join)
447+
1 SIMPLE tab1_v26 hash_ALL NULL #hash#$hj62test1.tab1_v27.f1,test1.tab1_v27.f2 5 Using where; Using join buffer (flat, BNLH join)
448448
1 SIMPLE tab1_v25 hash_ALL NULL #hash#$hj 31 test1.tab1_v26.f1 5 Using where; Using join buffer (incremental, BNLH join)
449449
1 SIMPLE tab1_v24 hash_ALL NULL #hash#$hj 60 test1.tab1_v25.f1,test1.tab1_v25.f2 5 Using where; Using join buffer (incremental, BNLH join)
450-
1 SIMPLE tab1_v23 hash_ALL NULL #hash#$hj63test1.tab1_v24.f1,test1.tab1_v24.f2 5 Using where; Using join buffer (incremental, BNLH join)
450+
1 SIMPLE tab1_v23 hash_ALL NULL #hash#$hj62test1.tab1_v24.f1,test1.tab1_v24.f2 5 Using where; Using join buffer (incremental, BNLH join)
451451
1 SIMPLE tab1_v22 hash_ALL NULL #hash#$hj 31 test1.tab1_v23.f1 5 Using where; Using join buffer (incremental, BNLH join)
452452
1 SIMPLE tab1_v21 hash_ALL NULL #hash#$hj 60 test1.tab1_v22.f1,test1.tab1_v22.f2 5 Using where; Using join buffer (incremental, BNLH join)
453-
1 SIMPLE tab1_v20 hash_ALL NULL #hash#$hj63test1.tab1_v21.f1,test1.tab1_v21.f2 5 Using where; Using join buffer (incremental, BNLH join)
453+
1 SIMPLE tab1_v20 hash_ALL NULL #hash#$hj62test1.tab1_v21.f1,test1.tab1_v21.f2 5 Using where; Using join buffer (incremental, BNLH join)
454454
1 SIMPLE tab1_v19 hash_ALL NULL #hash#$hj 31 test1.tab1_v20.f1 5 Using where; Using join buffer (incremental, BNLH join)
455455
1 SIMPLE tab1_v18 hash_ALL NULL #hash#$hj 60 test1.tab1_v19.f1,test1.tab1_v19.f2 5 Using where; Using join buffer (incremental, BNLH join)
456-
1 SIMPLE tab1_v17 hash_ALL NULL #hash#$hj63test1.tab1_v18.f1,test1.tab1_v18.f2 5 Using where; Using join buffer (incremental, BNLH join)
456+
1 SIMPLE tab1_v17 hash_ALL NULL #hash#$hj62test1.tab1_v18.f1,test1.tab1_v18.f2 5 Using where; Using join buffer (incremental, BNLH join)
457457
1 SIMPLE tab1_v16 hash_ALL NULL #hash#$hj 31 test1.tab1_v17.f1 5 Using where; Using join buffer (incremental, BNLH join)
458458
1 SIMPLE tab1_v15 hash_ALL NULL #hash#$hj 60 test1.tab1_v16.f1,test1.tab1_v16.f2 5 Using where; Using join buffer (incremental, BNLH join)
459-
1 SIMPLE tab1_v14 hash_ALL NULL #hash#$hj63test1.tab1_v15.f1,test1.tab1_v15.f2 5 Using where; Using join buffer (incremental, BNLH join)
459+
1 SIMPLE tab1_v14 hash_ALL NULL #hash#$hj62test1.tab1_v15.f1,test1.tab1_v15.f2 5 Using where; Using join buffer (incremental, BNLH join)
460460
1 SIMPLE tab1_v13 hash_ALL NULL #hash#$hj 31 test1.tab1_v14.f1 5 Using where; Using join buffer (incremental, BNLH join)
461461
1 SIMPLE tab1_v12 hash_ALL NULL #hash#$hj 60 test1.tab1_v13.f1,test1.tab1_v13.f2 5 Using where; Using join buffer (incremental, BNLH join)
462-
1 SIMPLE tab1_v11 hash_ALL NULL #hash#$hj63test1.tab1_v12.f1,test1.tab1_v12.f2 5 Using where; Using join buffer (incremental, BNLH join)
462+
1 SIMPLE tab1_v11 hash_ALL NULL #hash#$hj62test1.tab1_v12.f1,test1.tab1_v12.f2 5 Using where; Using join buffer (incremental, BNLH join)
463463
1 SIMPLE tab1_v10 hash_ALL NULL #hash#$hj 31 test1.tab1_v11.f1 5 Using where; Using join buffer (incremental, BNLH join)
464464
1 SIMPLE tab1_v9 hash_ALL NULL #hash#$hj 60 test1.tab1_v10.f1,test1.tab1_v10.f2 5 Using where; Using join buffer (incremental, BNLH join)
465-
1 SIMPLE tab1_v8 hash_ALL NULL #hash#$hj63test1.tab1_v9.f1,test1.tab1_v9.f2 5 Using where; Using join buffer (incremental, BNLH join)
465+
1 SIMPLE tab1_v8 hash_ALL NULL #hash#$hj62test1.tab1_v9.f1,test1.tab1_v9.f2 5 Using where; Using join buffer (incremental, BNLH join)
466466
1 SIMPLE tab1_v7 hash_ALL NULL #hash#$hj 31 test1.tab1_v8.f1 5 Using where; Using join buffer (incremental, BNLH join)
467467
1 SIMPLE tab1_v6 hash_ALL NULL #hash#$hj 60 test1.tab1_v7.f1,test1.tab1_v7.f2 5 Using where; Using join buffer (incremental, BNLH join)
468-
1 SIMPLE tab1_v5 hash_ALL NULL #hash#$hj63test1.tab1_v6.f1,test1.tab1_v6.f2 5 Using where; Using join buffer (incremental, BNLH join)
468+
1 SIMPLE tab1_v5 hash_ALL NULL #hash#$hj62test1.tab1_v6.f1,test1.tab1_v6.f2 5 Using where; Using join buffer (incremental, BNLH join)
469469
1 SIMPLE tab1_v4 hash_ALL NULL #hash#$hj 31 test1.tab1_v5.f1 5 Using where; Using join buffer (incremental, BNLH join)
470470
1 SIMPLE tab1_v3 hash_ALL NULL #hash#$hj 60 test1.tab1_v4.f1,test1.tab1_v4.f2 5 Using where; Using join buffer (incremental, BNLH join)
471-
1 SIMPLE tab1_v2 hash_ALL NULL #hash#$hj63test1.tab1_v3.f1,test1.tab1_v3.f2 5 Using where; Using join buffer (incremental, BNLH join)
471+
1 SIMPLE tab1_v2 hash_ALL NULL #hash#$hj62test1.tab1_v3.f1,test1.tab1_v3.f2 5 Using where; Using join buffer (incremental, BNLH join)
472472
1 SIMPLE tab1_v1 hash_ALL NULL #hash#$hj 31 test1.tab1_v2.f1 5 Using where; Using join buffer (incremental, BNLH join)
473-
1 SIMPLE t1 hash_ALL NULL #hash#$hj85test1.tab1_v1.f1,test1.tab1_v1.f2 5 Using where; Using join buffer (incremental, BNLH join)
473+
1 SIMPLE t1 hash_ALL NULL #hash#$hj84test1.tab1_v1.f1,test1.tab1_v1.f2 5 Using where; Using join buffer (incremental, BNLH join)
474474
use test;
475475
drop database test1;
476476
set join_cache_level=@tmp_jcl;

mysql-test/r/derived_view.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ SELECT * FROM t1, t2, v1 WHERE t2.a=t1.a AND t2.a=v1.a AND t2.a=v1.b;
770770
id select_type table type possible_keys key key_len ref rows Extra
771771
1 PRIMARY t1 system NULL NULL NULL NULL 1
772772
1 PRIMARY t2 ref a a 4 const 1 Using index
773-
1 PRIMARY <derived2> ref key0 key010const,const 1
773+
1 PRIMARY <derived2> ref key0 key08const,const 1
774774
2 DERIVED t3 ALL NULL NULL NULL NULL 12 Using temporary; Using filesort
775775
SELECT * FROM t1, t2, v1 WHERE t2.a=t1.a AND t2.a=v1.a AND t2.a=v1.b;
776776
a a a b
@@ -1518,7 +1518,7 @@ WHERE t3.b IN (SELECT v1.b FROM v1, t2
15181518
WHERE t2.c = v1.c AND t2.c = v1.b AND v1.b = t3.c);
15191519
id select_type table type possible_keys key key_len ref rows Extra
15201520
1 PRIMARY t2 system NULL NULL NULL NULL 1
1521-
1 PRIMARY <derived3> ref key1 key110const,const 0 Start temporary
1521+
1 PRIMARY <derived3> ref key1 key18const,const 0 Start temporary
15221522
1 PRIMARY t3 ALL NULL NULL NULL NULL 2 Using where; End temporary; Using join buffer (flat, BNL join)
15231523
3 DERIVED t1 ALL NULL NULL NULL NULL 3
15241524
SELECT * FROM t3
@@ -1596,7 +1596,7 @@ EXPLAIN
15961596
SELECT v1.a FROM v1,v2 WHERE v2.b = v1.b ORDER BY 1;
15971597
id select_type table type possible_keys key key_len ref rows Extra
15981598
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 Using where; Using filesort
1599-
1 PRIMARY <derived3> ref key0 key05v1.b 2
1599+
1 PRIMARY <derived3> ref key0 key04v1.b 2
16001600
3 DERIVED t2 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort
16011601
2 DERIVED t1 ALL NULL NULL NULL NULL 3 Using temporary; Using filesort
16021602
DROP VIEW v1,v2;

mysql-test/r/select_jcl6.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4417,7 +4417,7 @@ INSERT INTO t1 VALUES
44174417
EXPLAIN SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2;
44184418
id select_type table type possible_keys key key_len ref rows Extra
44194419
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
4420-
1 SIMPLE t2 hash_ALL a #hash#$hj14test.t1.a 2 Using where; Using join buffer (flat, BNLH join)
4420+
1 SIMPLE t2 hash_ALL a #hash#$hj2test.t1.a 2 Using where; Using join buffer (flat, BNLH join)
44214421
SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2;
44224422
1
44234423
1
@@ -4427,7 +4427,7 @@ SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2;
44274427
EXPLAIN SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2 FORCE INDEX(a);
44284428
id select_type table type possible_keys key key_len ref rows Extra
44294429
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
4430-
1 SIMPLE t2 hash_ALL a #hash#$hj14test.t1.a 2 Using where; Using join buffer (flat, BNLH join)
4430+
1 SIMPLE t2 hash_ALL a #hash#$hj2test.t1.a 2 Using where; Using join buffer (flat, BNLH join)
44314431
SELECT 1 FROM t1 NATURAL LEFT JOIN t1 AS t2 FORCE INDEX(a);
44324432
1
44334433
1

mysql-test/r/subselect_extra.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ WHERE t3.b IN (SELECT v1.b FROM v1, t2
447447
WHERE t2.c = v1.c AND t2.c = v1.b AND v1.b = t3.c);
448448
id select_type table type possible_keys key key_len ref rows Extra
449449
1 PRIMARY t2 system NULL NULL NULL NULL 1
450-
1 PRIMARY <derived3> ref key1 key110const,const 0 Start temporary
450+
1 PRIMARY <derived3> ref key1 key18const,const 0 Start temporary
451451
1 PRIMARY t3 ALL NULL NULL NULL NULL 2 Using where; End temporary; Using join buffer (flat, BNL join)
452452
3 DERIVED t1 ALL NULL NULL NULL NULL 3
453453
SELECT * FROM t3

mysql-test/r/subselect_extra_no_semijoin.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ WHERE t2.c = v1.c AND t2.c = v1.b AND v1.b = t3.c);
450450
id select_type table type possible_keys key key_len ref rows Extra
451451
1 PRIMARY t3 ALL NULL NULL NULL NULL 2 Using where
452452
2 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 1
453-
2 DEPENDENT SUBQUERY <derived3> ref key1 key110const,const 0 Using where
453+
2 DEPENDENT SUBQUERY <derived3> ref key1 key18const,const 0 Using where
454454
3 DERIVED t1 ALL NULL NULL NULL NULL 3
455455
SELECT * FROM t3
456456
WHERE t3.b IN (SELECT v1.b FROM v1, t2

mysql-test/r/subselect_sj2_jcl6.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ WHERE t3.b IN (SELECT b FROM t4);
891891
id select_type table type possible_keys key key_len ref rows Extra
892892
1 PRIMARY t3 ALL NULL NULL NULL NULL 1
893893
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
894-
1 PRIMARY t2 hash_ALL NULL #hash#$hj5test.t3.a 1 Using where; Using join buffer (flat, BNLH join)
894+
1 PRIMARY t2 hash_ALL NULL #hash#$hj4test.t3.a 1 Using where; Using join buffer (flat, BNLH join)
895895
1 PRIMARY <derived3> ALL NULL NULL NULL NULL 2 Using join buffer (incremental, BNL join)
896896
2 MATERIALIZED t4 ALL NULL NULL NULL NULL 2
897897
3 DERIVED t1 ALL NULL NULL NULL NULL 1
@@ -1161,7 +1161,7 @@ id select_type table type possible_keys key key_len ref rows Extra
11611161
1 PRIMARY t1 ref PRIMARY PRIMARY 5 const 1 Using where; Using index
11621162
1 PRIMARY t2 ALL NULL NULL NULL NULL 1 Start temporary; Using join buffer (flat, BNL join)
11631163
1 PRIMARY t3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
1164-
1 PRIMARY t4 hash_index NULL #hash#$hj:PRIMARY55:59 test.t3.t3_c 2 Using where; End temporary; Using join buffer (incremental, BNLH join)
1164+
1 PRIMARY t4 hash_index NULL #hash#$hj:PRIMARY54:59 test.t3.t3_c 2 Using where; End temporary; Using join buffer (incremental, BNLH join)
11651165
DROP TABLE t1,t2,t3,t4;
11661166
#
11671167
# MDEV-6263: Wrong result when using IN subquery with order by

0 commit comments

Comments
 (0)