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
Copy file name to clipboardExpand all lines: mysql-test/r/derived_view.result
+48-9Lines changed: 48 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -513,8 +513,6 @@ f1 f11
513
513
3 3
514
514
5 5
515
515
mat in merged derived join mat in merged derived
516
-
set @save_optimizer_switch=@@optimizer_switch;
517
-
set optimizer_switch='condition_pushdown_for_derived=off';
518
516
explain extended select * from
519
517
(select * from (select * from t1 where f1 < 7 group by f1) tt where f1 > 2) x
520
518
join
@@ -526,7 +524,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
526
524
5 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using where; Using temporary; Using filesort
527
525
3 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using where; Using temporary; Using filesort
528
526
Warnings:
529
-
Note 1003 select `tt`.`f1` AS `f1`,`tt`.`f11` AS `f11`,`tt`.`f1` AS `f1`,`tt`.`f11` AS `f11` from (select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f11` AS `f11` from `test`.`t1` where (`test`.`t1`.`f1` < 7) group by `test`.`t1`.`f1`) `tt` join (select `t1`.`f1` AS `f1`,`t1`.`f11` AS `f11` from `test`.`t1` where (`t1`.`f1` < 7) group by `t1`.`f1`) `tt` where ((`tt`.`f1` = `tt`.`f1`) and (`tt`.`f1` > 2) and (`tt`.`f1` > 2))
527
+
Note 1003 select `tt`.`f1` AS `f1`,`tt`.`f11` AS `f11`,`tt`.`f1` AS `f1`,`tt`.`f11` AS `f11` from (select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f11` AS `f11` from `test`.`t1` where ((`test`.`t1`.`f1` < 7) and (`test`.`t1`.`f1` > 2) and (`test`.`t1`.`f1` > 2)) group by `test`.`t1`.`f1`) `tt` join (select `t1`.`f1` AS `f1`,`t1`.`f11` AS `f11` from `test`.`t1` where ((`t1`.`f1` < 7) and (`t1`.`f1` > 2) and (`t1`.`f1` > 2)) group by `t1`.`f1`) `tt` where ((`tt`.`f1` = `tt`.`f1`) and (`tt`.`f1` > 2) and (`tt`.`f1` > 2))
530
528
explain format=json select * from
531
529
(select * from (select * from t1 where f1 < 7 group by f1) tt where f1 > 2) x
532
530
join
@@ -553,7 +551,7 @@ EXPLAIN
553
551
"access_type": "ALL",
554
552
"rows": 11,
555
553
"filtered": 100,
556
-
"attached_condition": "(t1.f1 < 7)"
554
+
"attached_condition": "((t1.f1 < 7) and (t1.f1 > 2) and (t1.f1 > 2))"
557
555
}
558
556
}
559
557
}
@@ -581,7 +579,7 @@ EXPLAIN
581
579
"access_type": "ALL",
582
580
"rows": 11,
583
581
"filtered": 100,
584
-
"attached_condition": "(t1.f1 < 7)"
582
+
"attached_condition": "((t1.f1 < 7) and (t1.f1 > 2) and (t1.f1 > 2))"
585
583
}
586
584
}
587
585
}
@@ -606,11 +604,10 @@ Handler_read_key 2
606
604
Handler_read_last 0
607
605
Handler_read_next 2
608
606
Handler_read_prev 0
609
-
Handler_read_rnd 8
607
+
Handler_read_rnd 4
610
608
Handler_read_rnd_deleted 0
611
-
Handler_read_rnd_next 39
609
+
Handler_read_rnd_next 33
612
610
flush status;
613
-
set optimizer_switch=@save_optimizer_switch;
614
611
merged in merged derived join merged in merged derived
615
612
explain extended select * from
616
613
(select * from
@@ -857,9 +854,51 @@ explain extended select * from v6 join v7 on f2=f1;
857
854
id select_type table type possible_keys key key_len ref rows filtered Extra
858
855
1 PRIMARY t2 ALL NULL NULL NULL NULL 11 100.00 Using where
5 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using temporary; Using filesort
857
+
5 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using where; Using temporary; Using filesort
861
858
Warnings:
862
859
Note 1003 select `test`.`t2`.`f2` AS `f2`,`test`.`t2`.`f22` AS `f22`,`v1`.`f1` AS `f1`,`v1`.`f11` AS `f11` from `test`.`t2` join `test`.`v1` where ((`v1`.`f1` = `test`.`t2`.`f2`) and (`test`.`t2`.`f2` < 7) and (`test`.`t2`.`f2` in (2,3)))
860
+
explain format=json select * from v6 join v7 on f2=f1;
861
+
EXPLAIN
862
+
{
863
+
"query_block": {
864
+
"select_id": 1,
865
+
"table": {
866
+
"table_name": "t2",
867
+
"access_type": "ALL",
868
+
"rows": 11,
869
+
"filtered": 100,
870
+
"attached_condition": "((t2.f2 < 7) and (t2.f2 in (2,3)) and (t2.f2 is not null))"
0 commit comments