You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug#25673668 MIGRATE OPTIMIZER TESTS FROM LATIN1 TO UTF8MB4 PATCH#6
Several mtr tests have been temporarily rewritten to use latin1, convert to
utf8mb4 where applicable.
Change-Id: Iadd8c078916107a01ebb1eabec73096584f97b76
Note 1003 /* select#1 */ select min(`test`.`t1`.`a3`) AS `min(t1.a3)`,max(`test`.`t2`.`a2`) AS `max(t2.a2)` from `test`.`t1` join `test`.`t2` where (multiple equal(0, `test`.`t1`.`a2`) and multiple equal('CA', `test`.`t2`.`a3`))
441
+
Note 1003 /* select#1 */ select min(`test`.`t1`.`a3`) AS `min(t1.a3)`,max(`test`.`t2`.`a2`) AS `max(t2.a2)` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`a3` = 'CA') and multiple equal(0, `test`.`t1`.`a2`))
442
442
select min(t1.a3), max(t2.a2) from t1, t2 where t1.a2 = 0 and t2.a3 = 'CA';
443
443
min(t1.a3) max(t2.a2)
444
444
DEN San Diego
@@ -519,7 +519,7 @@ select max(a3) from t1 where a3 = 'MIN' and a2 = 2;
519
519
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
Note 1003 /* select#1 */ select max(`test`.`t1`.`a3`) AS `max(a3)` from `test`.`t1` where (multiple equal('MIN', `test`.`t1`.`a3`) and multiple equal(2, `test`.`t1`.`a2`))
522
+
Note 1003 /* select#1 */ select max(`test`.`t1`.`a3`) AS `max(a3)` from `test`.`t1` where ((`test`.`t1`.`a3` = 'MIN') and multiple equal(2, `test`.`t1`.`a2`))
523
523
select max(a3) from t1 where a3 = 'MIN' and a2 = 2;
524
524
max(a3)
525
525
MIN
@@ -528,7 +528,7 @@ select max(a3) from t1 where a3 = 'DEN' and a2 = 2;
528
528
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
Note 1003 /* select#1 */ select max(`test`.`t1`.`a3`) AS `max(a3)` from `test`.`t1` where (multiple equal('DEN', `test`.`t1`.`a3`) and multiple equal(2, `test`.`t1`.`a2`))
531
+
Note 1003 /* select#1 */ select max(`test`.`t1`.`a3`) AS `max(a3)` from `test`.`t1` where ((`test`.`t1`.`a3` = 'DEN') and multiple equal(2, `test`.`t1`.`a2`))
532
532
select max(a3) from t1 where a3 = 'DEN' and a2 = 2;
533
533
max(a3)
534
534
NULL
@@ -537,7 +537,7 @@ select max(t1.a3), min(t2.a2) from t1, t2 where t1.a2 = 2 and t1.a3 < 'MIN' and
537
537
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
Note 1003 /* select#1 */ select max(`test`.`t1`.`a3`) AS `max(t1.a3)`,min(`test`.`t2`.`a2`) AS `min(t2.a2)` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`a3` < 'MIN') and multiple equal(2, `test`.`t1`.`a2`) and multiple equal('CA', `test`.`t2`.`a3`))
540
+
Note 1003 /* select#1 */ select max(`test`.`t1`.`a3`) AS `max(t1.a3)`,min(`test`.`t2`.`a2`) AS `min(t2.a2)` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`a3` < 'MIN') and (`test`.`t2`.`a3` = 'CA') and multiple equal(2, `test`.`t1`.`a2`))
541
541
select max(t1.a3), min(t2.a2) from t1, t2 where t1.a2 = 2 and t1.a3 < 'MIN' and t2.a3 = 'CA';
542
542
max(t1.a3) min(t2.a2)
543
543
CHI Los Angeles
@@ -645,7 +645,7 @@ select min(a3) from t1 where a2 = 2 and a3 >= 'CHI' and a3 = 'MIN';
645
645
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
Note 1003 /* select#1 */ select min(`test`.`t1`.`a3`) AS `min(a3)` from `test`.`t1` where (multiple equal(2, `test`.`t1`.`a2`) and multiple equal('MIN', `test`.`t1`.`a3`))
648
+
Note 1003 /* select#1 */ select min(`test`.`t1`.`a3`) AS `min(a3)` from `test`.`t1` where ((`test`.`t1`.`a3` = 'MIN') and multiple equal(2, `test`.`t1`.`a2`))
649
649
select min(a3) from t1 where a2 = 2 and a3 >= 'CHI' and a3 = 'MIN';
650
650
min(a3)
651
651
MIN
@@ -670,13 +670,13 @@ AME AME
670
670
explain
671
671
select min(a1) from t1 where a1 > 'KKK' or a1 < 'XXX';
672
672
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
673
-
1 SIMPLE t1 NULL index PRIMARY PRIMARY 3 NULL 15 55.55 Using where; Using index
673
+
1 SIMPLE t1 NULL index PRIMARY PRIMARY 12 NULL 15 55.55 Using where; Using index
674
674
Warnings:
675
675
Note 1003 /* select#1 */ select min(`test`.`t1`.`a1`) AS `min(a1)` from `test`.`t1` where ((`test`.`t1`.`a1` > 'KKK') or (`test`.`t1`.`a1` < 'XXX'))
676
676
explain
677
677
select min(a1) from t1 where a1 != 'KKK';
678
678
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
679
-
1 SIMPLE t1 NULL index PRIMARY PRIMARY 3 NULL 15 100.00 Using where; Using index
679
+
1 SIMPLE t1 NULL index PRIMARY PRIMARY 12 NULL 15 100.00 Using where; Using index
680
680
Warnings:
681
681
Note 1003 /* select#1 */ select min(`test`.`t1`.`a1`) AS `min(a1)` from `test`.`t1` where (`test`.`t1`.`a1` <> 'KKK')
682
682
explain
@@ -688,44 +688,44 @@ Note 1003 /* select#1 */ select max(`test`.`t1`.`a3`) AS `max(a3)` from `test`.`
688
688
explain
689
689
select max(t1.a3), min(t2.a2) from t1, t2 where t1.a2 = 2 and t1.a3 < 'MIN' and t2.a3 > 'CA';
690
690
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
691
-
1 SIMPLE t1 NULL range k1 k1 7 NULL 1 100.00 Using where; Using index
692
-
1 SIMPLE t2 NULL range k1 k1 3 NULL 4 100.00 Using where; Using index; Using join buffer (Block Nested Loop)
691
+
1 SIMPLE t1 NULL range k1 k1 16 NULL 1 100.00 Using where; Using index
692
+
1 SIMPLE t2 NULL range k1 k1 9 NULL 4 100.00 Using where; Using index; Using join buffer (Block Nested Loop)
693
693
Warnings:
694
694
Note 1003 /* select#1 */ select max(`test`.`t1`.`a3`) AS `max(t1.a3)`,min(`test`.`t2`.`a2`) AS `min(t2.a2)` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`a2` = 2) and (`test`.`t1`.`a3` < 'MIN') and (`test`.`t2`.`a3` > 'CA'))
695
695
explain
696
696
select min(a4 - 0.01) from t1;
697
697
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
698
-
1 SIMPLE t1 NULL index NULL k2 12 NULL 15 100.00 Using index
698
+
1 SIMPLE t1 NULL index NULL k2 21 NULL 15 100.00 Using index
699
699
Warnings:
700
700
Note 1003 /* select#1 */ select min((`test`.`t1`.`a4` - 0.01)) AS `min(a4 - 0.01)` from `test`.`t1`
701
701
explain
702
702
select max(a4 + 0.01) from t1;
703
703
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
704
-
1 SIMPLE t1 NULL index NULL k2 12 NULL 15 100.00 Using index
704
+
1 SIMPLE t1 NULL index NULL k2 21 NULL 15 100.00 Using index
705
705
Warnings:
706
706
Note 1003 /* select#1 */ select max((`test`.`t1`.`a4` + 0.01)) AS `max(a4 + 0.01)` from `test`.`t1`
707
707
explain
708
708
select min(a3) from t1 where (a2 +1 ) is null;
709
709
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
710
-
1 SIMPLE t1 NULL index NULL k1 7 NULL 15 100.00 Using where; Using index
710
+
1 SIMPLE t1 NULL index NULL k1 16 NULL 15 100.00 Using where; Using index
711
711
Warnings:
712
712
Note 1003 /* select#1 */ select min(`test`.`t1`.`a3`) AS `min(a3)` from `test`.`t1` where isnull((`test`.`t1`.`a2` + 1))
713
713
explain
714
714
select min(a3) from t1 where (a2 + 1) = 2;
715
715
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
716
-
1 SIMPLE t1 NULL index NULL k1 7 NULL 15 100.00 Using where; Using index
716
+
1 SIMPLE t1 NULL index NULL k1 16 NULL 15 100.00 Using where; Using index
717
717
Warnings:
718
718
Note 1003 /* select#1 */ select min(`test`.`t1`.`a3`) AS `min(a3)` from `test`.`t1` where ((`test`.`t1`.`a2` + 1) = 2)
719
719
explain
720
720
select min(a3) from t1 where 2 = (a2 + 1);
721
721
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
722
-
1 SIMPLE t1 NULL index NULL k1 7 NULL 15 100.00 Using where; Using index
722
+
1 SIMPLE t1 NULL index NULL k1 16 NULL 15 100.00 Using where; Using index
723
723
Warnings:
724
724
Note 1003 /* select#1 */ select min(`test`.`t1`.`a3`) AS `min(a3)` from `test`.`t1` where (2 = (`test`.`t1`.`a2` + 1))
725
725
explain
726
726
select min(a2) from t1 where a2 < 2 * a2 - 8;
727
727
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
728
-
1 SIMPLE t1 NULL index NULL k1 7 NULL 15 33.33 Using where; Using index
728
+
1 SIMPLE t1 NULL index NULL k1 16 NULL 15 33.33 Using where; Using index
729
729
Warnings:
730
730
Note 1003 /* select#1 */ select min(`test`.`t1`.`a2`) AS `min(a2)` from `test`.`t1` where (`test`.`t1`.`a2` < ((2 * `test`.`t1`.`a2`) - 8))
731
731
explain
@@ -737,14 +737,14 @@ Note 1003 /* select#1 */ select min(`test`.`t1`.`a1`) AS `min(a1)` from `test`.`
737
737
explain
738
738
select min(a4) from t1 where (a4 + 0.01) between 0.07 and 0.08;
739
739
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
740
-
1 SIMPLE t1 NULL index NULL k2 12 NULL 15 100.00 Using where; Using index
740
+
1 SIMPLE t1 NULL index NULL k2 21 NULL 15 100.00 Using where; Using index
741
741
Warnings:
742
742
Note 1003 /* select#1 */ select min(`test`.`t1`.`a4`) AS `min(a4)` from `test`.`t1` where ((`test`.`t1`.`a4` + 0.01) between 0.07 and 0.08)
743
743
explain
744
744
select concat(min(t1.a1),min(t2.a4)) from t1, t2 where t2.a4 <> 'AME';
745
745
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
746
-
1 SIMPLE t2 NULL range k2 k2 4 NULL 6 100.00 Using where; Using index
747
-
1 SIMPLE t1 NULL index NULL PRIMARY 3 NULL 15 100.00 Using index; Using join buffer (Block Nested Loop)
746
+
1 SIMPLE t2 NULL range k2 k2 13 NULL 6 100.00 Using where; Using index
747
+
1 SIMPLE t1 NULL index NULL PRIMARY 12 NULL 15 100.00 Using index; Using join buffer (Block Nested Loop)
748
748
Warnings:
749
749
Note 1003 /* select#1 */ select concat(min(`test`.`t1`.`a1`),min(`test`.`t2`.`a4`)) AS `concat(min(t1.a1),min(t2.a4))` from `test`.`t1` join `test`.`t2` where (`test`.`t2`.`a4` <> 'AME')
750
750
drop table t1, t2;
@@ -764,21 +764,21 @@ show create table t1;
764
764
Table Create Table
765
765
t1 CREATE TABLE `t1` (
766
766
`a` char(1) CHARACTER SET latin2 DEFAULT NULL
767
-
) ENGINE=MyISAM DEFAULT CHARSET=latin1
767
+
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4
768
768
create table t2 select max(a),min(a) from t1;
769
769
show create table t2;
770
770
Table Create Table
771
771
t2 CREATE TABLE `t2` (
772
772
`max(a)` char(1) CHARACTER SET latin2 DEFAULT NULL,
773
773
`min(a)` char(1) CHARACTER SET latin2 DEFAULT NULL
774
-
) ENGINE=MyISAM DEFAULT CHARSET=latin1
774
+
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4
775
775
drop table t2;
776
776
create table t2 select concat(a) from t1;
777
777
show create table t2;
778
778
Table Create Table
779
779
t2 CREATE TABLE `t2` (
780
780
`concat(a)` varchar(1) CHARACTER SET latin2 DEFAULT NULL
781
-
) ENGINE=MyISAM DEFAULT CHARSET=latin1
781
+
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4
782
782
drop table t2,t1;
783
783
create table t1 (a int);
784
784
insert into t1 values (1);
@@ -867,7 +867,7 @@ show create table t2;
867
867
Table Create Table
868
868
t2 CREATE TABLE `t2` (
869
869
`MAX(b)` datetime DEFAULT NULL
870
-
) ENGINE=MyISAM DEFAULT CHARSET=latin1
870
+
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4
871
871
drop table t1, t2;
872
872
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
873
873
Warnings:
@@ -1031,7 +1031,7 @@ select col1,sum(col1),max(col1),min(col1) from t1 group by col1;
0 commit comments