Commit b6fd7acb authored by Sergey Petrunya's avatar Sergey Petrunya

Post-merge test result update.

parent 0d26e2cd
...@@ -1746,7 +1746,7 @@ SELECT 1 FROM (SELECT COUNT(DISTINCT c1) ...@@ -1746,7 +1746,7 @@ SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x; FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> system NULL NULL NULL NULL 1 1 PRIMARY <derived2> system NULL NULL NULL NULL 1
2 DERIVED t1 index c3,c2 c2 10 NULL 2 2 DERIVED t1 index c3,c2 c2 10 NULL 5
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (c1 REAL, c2 REAL, c3 REAL, KEY (c3), KEY (c2, c3)) CREATE TABLE t1 (c1 REAL, c2 REAL, c3 REAL, KEY (c3), KEY (c2, c3))
ENGINE=InnoDB; ENGINE=InnoDB;
...@@ -1761,7 +1761,7 @@ SELECT 1 FROM (SELECT COUNT(DISTINCT c1) ...@@ -1761,7 +1761,7 @@ SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x; FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> system NULL NULL NULL NULL 1 1 PRIMARY <derived2> system NULL NULL NULL NULL 1
2 DERIVED t1 index c3,c2 c2 18 NULL 2 2 DERIVED t1 index c3,c2 c2 18 NULL 5
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (c1 DECIMAL(12,2), c2 DECIMAL(12,2), c3 DECIMAL(12,2), CREATE TABLE t1 (c1 DECIMAL(12,2), c2 DECIMAL(12,2), c3 DECIMAL(12,2),
KEY (c3), KEY (c2, c3)) KEY (c3), KEY (c2, c3))
...@@ -1777,7 +1777,7 @@ SELECT 1 FROM (SELECT COUNT(DISTINCT c1) ...@@ -1777,7 +1777,7 @@ SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x; FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> system NULL NULL NULL NULL 1 1 PRIMARY <derived2> system NULL NULL NULL NULL 1
2 DERIVED t1 index c3,c2 c2 14 NULL 2 2 DERIVED t1 index c3,c2 c2 14 NULL 5
DROP TABLE t1; DROP TABLE t1;
End of 5.1 tests End of 5.1 tests
drop table if exists t1, t2, t3; drop table if exists t1, t2, t3;
......
...@@ -1735,6 +1735,12 @@ SELECT 1 FROM (SELECT COUNT(DISTINCT c1) ...@@ -1735,6 +1735,12 @@ SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x; FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
1 1
1 1
# MariaDB note:
# This will show 2 for table which has 5 rows.
# This is because the access method employed is actually range access
# which scans 2 records (yes, EXPLAIN displays it incorrectly).
# our correct printing is an artifact of changing in select_describe()
# from printing table->starts.records() to tab->records.
EXPLAIN EXPLAIN
SELECT 1 FROM (SELECT COUNT(DISTINCT c1) SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x; FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
...@@ -1749,6 +1755,7 @@ SELECT 1 FROM (SELECT COUNT(DISTINCT c1) ...@@ -1749,6 +1755,7 @@ SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x; FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
1 1
1 1
# See above "MariaDB note"
EXPLAIN EXPLAIN
SELECT 1 FROM (SELECT COUNT(DISTINCT c1) SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x; FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
...@@ -1764,6 +1771,7 @@ SELECT 1 FROM (SELECT COUNT(DISTINCT c1) ...@@ -1764,6 +1771,7 @@ SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x; FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
1 1
1 1
# See above "MariaDB note"
EXPLAIN EXPLAIN
SELECT 1 FROM (SELECT COUNT(DISTINCT c1) SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x; FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
......
...@@ -2256,7 +2256,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -2256,7 +2256,7 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE
a IN (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2); a IN (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 15 1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 15 Using where
1 PRIMARY t1_outer ref a a 5 <subquery2>.max(b) 1 Using index 1 PRIMARY t1_outer ref a a 5 <subquery2>.max(b) 1 Using index
2 SUBQUERY t1 index NULL a 10 NULL 15 Using index 2 SUBQUERY t1 index NULL a 10 NULL 15 Using index
EXPLAIN SELECT 1 FROM t1 AS t1_outer GROUP BY a HAVING EXPLAIN SELECT 1 FROM t1 AS t1_outer GROUP BY a HAVING
......
...@@ -2829,7 +2829,7 @@ Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<expr_cac ...@@ -2829,7 +2829,7 @@ Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<expr_cac
explain extended SELECT one,two from t1 where ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N'); explain extended SELECT one,two from t1 where ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N');
id select_type table type possible_keys key key_len ref rows filtered Extra id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 8 100.00 1 PRIMARY t1 ALL NULL NULL NULL NULL 8 100.00
1 PRIMARY subselect2 eq_ref unique_key unique_key 10 func 1 1.00 1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 10 func,func 1 100.00
2 SUBQUERY t2 ALL NULL NULL NULL NULL 9 100.00 Using where 2 SUBQUERY t2 ALL NULL NULL NULL NULL 9 100.00 Using where
Warnings: Warnings:
Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two` from `test`.`t1` semi join (`test`.`t2`) where ((`test`.`t2`.`flag` = 'N')) Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two` from `test`.`t1` semi join (`test`.`t2`) where ((`test`.`t2`.`flag` = 'N'))
...@@ -3421,7 +3421,7 @@ AAA 8 ...@@ -3421,7 +3421,7 @@ AAA 8
EXPLAIN EXPLAIN
SELECT * FROM t1 WHERE (a,b) = ANY (SELECT a, max(b) FROM t1 GROUP BY a); SELECT * FROM t1 WHERE (a,b) = ANY (SELECT a, max(b) FROM t1 GROUP BY a);
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 9 1 PRIMARY t1 ALL NULL NULL NULL NULL 9 Using where
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 23 test.t1.a,test.t1.b 1 1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 23 test.t1.a,test.t1.b 1
2 SUBQUERY t1 ALL NULL NULL NULL NULL 9 Using temporary; Using filesort 2 SUBQUERY t1 ALL NULL NULL NULL NULL 9 Using temporary; Using filesort
ALTER TABLE t1 ADD INDEX(a); ALTER TABLE t1 ADD INDEX(a);
...@@ -3433,7 +3433,7 @@ CCC 7 ...@@ -3433,7 +3433,7 @@ CCC 7
EXPLAIN EXPLAIN
SELECT * FROM t1 WHERE (a,b) = ANY (SELECT a, max(b) FROM t1 GROUP BY a); SELECT * FROM t1 WHERE (a,b) = ANY (SELECT a, max(b) FROM t1 GROUP BY a);
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 9 1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 9 Using where
1 PRIMARY t1 ref a a 8 <subquery2>.a 1 Using where 1 PRIMARY t1 ref a a 8 <subquery2>.a 1 Using where
2 SUBQUERY t1 ALL NULL NULL NULL NULL 9 Using temporary; Using filesort 2 SUBQUERY t1 ALL NULL NULL NULL NULL 9 Using temporary; Using filesort
DROP TABLE t1; DROP TABLE t1;
......
...@@ -108,7 +108,7 @@ MariaDB-5.3: this is expected to go away when FROM subquery optimizations are pu ...@@ -108,7 +108,7 @@ MariaDB-5.3: this is expected to go away when FROM subquery optimizations are pu
explain select * from v1; explain select * from v1;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
2 DERIVED t1 ALL NULL NULL NULL NULL 2 Using filesort 2 DERIVED t1 ALL NULL NULL NULL NULL 4 Using filesort
drop view v1; drop view v1;
create view v1 as select c+1 from t1 order by 1 desc limit 2; create view v1 as select c+1 from t1 order by 1 desc limit 2;
select * from v1; select * from v1;
...@@ -120,7 +120,7 @@ MariaDB-5.3: this is expected to go away when FROM subquery optimizations are pu ...@@ -120,7 +120,7 @@ MariaDB-5.3: this is expected to go away when FROM subquery optimizations are pu
explain select * from v1; explain select * from v1;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
2 DERIVED t1 ALL NULL NULL NULL NULL 2 Using filesort 2 DERIVED t1 ALL NULL NULL NULL NULL 4 Using filesort
drop view v1; drop view v1;
drop table t1; drop table t1;
create table t1 (a int, create table t1 (a int,
......
...@@ -108,7 +108,7 @@ MariaDB-5.3: this is expected to go away when FROM subquery optimizations are pu ...@@ -108,7 +108,7 @@ MariaDB-5.3: this is expected to go away when FROM subquery optimizations are pu
explain select * from v1; explain select * from v1;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
2 DERIVED t1 ALL NULL NULL NULL NULL 2 Using filesort 2 DERIVED t1 ALL NULL NULL NULL NULL 4 Using filesort
drop view v1; drop view v1;
create view v1 as select c+1 from t1 order by 1 desc limit 2; create view v1 as select c+1 from t1 order by 1 desc limit 2;
select * from v1; select * from v1;
...@@ -120,7 +120,7 @@ MariaDB-5.3: this is expected to go away when FROM subquery optimizations are pu ...@@ -120,7 +120,7 @@ MariaDB-5.3: this is expected to go away when FROM subquery optimizations are pu
explain select * from v1; explain select * from v1;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
2 DERIVED t1 ALL NULL NULL NULL NULL 2 Using filesort 2 DERIVED t1 ALL NULL NULL NULL NULL 4 Using filesort
drop view v1; drop view v1;
drop table t1; drop table t1;
create table t1 (a int, create table t1 (a int,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment