diff options
34 files changed, 194 insertions, 194 deletions
diff --git a/mysql-test/r/analyze_stmt_privileges2.result b/mysql-test/r/analyze_stmt_privileges2.result index 892791dd8f8..cf38810b598 100644 --- a/mysql-test/r/analyze_stmt_privileges2.result +++ b/mysql-test/r/analyze_stmt_privileges2.result @@ -1452,7 +1452,7 @@ id select_type table type possible_keys key key_len ref rows r_rows filtered r_f DELETE FROM t1 USING t1, t2; EXPLAIN DELETE FROM t1 USING t1, t2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 Const row not found 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 ANALYZE DELETE FROM t1 USING t1, t2; id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra @@ -1797,7 +1797,7 @@ id select_type table type possible_keys key key_len ref rows r_rows filtered r_f DELETE FROM t1 USING t1, t2; EXPLAIN DELETE FROM t1 USING t1, t2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 Const row not found 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 ANALYZE DELETE FROM t1 USING t1, t2; id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra @@ -1813,7 +1813,7 @@ SELECT * FROM t1; a b EXPLAIN SELECT * FROM t1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 Const row not found ANALYZE SELECT * FROM t1; id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL no matching row in const table diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index 220fd5a8c74..32184c5637b 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -896,34 +896,34 @@ WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_N A.DIVISION=C1.DIVISION AND A.RECEIVABLE_GROUP=C1.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=C1.CREDIT_LIMIT ORDER BY TOTAL DESC; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived3> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived4> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived5> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived6> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived7> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived8> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived9> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived10> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived11> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived12> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived13> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived14> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived15> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived16> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived17> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived18> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived19> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived20> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived21> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived22> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived23> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived24> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived25> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived26> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived27> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived28> system NULL NULL NULL NULL 0 const row not found -1 PRIMARY <derived29> system NULL NULL NULL NULL 0 const row not found +1 PRIMARY <derived2> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived3> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived4> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived5> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived6> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived7> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived8> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived9> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived10> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived11> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived12> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived13> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived14> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived15> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived16> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived17> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived18> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived19> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived20> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived21> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived22> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived23> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived24> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived25> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived26> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived27> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived28> system NULL NULL NULL NULL 0 Const row not found +1 PRIMARY <derived29> system NULL NULL NULL NULL 0 Const row not found 29 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table 28 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table 27 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table diff --git a/mysql-test/r/derived_view.result b/mysql-test/r/derived_view.result index 9221c6240bd..d3c9fc1e064 100644 --- a/mysql-test/r/derived_view.result +++ b/mysql-test/r/derived_view.result @@ -2014,7 +2014,7 @@ SELECT t.b, t.c, t1.a FROM t1, (SELECT t2.b, t2.c FROM t3 RIGHT JOIN t2 ON t2.a = t3.b) AS t WHERE t.b AND t.c = t1.a; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t3 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t3 system NULL NULL NULL NULL 0 0.00 Const row not found 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join) Warnings: @@ -2029,7 +2029,7 @@ SELECT t.b, t.c, t1.a FROM t1, (SELECT t2.b, t2.c FROM t3 RIGHT JOIN t2 ON t2.a = t3.b) AS t WHERE t.b <> 0 AND t.c = t1.a; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t3 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t3 system NULL NULL NULL NULL 0 0.00 Const row not found 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join) Warnings: diff --git a/mysql-test/r/explain.result b/mysql-test/r/explain.result index 97e49af96d4..f593e0dfaba 100644 --- a/mysql-test/r/explain.result +++ b/mysql-test/r/explain.result @@ -2,7 +2,7 @@ drop table if exists t1; create table t1 (id int not null, str char(10), unique(str)); explain select * from t1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 Const row not found insert into t1 values (1, null),(2, null),(3, "foo"),(4, "bar"); select * from t1 where str is null; id str @@ -218,8 +218,8 @@ EXPLAIN EXTENDED SELECT 1 FROM t1 WHERE f1 > ALL( SELECT t.f1 FROM t1,t1 AS t ); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables -2 SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found -2 SUBQUERY t system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found +2 SUBQUERY t system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select 1 AS `1` from `test`.`t1` where 0 SET SESSION sql_mode=@old_sql_mode; @@ -387,7 +387,7 @@ set optimizer_switch='derived_merge=off,derived_with_keys=off'; EXPLAIN EXTENDED SELECT * FROM ( SELECT t1.a FROM t1,t2 WHERE t2.a = t1.a ) AS t; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY <derived2> system NULL NULL NULL NULL 0 0.00 const row not found +1 PRIMARY <derived2> system NULL NULL NULL NULL 0 0.00 Const row not found 2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL no matching row in const table Warnings: Note 1003 /* select#1 */ select NULL AS `a` from (/* select#2 */ select NULL AS `a` from `test`.`t1` where 0) `t` diff --git a/mysql-test/r/explain_json.result b/mysql-test/r/explain_json.result index d7cdeac499e..fd342606b3f 100644 --- a/mysql-test/r/explain_json.result +++ b/mysql-test/r/explain_json.result @@ -1204,7 +1204,7 @@ create table t1 (i int) engine=myisam; explain select * from t1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 Const row not found explain format=json select * from t1; EXPLAIN diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index 3340328cad6..9f3928615ec 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -2066,7 +2066,7 @@ HAVING ('m') IN ( SELECT v FROM t2); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found +1 PRIMARY <derived2> system NULL NULL NULL NULL 0 Const row not found 3 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table set optimizer_switch=@tmp_optimizer_switch; diff --git a/mysql-test/r/func_group_innodb.result b/mysql-test/r/func_group_innodb.result index e340c04107d..27493ae710b 100644 --- a/mysql-test/r/func_group_innodb.result +++ b/mysql-test/r/func_group_innodb.result @@ -125,14 +125,14 @@ select 1, max(1) from t1i where 1=99; 1 NULL explain select count(*), min(7), max(7) from t1m, t1i; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1m system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t1m system NULL NULL NULL NULL 0 Const row not found 1 SIMPLE t1i ALL NULL NULL NULL NULL 1 select count(*), min(7), max(7) from t1m, t1i; count(*) min(7) max(7) 0 NULL NULL explain select count(*), min(7), max(7) from t1m, t2i; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1m system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t1m system NULL NULL NULL NULL 0 Const row not found 1 SIMPLE t2i ALL NULL NULL NULL NULL 1 select count(*), min(7), max(7) from t1m, t2i; count(*) min(7) max(7) diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index b1862d46613..7389eeed5d7 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -1340,12 +1340,12 @@ DROP TABLE t1; create table t1(f1 varchar(4)); explain extended select encode(f1,'zxcv') as 'enc' from t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 select encode(NULL,'zxcv') AS `enc` from `test`.`t1` explain extended select decode(f1,'zxcv') as 'enc' from t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 select decode(NULL,'zxcv') AS `enc` from `test`.`t1` drop table t1; diff --git a/mysql-test/r/join_nested.result b/mysql-test/r/join_nested.result index 917a31e2a79..708c72fffb5 100644 --- a/mysql-test/r/join_nested.result +++ b/mysql-test/r/join_nested.result @@ -1321,7 +1321,7 @@ c11 c21 5 NULL EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON c11=c21; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t2 system NULL NULL NULL NULL 0 Const row not found 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 SELECT * FROM t1 LEFT JOIN (t2 LEFT JOIN t3 ON c21=c31) ON c11=c21; c11 c21 c31 diff --git a/mysql-test/r/join_nested_jcl6.result b/mysql-test/r/join_nested_jcl6.result index 1ffd94547cc..eb59531b7d2 100644 --- a/mysql-test/r/join_nested_jcl6.result +++ b/mysql-test/r/join_nested_jcl6.result @@ -1332,7 +1332,7 @@ c11 c21 5 NULL EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON c11=c21; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t2 system NULL NULL NULL NULL 0 Const row not found 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 SELECT * FROM t1 LEFT JOIN (t2 LEFT JOIN t3 ON c21=c31) ON c11=c21; c11 c21 c31 diff --git a/mysql-test/r/limit_rows_examined.result b/mysql-test/r/limit_rows_examined.result index c94599235b1..7d1ca948c8b 100644 --- a/mysql-test/r/limit_rows_examined.result +++ b/mysql-test/r/limit_rows_examined.result @@ -98,11 +98,11 @@ create table t0 (c0 int); explain select * from t0 LIMIT ROWS EXAMINED 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t0 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t0 system NULL NULL NULL NULL 0 Const row not found explain select * from t0 LIMIT ROWS EXAMINED 1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t0 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t0 system NULL NULL NULL NULL 0 Const row not found select * from t0 LIMIT ROWS EXAMINED 1; c0 drop table t0; @@ -592,7 +592,7 @@ create table t3_empty like t3; explain select max(c1) from t3_empty LIMIT ROWS EXAMINED 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3_empty system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t3_empty system NULL NULL NULL NULL 0 Const row not found select max(c1) from t3_empty LIMIT ROWS EXAMINED 0; max(c1) NULL diff --git a/mysql-test/r/myisam_explain_non_select_all.result b/mysql-test/r/myisam_explain_non_select_all.result index 12c5e627f7a..09e662f5d6a 100644 --- a/mysql-test/r/myisam_explain_non_select_all.result +++ b/mysql-test/r/myisam_explain_non_select_all.result @@ -2184,13 +2184,13 @@ INSERT INTO t1 VALUES (1, 1, 10), (2, 2, 20); # EXPLAIN UPDATE t1 LEFT JOIN t2 ON t1.c1 = t2.c1 SET t2.c2 = 10; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t2 system NULL NULL NULL NULL 0 Const row not found 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 FLUSH STATUS; FLUSH TABLES; EXPLAIN EXTENDED UPDATE t1 LEFT JOIN t2 ON t1.c1 = t2.c1 SET t2.c2 = 10; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t2 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t2 system NULL NULL NULL NULL 0 0.00 Const row not found 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 # Status of EXPLAIN EXTENDED query Variable_name Value @@ -2199,7 +2199,7 @@ FLUSH STATUS; FLUSH TABLES; EXPLAIN EXTENDED SELECT * FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t2 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t2 system NULL NULL NULL NULL 0 0.00 Const row not found 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Warnings: Note 1003 select `test`.`t1`.`c1` AS `c1`,`test`.`t1`.`c2` AS `c2`,`test`.`t1`.`c3` AS `c3`,NULL AS `c1`,NULL AS `c2` from `test`.`t1` @@ -2219,13 +2219,13 @@ Handler_read_rnd_next 4 # EXPLAIN UPDATE t1 LEFT JOIN t2 ON t1.c1 = t2.c1 SET t2.c2 = 10 WHERE t1.c3 = 10; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t2 system NULL NULL NULL NULL 0 Const row not found 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where FLUSH STATUS; FLUSH TABLES; EXPLAIN EXTENDED UPDATE t1 LEFT JOIN t2 ON t1.c1 = t2.c1 SET t2.c2 = 10 WHERE t1.c3 = 10; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t2 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t2 system NULL NULL NULL NULL 0 0.00 Const row not found 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where # Status of EXPLAIN EXTENDED query Variable_name Value @@ -2234,7 +2234,7 @@ FLUSH STATUS; FLUSH TABLES; EXPLAIN EXTENDED SELECT * FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c3 = 10; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t2 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t2 system NULL NULL NULL NULL 0 0.00 Const row not found 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: Note 1003 select `test`.`t1`.`c1` AS `c1`,`test`.`t1`.`c2` AS `c2`,`test`.`t1`.`c3` AS `c3`,NULL AS `c1`,NULL AS `c2` from `test`.`t1` where `test`.`t1`.`c3` = 10 @@ -2571,12 +2571,12 @@ CREATE VIEW v1 (x) AS SELECT b FROM t2; # EXPLAIN INSERT INTO v1 SELECT * FROM t1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 Const row not found FLUSH STATUS; FLUSH TABLES; EXPLAIN EXTENDED INSERT INTO v1 SELECT * FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 Const row not found # Status of EXPLAIN EXTENDED query Variable_name Value Handler_read_rnd_next 1 @@ -2584,7 +2584,7 @@ FLUSH STATUS; FLUSH TABLES; EXPLAIN EXTENDED SELECT * FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 select NULL AS `a` from `test`.`t1` # Status of EXPLAIN EXTENDED "equivalent" SELECT query execution @@ -2781,7 +2781,7 @@ CREATE TABLE t2 (id INT); INSERT INTO t1 VALUES (1), (2); EXPLAIN SELECT * FROM t1 LEFT JOIN t2 USING(id) GROUP BY t1.id; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 system NULL NULL NULL NULL 0 const row not found; Using temporary; Using filesort +1 SIMPLE t2 system NULL NULL NULL NULL 0 Const row not found; Using temporary; Using filesort 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 DROP TABLE t1,t2; #74 @@ -2879,7 +2879,7 @@ CALL p16(); DROP PROCEDURE p16; CALL p15(); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 Const row not found DROP PROCEDURE p15; CALL p14(); DROP PROCEDURE p14; diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index 5a9f2fae1e0..946ecb51426 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -2635,7 +2635,7 @@ SELECT t1.*, t2.* FROM t1 JOIN t2 ON t1.i1 = t2.i2 LEFT JOIN t3 ON t2.i2 = t3.i3 ORDER BY t1.i1 LIMIT 5; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t3 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t3 system NULL NULL NULL NULL 0 0.00 Const row not found 1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 5 100.00 Using index 1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.i1 1 100.00 Using index Warnings: diff --git a/mysql-test/r/outfile.result b/mysql-test/r/outfile.result Binary files differindex cafa9d9db4d..4c439c37e4d 100644 --- a/mysql-test/r/outfile.result +++ b/mysql-test/r/outfile.result diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result index 0fb24b74218..dc5221a9245 100644 --- a/mysql-test/r/partition_pruning.result +++ b/mysql-test/r/partition_pruning.result @@ -3136,7 +3136,7 @@ drop table t2; create table t1 (s1 int); explain partitions select 1 from t1 union all select 2; id select_type table partitions type possible_keys key key_len ref rows Extra -1 PRIMARY t1 NULL system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t1 NULL system NULL NULL NULL NULL 0 Const row not found 2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used drop table t1; create table t1 (a bigint unsigned not null) partition by range(a) ( diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index eb9b1d16011..bb8703b4185 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -235,7 +235,7 @@ select benchmark(1,1) from t1; benchmark(1,1) explain extended select benchmark(1,1) from t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 select benchmark(1,1) AS `benchmark(1,1)` from `test`.`t1` show status like "Qcache_queries_in_cache"; diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 1c1758c83b8..4b7aecd675d 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2330,7 +2330,7 @@ insert into t4 values (1,1); explain select * from t1 left join t2 on id1 = id2 left join t3 on id1 = id3 left join t4 on id3 = id4 where id2 = 1 or id4 = 1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t3 system NULL NULL NULL NULL 0 Const row not found 1 SIMPLE t4 const id4 NULL NULL NULL 1 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 1 SIMPLE t2 ALL NULL NULL NULL NULL 1 Using where @@ -4660,17 +4660,17 @@ DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL); EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND b=b AND c=c) OR b > 20; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 select NULL AS `a`,NULL AS `b`,NULL AS `c` from `test`.`t1` where 1 EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND a=a AND b=b) OR b > 20; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 select NULL AS `a`,NULL AS `b`,NULL AS `c` from `test`.`t1` where 1 EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND b=b AND a=a) OR b > 20; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 select NULL AS `a`,NULL AS `b`,NULL AS `c` from `test`.`t1` where 1 DROP TABLE t1; diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result index 8462e19fda8..2c37c2d28d8 100644 --- a/mysql-test/r/select_found.result +++ b/mysql-test/r/select_found.result @@ -83,7 +83,7 @@ UNIQUE KEY e_n (email,name) ); EXPLAIN SELECT SQL_CALC_FOUND_ROWS DISTINCT email FROM t2 LEFT JOIN t1 ON kid = t2.id WHERE t1.id IS NULL LIMIT 10; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system PRIMARY,kid NULL NULL NULL 0 const row not found; Using temporary +1 SIMPLE t1 system PRIMARY,kid NULL NULL NULL 0 Const row not found; Using temporary 1 SIMPLE t2 ALL NULL NULL NULL NULL 200 SELECT SQL_CALC_FOUND_ROWS DISTINCT email FROM t2 LEFT JOIN t1 ON kid = t2.id WHERE t1.id IS NULL LIMIT 10; email diff --git a/mysql-test/r/select_jcl6.result b/mysql-test/r/select_jcl6.result index fdfb472a32e..e548da79774 100644 --- a/mysql-test/r/select_jcl6.result +++ b/mysql-test/r/select_jcl6.result @@ -2341,7 +2341,7 @@ insert into t4 values (1,1); explain select * from t1 left join t2 on id1 = id2 left join t3 on id1 = id3 left join t4 on id3 = id4 where id2 = 1 or id4 = 1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t3 system NULL NULL NULL NULL 0 Const row not found 1 SIMPLE t4 const id4 NULL NULL NULL 1 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 1 SIMPLE t2 hash_ALL NULL #hash#$hj 4 test.t1.id1 1 Using where; Using join buffer (flat, BNLH join) @@ -4671,17 +4671,17 @@ DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL); EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND b=b AND c=c) OR b > 20; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 select NULL AS `a`,NULL AS `b`,NULL AS `c` from `test`.`t1` where 1 EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND a=a AND b=b) OR b > 20; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 select NULL AS `a`,NULL AS `b`,NULL AS `c` from `test`.`t1` where 1 EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND b=b AND a=a) OR b > 20; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 select NULL AS `a`,NULL AS `b`,NULL AS `c` from `test`.`t1` where 1 DROP TABLE t1; diff --git a/mysql-test/r/select_pkeycache.result b/mysql-test/r/select_pkeycache.result index 1c1758c83b8..4b7aecd675d 100644 --- a/mysql-test/r/select_pkeycache.result +++ b/mysql-test/r/select_pkeycache.result @@ -2330,7 +2330,7 @@ insert into t4 values (1,1); explain select * from t1 left join t2 on id1 = id2 left join t3 on id1 = id3 left join t4 on id3 = id4 where id2 = 1 or id4 = 1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t3 system NULL NULL NULL NULL 0 Const row not found 1 SIMPLE t4 const id4 NULL NULL NULL 1 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 1 SIMPLE t2 ALL NULL NULL NULL NULL 1 Using where @@ -4660,17 +4660,17 @@ DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL); EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND b=b AND c=c) OR b > 20; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 select NULL AS `a`,NULL AS `b`,NULL AS `c` from `test`.`t1` where 1 EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND a=a AND b=b) OR b > 20; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 select NULL AS `a`,NULL AS `b`,NULL AS `c` from `test`.`t1` where 1 EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND b=b AND a=a) OR b > 20; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 select NULL AS `a`,NULL AS `b`,NULL AS `c` from `test`.`t1` where 1 DROP TABLE t1; diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 7ba8b545e6a..8e46fa91c2c 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -1161,20 +1161,20 @@ drop table t1; CREATE TABLE t1 (a int(1)); EXPLAIN EXTENDED SELECT (SELECT RAND() FROM t1) FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found -2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 Const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select (/* select#2 */ select rand() from `test`.`t1`) AS `(SELECT RAND() FROM t1)` from `test`.`t1` EXPLAIN EXTENDED SELECT (SELECT ENCRYPT('test') FROM t1) FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found -2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 Const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select (/* select#2 */ select encrypt('test') from `test`.`t1`) AS `(SELECT ENCRYPT('test') FROM t1)` from `test`.`t1` EXPLAIN EXTENDED SELECT (SELECT BENCHMARK(1,1) FROM t1) FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found -2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 Const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select (/* select#2 */ select benchmark(1,1) from `test`.`t1`) AS `(SELECT BENCHMARK(1,1) FROM t1)` from `test`.`t1` drop table t1; @@ -1644,7 +1644,7 @@ a explain extended select * from t3 where a >= all (select b from t2); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select max(NULL) from `test`.`t2`) > <cache>(`test`.`t3`.`a`))) select * from t3 where a >= some (select b from t2); @@ -1652,7 +1652,7 @@ a explain extended select * from t3 where a >= some (select b from t2); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select min(NULL) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))) select * from t3 where a >= all (select b from t2 group by 1); @@ -1663,7 +1663,7 @@ a explain extended select * from t3 where a >= all (select b from t2 group by 1); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select max(NULL) from `test`.`t2`) > <cache>(`test`.`t3`.`a`))) select * from t3 where a >= some (select b from t2 group by 1); @@ -1671,7 +1671,7 @@ a explain extended select * from t3 where a >= some (select b from t2 group by 1); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select min(NULL) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))) select * from t3 where NULL >= any (select b from t2); @@ -3734,7 +3734,7 @@ from t1' at line 1 explain select * from t1 where not exists ((select t11.i from t1 t11) union (select t12.i from t1 t12)); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table 3 UNION NULL NULL NULL NULL NULL NULL NULL no matching row in const table NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL @@ -6120,7 +6120,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 Const row not found SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR @@ -6134,7 +6134,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3 ) AS alias3; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found +1 PRIMARY <derived2> system NULL NULL NULL NULL 0 Const row not found 2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM ( SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 @@ -6720,7 +6720,7 @@ CREATE TABLE t2 (b INT); EXPLAIN SELECT SUM(a) AS f1, a AS f2 FROM (t1, t2) HAVING f2 >= ALL (SELECT 4 UNION SELECT 5) AND f1 = 7; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t2 system NULL NULL NULL NULL 0 Const row not found 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used 3 UNION NULL NULL NULL NULL NULL NULL NULL No tables used diff --git a/mysql-test/r/subselect4.result b/mysql-test/r/subselect4.result index 6126a7ed3f5..d3f46429cf7 100644 --- a/mysql-test/r/subselect4.result +++ b/mysql-test/r/subselect4.result @@ -21,7 +21,7 @@ ORDER BY count(*); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 index NULL a 5 NULL 2 Using index 2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where -3 DEPENDENT SUBQUERY t3 system NULL NULL NULL NULL 0 const row not found +3 DEPENDENT SUBQUERY t3 system NULL NULL NULL NULL 0 Const row not found # should not crash the next statement SELECT 1 FROM t1 WHERE NOT EXISTS (SELECT 1 FROM t2 WHERE 1 = (SELECT MIN(t2.b) FROM t3)) @@ -1261,7 +1261,7 @@ SET optimizer_switch='materialization=off'; EXPLAIN SELECT * FROM t1 RIGHT JOIN t2 ON t1.c1 WHERE 's' IN (SELECT c1 FROM t2); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found 1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where; FirstMatch(t1) 1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join) SELECT * FROM t1 RIGHT JOIN t2 ON t1.c1 WHERE 's' IN (SELECT c1 FROM t2); @@ -1269,7 +1269,7 @@ c1 c1 EXPLAIN SELECT * FROM t2 LEFT JOIN t1 ON t1.c1 WHERE 's' IN (SELECT c1 FROM t2); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found 1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where; FirstMatch(t1) 1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join) SELECT * FROM t2 LEFT JOIN t1 ON t1.c1 WHERE 's' IN (SELECT c1 FROM t2); @@ -1278,7 +1278,7 @@ SET optimizer_switch='materialization=on'; EXPLAIN SELECT * FROM (t2 LEFT JOIN t1 ON t1.c1) LEFT JOIN t3 on t3.c1 WHERE 's' IN (SELECT c1 FROM t2); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found 1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join) 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 Using where @@ -2191,7 +2191,7 @@ INSERT INTO t2 VALUES (1); EXPLAIN SELECT MAX(a), ( SELECT 1 FROM t2 ) AS bb FROM t1; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found 2 SUBQUERY t2 system NULL NULL NULL NULL 1 SELECT MAX(a), ( SELECT 1 FROM t2 ) AS bb FROM t1; MAX(a) bb @@ -2199,7 +2199,7 @@ NULL 1 EXPLAIN SELECT MAX(a), 1 in ( SELECT b FROM t2 ) AS bb FROM t1; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found 2 SUBQUERY t2 system NULL NULL NULL NULL 1 SELECT MAX(a), 1 in ( SELECT b FROM t2 ) AS bb FROM t1; MAX(a) bb @@ -2207,7 +2207,7 @@ NULL 1 EXPLAIN SELECT MAX(a), 1 >= ALL ( SELECT b FROM t2 ) AS bb FROM t1; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables SELECT MAX(a), 1 >= ALL ( SELECT b FROM t2 ) AS bb FROM t1; MAX(a) bb @@ -2215,7 +2215,7 @@ NULL 1 EXPLAIN SELECT MAX(a), ( SELECT 1 FROM t2 where b = a) AS bb FROM t1; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables SELECT MAX(a), ( SELECT 1 FROM t2 where b = a) AS bb FROM t1; MAX(a) bb @@ -2223,7 +2223,7 @@ NULL NULL EXPLAIN SELECT MAX(a), a in ( SELECT b FROM t2 ) AS bb FROM t1; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found 2 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 1 SELECT MAX(a), a in ( SELECT b FROM t2 ) AS bb FROM t1; MAX(a) bb @@ -2231,7 +2231,7 @@ NULL NULL EXPLAIN SELECT MAX(a), a >= ALL ( SELECT b FROM t2 ) AS bb FROM t1; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found 2 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 1 SELECT MAX(a), a >= ALL ( SELECT b FROM t2 ) AS bb FROM t1; MAX(a) bb diff --git a/mysql-test/r/subselect_mat.result b/mysql-test/r/subselect_mat.result index 350275d2463..6b5db62093e 100644 --- a/mysql-test/r/subselect_mat.result +++ b/mysql-test/r/subselect_mat.result @@ -2544,7 +2544,7 @@ SELECT i FROM t1 LEFT JOIN t2 ON (j) IN (SELECT k FROM t3); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 system NULL NULL NULL NULL 1 1 PRIMARY t2 ALL NULL NULL NULL NULL 1 Using where -2 MATERIALIZED t3 system NULL NULL NULL NULL 0 const row not found +2 MATERIALIZED t3 system NULL NULL NULL NULL 0 Const row not found SELECT i FROM t1 LEFT JOIN t2 ON (j) IN (SELECT k FROM t3); i 10 @@ -2553,7 +2553,7 @@ SELECT i FROM t1 LEFT JOIN t2 ON (j) IN (SELECT max(k) FROM t3); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 system NULL NULL NULL NULL 1 1 PRIMARY t2 ALL NULL NULL NULL NULL 1 Using where -2 MATERIALIZED t3 system NULL NULL NULL NULL 0 const row not found +2 MATERIALIZED t3 system NULL NULL NULL NULL 0 Const row not found SELECT i FROM t1 LEFT JOIN t2 ON (j) IN (SELECT max(k) FROM t3); i 10 diff --git a/mysql-test/r/subselect_mat_cost_bugs.result b/mysql-test/r/subselect_mat_cost_bugs.result index b4feb8de200..125da8da517 100644 --- a/mysql-test/r/subselect_mat_cost_bugs.result +++ b/mysql-test/r/subselect_mat_cost_bugs.result @@ -162,7 +162,7 @@ EXPLAIN SELECT * FROM (SELECT * FROM t2) AS a2 WHERE (SELECT distinct SUM(distinct f3 ) FROM t1); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found +1 PRIMARY <derived2> system NULL NULL NULL NULL 0 Const row not found 3 SUBQUERY t1 index NULL f3 5 NULL 2 Using index 2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table insert into t2 values (1),(2); diff --git a/mysql-test/r/subselect_no_exists_to_in.result b/mysql-test/r/subselect_no_exists_to_in.result index c09f3c94710..51fe0aa80df 100644 --- a/mysql-test/r/subselect_no_exists_to_in.result +++ b/mysql-test/r/subselect_no_exists_to_in.result @@ -1165,20 +1165,20 @@ drop table t1; CREATE TABLE t1 (a int(1)); EXPLAIN EXTENDED SELECT (SELECT RAND() FROM t1) FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found -2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 Const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select (/* select#2 */ select rand() from `test`.`t1`) AS `(SELECT RAND() FROM t1)` from `test`.`t1` EXPLAIN EXTENDED SELECT (SELECT ENCRYPT('test') FROM t1) FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found -2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 Const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select (/* select#2 */ select encrypt('test') from `test`.`t1`) AS `(SELECT ENCRYPT('test') FROM t1)` from `test`.`t1` EXPLAIN EXTENDED SELECT (SELECT BENCHMARK(1,1) FROM t1) FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found -2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 Const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select (/* select#2 */ select benchmark(1,1) from `test`.`t1`) AS `(SELECT BENCHMARK(1,1) FROM t1)` from `test`.`t1` drop table t1; @@ -1648,7 +1648,7 @@ a explain extended select * from t3 where a >= all (select b from t2); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select max(NULL) from `test`.`t2`) > <cache>(`test`.`t3`.`a`))) select * from t3 where a >= some (select b from t2); @@ -1656,7 +1656,7 @@ a explain extended select * from t3 where a >= some (select b from t2); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select min(NULL) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))) select * from t3 where a >= all (select b from t2 group by 1); @@ -1667,7 +1667,7 @@ a explain extended select * from t3 where a >= all (select b from t2 group by 1); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select max(NULL) from `test`.`t2`) > <cache>(`test`.`t3`.`a`))) select * from t3 where a >= some (select b from t2 group by 1); @@ -1675,7 +1675,7 @@ a explain extended select * from t3 where a >= some (select b from t2 group by 1); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select min(NULL) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))) select * from t3 where NULL >= any (select b from t2); @@ -3737,7 +3737,7 @@ from t1' at line 1 explain select * from t1 where not exists ((select t11.i from t1 t11) union (select t12.i from t1 t12)); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table 3 UNION NULL NULL NULL NULL NULL NULL NULL no matching row in const table NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL @@ -6120,7 +6120,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 Const row not found SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR @@ -6134,7 +6134,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3 ) AS alias3; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found +1 PRIMARY <derived2> system NULL NULL NULL NULL 0 Const row not found 2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM ( SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 @@ -6720,7 +6720,7 @@ CREATE TABLE t2 (b INT); EXPLAIN SELECT SUM(a) AS f1, a AS f2 FROM (t1, t2) HAVING f2 >= ALL (SELECT 4 UNION SELECT 5) AND f1 = 7; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t2 system NULL NULL NULL NULL 0 Const row not found 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used 3 UNION NULL NULL NULL NULL NULL NULL NULL No tables used diff --git a/mysql-test/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result index 0aefeaf44d9..6381e1939db 100644 --- a/mysql-test/r/subselect_no_mat.result +++ b/mysql-test/r/subselect_no_mat.result @@ -1168,20 +1168,20 @@ drop table t1; CREATE TABLE t1 (a int(1)); EXPLAIN EXTENDED SELECT (SELECT RAND() FROM t1) FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found -2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 Const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select (/* select#2 */ select rand() from `test`.`t1`) AS `(SELECT RAND() FROM t1)` from `test`.`t1` EXPLAIN EXTENDED SELECT (SELECT ENCRYPT('test') FROM t1) FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found -2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 Const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select (/* select#2 */ select encrypt('test') from `test`.`t1`) AS `(SELECT ENCRYPT('test') FROM t1)` from `test`.`t1` EXPLAIN EXTENDED SELECT (SELECT BENCHMARK(1,1) FROM t1) FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found -2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 Const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select (/* select#2 */ select benchmark(1,1) from `test`.`t1`) AS `(SELECT BENCHMARK(1,1) FROM t1)` from `test`.`t1` drop table t1; @@ -1651,7 +1651,7 @@ a explain extended select * from t3 where a >= all (select b from t2); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select max(NULL) from `test`.`t2`) > <cache>(`test`.`t3`.`a`))) select * from t3 where a >= some (select b from t2); @@ -1659,7 +1659,7 @@ a explain extended select * from t3 where a >= some (select b from t2); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select min(NULL) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))) select * from t3 where a >= all (select b from t2 group by 1); @@ -1670,7 +1670,7 @@ a explain extended select * from t3 where a >= all (select b from t2 group by 1); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select max(NULL) from `test`.`t2`) > <cache>(`test`.`t3`.`a`))) select * from t3 where a >= some (select b from t2 group by 1); @@ -1678,7 +1678,7 @@ a explain extended select * from t3 where a >= some (select b from t2 group by 1); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select min(NULL) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))) select * from t3 where NULL >= any (select b from t2); @@ -3737,7 +3737,7 @@ from t1' at line 1 explain select * from t1 where not exists ((select t11.i from t1 t11) union (select t12.i from t1 t12)); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table 3 UNION NULL NULL NULL NULL NULL NULL NULL no matching row in const table NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL @@ -6115,7 +6115,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 Const row not found SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR @@ -6129,7 +6129,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3 ) AS alias3; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found +1 PRIMARY <derived2> system NULL NULL NULL NULL 0 Const row not found 2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM ( SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 @@ -6715,7 +6715,7 @@ CREATE TABLE t2 (b INT); EXPLAIN SELECT SUM(a) AS f1, a AS f2 FROM (t1, t2) HAVING f2 >= ALL (SELECT 4 UNION SELECT 5) AND f1 = 7; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t2 system NULL NULL NULL NULL 0 Const row not found 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used 3 UNION NULL NULL NULL NULL NULL NULL NULL No tables used diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result index 92defb3c36d..1a56c333887 100644 --- a/mysql-test/r/subselect_no_opts.result +++ b/mysql-test/r/subselect_no_opts.result @@ -1164,20 +1164,20 @@ drop table t1; CREATE TABLE t1 (a int(1)); EXPLAIN EXTENDED SELECT (SELECT RAND() FROM t1) FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found -2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 Const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select (/* select#2 */ select rand() from `test`.`t1`) AS `(SELECT RAND() FROM t1)` from `test`.`t1` EXPLAIN EXTENDED SELECT (SELECT ENCRYPT('test') FROM t1) FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found -2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 Const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select (/* select#2 */ select encrypt('test') from `test`.`t1`) AS `(SELECT ENCRYPT('test') FROM t1)` from `test`.`t1` EXPLAIN EXTENDED SELECT (SELECT BENCHMARK(1,1) FROM t1) FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found -2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 Const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select (/* select#2 */ select benchmark(1,1) from `test`.`t1`) AS `(SELECT BENCHMARK(1,1) FROM t1)` from `test`.`t1` drop table t1; @@ -1647,7 +1647,7 @@ a explain extended select * from t3 where a >= all (select b from t2); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select max(NULL) from `test`.`t2`) > <cache>(`test`.`t3`.`a`))) select * from t3 where a >= some (select b from t2); @@ -1655,7 +1655,7 @@ a explain extended select * from t3 where a >= some (select b from t2); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select min(NULL) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))) select * from t3 where a >= all (select b from t2 group by 1); @@ -1666,7 +1666,7 @@ a explain extended select * from t3 where a >= all (select b from t2 group by 1); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select max(NULL) from `test`.`t2`) > <cache>(`test`.`t3`.`a`))) select * from t3 where a >= some (select b from t2 group by 1); @@ -1674,7 +1674,7 @@ a explain extended select * from t3 where a >= some (select b from t2 group by 1); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select min(NULL) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))) select * from t3 where NULL >= any (select b from t2); @@ -3733,7 +3733,7 @@ from t1' at line 1 explain select * from t1 where not exists ((select t11.i from t1 t11) union (select t12.i from t1 t12)); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table 3 UNION NULL NULL NULL NULL NULL NULL NULL no matching row in const table NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL @@ -6111,7 +6111,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 Const row not found SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR @@ -6125,7 +6125,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3 ) AS alias3; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found +1 PRIMARY <derived2> system NULL NULL NULL NULL 0 Const row not found 2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM ( SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 @@ -6711,7 +6711,7 @@ CREATE TABLE t2 (b INT); EXPLAIN SELECT SUM(a) AS f1, a AS f2 FROM (t1, t2) HAVING f2 >= ALL (SELECT 4 UNION SELECT 5) AND f1 = 7; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t2 system NULL NULL NULL NULL 0 Const row not found 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used 3 UNION NULL NULL NULL NULL NULL NULL NULL No tables used diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result index b47dab2e79e..26aee4269b6 100644 --- a/mysql-test/r/subselect_no_scache.result +++ b/mysql-test/r/subselect_no_scache.result @@ -1167,20 +1167,20 @@ drop table t1; CREATE TABLE t1 (a int(1)); EXPLAIN EXTENDED SELECT (SELECT RAND() FROM t1) FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found -2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 Const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select (/* select#2 */ select rand() from `test`.`t1`) AS `(SELECT RAND() FROM t1)` from `test`.`t1` EXPLAIN EXTENDED SELECT (SELECT ENCRYPT('test') FROM t1) FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found -2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 Const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select (/* select#2 */ select encrypt('test') from `test`.`t1`) AS `(SELECT ENCRYPT('test') FROM t1)` from `test`.`t1` EXPLAIN EXTENDED SELECT (SELECT BENCHMARK(1,1) FROM t1) FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found -2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 Const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select (/* select#2 */ select benchmark(1,1) from `test`.`t1`) AS `(SELECT BENCHMARK(1,1) FROM t1)` from `test`.`t1` drop table t1; @@ -1650,7 +1650,7 @@ a explain extended select * from t3 where a >= all (select b from t2); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select max(NULL) from `test`.`t2`) > <cache>(`test`.`t3`.`a`))) select * from t3 where a >= some (select b from t2); @@ -1658,7 +1658,7 @@ a explain extended select * from t3 where a >= some (select b from t2); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select min(NULL) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))) select * from t3 where a >= all (select b from t2 group by 1); @@ -1669,7 +1669,7 @@ a explain extended select * from t3 where a >= all (select b from t2 group by 1); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select max(NULL) from `test`.`t2`) > <cache>(`test`.`t3`.`a`))) select * from t3 where a >= some (select b from t2 group by 1); @@ -1677,7 +1677,7 @@ a explain extended select * from t3 where a >= some (select b from t2 group by 1); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select min(NULL) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))) select * from t3 where NULL >= any (select b from t2); @@ -3740,7 +3740,7 @@ from t1' at line 1 explain select * from t1 where not exists ((select t11.i from t1 t11) union (select t12.i from t1 t12)); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table 3 UNION NULL NULL NULL NULL NULL NULL NULL no matching row in const table NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL @@ -6126,7 +6126,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 Const row not found SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR @@ -6140,7 +6140,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3 ) AS alias3; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found +1 PRIMARY <derived2> system NULL NULL NULL NULL 0 Const row not found 2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM ( SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 @@ -6726,7 +6726,7 @@ CREATE TABLE t2 (b INT); EXPLAIN SELECT SUM(a) AS f1, a AS f2 FROM (t1, t2) HAVING f2 >= ALL (SELECT 4 UNION SELECT 5) AND f1 = 7; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t2 system NULL NULL NULL NULL 0 Const row not found 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used 3 UNION NULL NULL NULL NULL NULL NULL NULL No tables used diff --git a/mysql-test/r/subselect_no_semijoin.result b/mysql-test/r/subselect_no_semijoin.result index 9d04ddd9829..e962add85c8 100644 --- a/mysql-test/r/subselect_no_semijoin.result +++ b/mysql-test/r/subselect_no_semijoin.result @@ -1164,20 +1164,20 @@ drop table t1; CREATE TABLE t1 (a int(1)); EXPLAIN EXTENDED SELECT (SELECT RAND() FROM t1) FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found -2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 Const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select (/* select#2 */ select rand() from `test`.`t1`) AS `(SELECT RAND() FROM t1)` from `test`.`t1` EXPLAIN EXTENDED SELECT (SELECT ENCRYPT('test') FROM t1) FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found -2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 Const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select (/* select#2 */ select encrypt('test') from `test`.`t1`) AS `(SELECT ENCRYPT('test') FROM t1)` from `test`.`t1` EXPLAIN EXTENDED SELECT (SELECT BENCHMARK(1,1) FROM t1) FROM t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found -2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 Const row not found +2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select (/* select#2 */ select benchmark(1,1) from `test`.`t1`) AS `(SELECT BENCHMARK(1,1) FROM t1)` from `test`.`t1` drop table t1; @@ -1647,7 +1647,7 @@ a explain extended select * from t3 where a >= all (select b from t2); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select max(NULL) from `test`.`t2`) > <cache>(`test`.`t3`.`a`))) select * from t3 where a >= some (select b from t2); @@ -1655,7 +1655,7 @@ a explain extended select * from t3 where a >= some (select b from t2); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select min(NULL) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))) select * from t3 where a >= all (select b from t2 group by 1); @@ -1666,7 +1666,7 @@ a explain extended select * from t3 where a >= all (select b from t2 group by 1); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select max(NULL) from `test`.`t2`) > <cache>(`test`.`t3`.`a`))) select * from t3 where a >= some (select b from t2 group by 1); @@ -1674,7 +1674,7 @@ a explain extended select * from t3 where a >= some (select b from t2 group by 1); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where -2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found +2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(/* select#2 */ select min(NULL) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))) select * from t3 where NULL >= any (select b from t2); @@ -3733,7 +3733,7 @@ from t1' at line 1 explain select * from t1 where not exists ((select t11.i from t1 t11) union (select t12.i from t1 t12)); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 Const row not found 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table 3 UNION NULL NULL NULL NULL NULL NULL NULL no matching row in const table NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL @@ -6111,7 +6111,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE sq4_alias1 system NULL NULL NULL NULL 0 Const row not found SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR @@ -6125,7 +6125,7 @@ FROM t1 AS sq4_alias1 WHERE (sq4_alias1.col_varchar_key + NULL) IS NULL OR sq4_alias1.col_varchar_key = @var3 ) AS alias3; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found +1 PRIMARY <derived2> system NULL NULL NULL NULL 0 Const row not found 2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM ( SELECT @var3:=12, sq4_alias1.* FROM t1 AS sq4_alias1 @@ -6711,7 +6711,7 @@ CREATE TABLE t2 (b INT); EXPLAIN SELECT SUM(a) AS f1, a AS f2 FROM (t1, t2) HAVING f2 >= ALL (SELECT 4 UNION SELECT 5) AND f1 = 7; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY t2 system NULL NULL NULL NULL 0 Const row not found 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used 3 UNION NULL NULL NULL NULL NULL NULL NULL No tables used diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index b193f032146..9ec3b1056fd 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -1634,8 +1634,8 @@ UNION SELECT a FROM t1 ORDER BY a; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found -2 UNION t1 system NULL NULL NULL NULL 0 0.00 const row not found +1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 Const row not found +2 UNION t1 system NULL NULL NULL NULL 0 0.00 Const row not found NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort Warnings: Note 1003 /* select#1 */ select NULL AS `a` from `test`.`t1` union /* select#2 */ select NULL AS `a` from `test`.`t1` order by `a` diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 2d442fe90a9..120a13254a0 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -2934,10 +2934,10 @@ CREATE TABLE t1 (s1 int); CREATE VIEW v1 AS SELECT * FROM t1; EXPLAIN SELECT * FROM t1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 Const row not found EXPLAIN SELECT * FROM v1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 Const row not found INSERT INTO t1 VALUES (1), (3), (2); EXPLAIN SELECT * FROM t1 t WHERE t.s1+1 < (SELECT MAX(t1.s1) FROM t1); id select_type table type possible_keys key key_len ref rows Extra @@ -4609,7 +4609,7 @@ WHERE t4.a >= t1.a); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t2 system NULL NULL NULL NULL 1 100.00 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where -2 DEPENDENT SUBQUERY t3 system NULL NULL NULL NULL 0 0.00 const row not found +2 DEPENDENT SUBQUERY t3 system NULL NULL NULL NULL 0 0.00 Const row not found 2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 @@ -4625,7 +4625,7 @@ WHERE t4.a >= v1.a); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t2 system NULL NULL NULL NULL 1 100.00 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 Using where -2 DEPENDENT SUBQUERY t3 system NULL NULL NULL NULL 0 0.00 const row not found +2 DEPENDENT SUBQUERY t3 system NULL NULL NULL NULL 0 0.00 Const row not found 2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: Note 1276 Field or reference 'v1.a' of SELECT #2 was resolved in SELECT #1 @@ -4657,7 +4657,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 system NULL NULL NULL NULL 1 100.00 1 PRIMARY t4 ALL NULL NULL NULL NULL 2 100.00 Using where 2 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 1 100.00 -2 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +2 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1276 Field or reference 'test.t4.b' of SELECT #2 was resolved in SELECT #1 Note 1003 /* select#1 */ select 0 AS `c`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t4`.`c` AS `c` from `test`.`t4` where `test`.`t4`.`c` <= <expr_cache><`test`.`t4`.`b`>((/* select#2 */ select 0 from dual where 7 > `test`.`t4`.`b`)) @@ -4674,7 +4674,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t3 system NULL NULL NULL NULL 1 100.00 1 PRIMARY t4 ALL NULL NULL NULL NULL 2 100.00 Using where 2 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 1 100.00 -2 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 const row not found +2 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 0 0.00 Const row not found Warnings: Note 1276 Field or reference 'v4.b' of SELECT #2 was resolved in SELECT #1 Note 1003 /* select#1 */ select 0 AS `c`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t4`.`c` AS `c` from `test`.`t4` where `test`.`t4`.`c` <= <expr_cache><`test`.`t4`.`b`>((/* select#2 */ select 0 from dual where 7 > `test`.`t4`.`b`)) diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result index 04ad19c5ddc..82594128d85 100644 --- a/mysql-test/r/view_grant.result +++ b/mysql-test/r/view_grant.result @@ -144,7 +144,7 @@ revoke select on mysqltest.v5 from mysqltest_1@localhost; connection user1; explain select c from mysqltest.v1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 Const row not found show create view mysqltest.v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest`.`v1` AS select `mysqltest`.`t1`.`a` + 1 AS `c`,`mysqltest`.`t1`.`b` + 1 AS `d` from `mysqltest`.`t1` latin1 latin1_swedish_ci @@ -167,13 +167,13 @@ grant show view on mysqltest.* to mysqltest_1@localhost; connection user1; explain select c from mysqltest.v1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 Const row not found show create view mysqltest.v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest`.`v1` AS select `mysqltest`.`t1`.`a` + 1 AS `c`,`mysqltest`.`t1`.`b` + 1 AS `d` from `mysqltest`.`t1` latin1 latin1_swedish_ci explain select c from mysqltest.v2; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found +1 PRIMARY <derived2> system NULL NULL NULL NULL 0 Const row not found 2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table show create view mysqltest.v2; View Create View character_set_client collation_connection @@ -1190,7 +1190,7 @@ select * from v1; i explain select * from v1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 Const row not found disconnect test11765687; ... as eugene connect test11765687,localhost,eugene,,mysqltest1; @@ -1238,12 +1238,12 @@ select k from t3; k explain select k from t3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t3 system NULL NULL NULL NULL 0 Const row not found select * from v3; k explain select * from v3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t3 system NULL NULL NULL NULL 0 Const row not found disconnect test11765687; ... as inga connect test11765687,localhost,inga,,mysqltest1; @@ -1284,8 +1284,8 @@ select * from v2; i j explain select * from v2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found -1 SIMPLE t2 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t1 system NULL NULL NULL NULL 0 Const row not found +1 SIMPLE t2 system NULL NULL NULL NULL 0 Const row not found disconnect test11765687; ... as noam connect test11765687,localhost,noam,,mysqltest1; diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result index cdfdbad9e20..3663c18ea44 100644 --- a/mysql-test/suite/innodb/r/innodb_mysql.result +++ b/mysql-test/suite/innodb/r/innodb_mysql.result @@ -238,14 +238,14 @@ select 1, max(1) from t1i where 1=99; 1 NULL explain select count(*), min(7), max(7) from t1m, t1i; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1m system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t1m system NULL NULL NULL NULL 0 Const row not found 1 SIMPLE t1i ALL NULL NULL NULL NULL 1 select count(*), min(7), max(7) from t1m, t1i; count(*) min(7) max(7) 0 NULL NULL explain select count(*), min(7), max(7) from t1m, t2i; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1m system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t1m system NULL NULL NULL NULL 0 Const row not found 1 SIMPLE t2i ALL NULL NULL NULL NULL 1 select count(*), min(7), max(7) from t1m, t2i; count(*) min(7) max(7) @@ -1853,7 +1853,7 @@ explain select b from t1 where a not in (select max(b) from t1,t2 group by a) group by a; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables -2 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 0 const row not found +2 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 0 Const row not found 2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 set optimizer_switch=@save_optimizer_switch; DROP TABLE t1,t2; diff --git a/sql/sql_explain.cc b/sql/sql_explain.cc index 660d68427d1..fed38a5f4f4 100644 --- a/sql/sql_explain.cc +++ b/sql/sql_explain.cc @@ -1813,9 +1813,9 @@ const char * extra_tag_text[]= "Using join buffer", // special handling - "const row not found", - "unique row not found", - "Impossible ON condition" + "Const row not found", + "Unique row not found", + "Impossible ON condition", }; |