diff options
author | unknown <timour@askmonty.org> | 2013-03-29 17:53:21 +0200 |
---|---|---|
committer | unknown <timour@askmonty.org> | 2013-03-29 17:53:21 +0200 |
commit | 599a1384af7d38e4319bd6258c6954750f5b9ba4 (patch) | |
tree | 59be14d43461e4b717eb07c8e865e471756691b7 /mysql-test/r/subselect_innodb.result | |
parent | fa01b76be7b22b457e2f53fbceaaa371b7790491 (diff) | |
download | mariadb-git-599a1384af7d38e4319bd6258c6954750f5b9ba4.tar.gz |
Fix for MDEV-4144
Analysis:
The reason for the inefficent plan was that Item_subselect::is_expensive()
didn't detect the special case when a subquery was optimized, but had no
join plan because it either has no table, or its tables have been optimized
away, or the optimizer detected that the result set is empty.
Solution:
Identify the special cases above in the Item_subselect::is_expensive(),
and consider such degenerate subqueries inexpensive.
Diffstat (limited to 'mysql-test/r/subselect_innodb.result')
-rw-r--r-- | mysql-test/r/subselect_innodb.result | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/r/subselect_innodb.result b/mysql-test/r/subselect_innodb.result index a6967527a2d..6f8350c791f 100644 --- a/mysql-test/r/subselect_innodb.result +++ b/mysql-test/r/subselect_innodb.result @@ -331,7 +331,7 @@ SELECT SUM( c ) FROM t2 WHERE (SELECT DISTINCT b FROM t3) > 0); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1 Using where; Using index +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 3 SUBQUERY t3 ALL NULL NULL NULL NULL 1 Using temporary SELECT * |