summaryrefslogtreecommitdiff
path: root/mysql-test/r/subselect3.result
diff options
context:
space:
mode:
authorunknown <timour@askmonty.org>2012-10-25 15:50:10 +0300
committerunknown <timour@askmonty.org>2012-10-25 15:50:10 +0300
commit97a1c53c8141d473b87dc8048c19868e8531db9e (patch)
tree2f37d05240ae6a31eb059d88a3886944b64d4d5a /mysql-test/r/subselect3.result
parent797082ca712f52437571e24962e26573d0723ad1 (diff)
downloadmariadb-git-97a1c53c8141d473b87dc8048c19868e8531db9e.tar.gz
MDEV-3812: Remove unneeded extra call to engine->exec() in Item_subselect::exec, remove enum store_key_result
This task fixes an ineffeciency that is a remainder from MySQL 5.0/5.1. There, subqueries were optimized in a lazy manner, when executed for the first time. During this lazy optimization it may happen that the server finds a more efficient subquery engine, and substitute the current engine of the query being executed with the new engine. This required re-execution of the engine. MariaDB 5.3 pre-optimizes subqueries in almost all cases, and the engine is chosen in most cases, except when subquery materialization found that it must use partial matching. In this case, the current code was performing one extra re-execution although it was not needed at all. The patch performs the re-execution only if the engine was changed while executing. In addition the patch performs small cleanup by removing "enum store_key_result" because it is essentially a boolean, and the code that uses it already maps it to a boolean.
Diffstat (limited to 'mysql-test/r/subselect3.result')
-rw-r--r--mysql-test/r/subselect3.result2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/r/subselect3.result b/mysql-test/r/subselect3.result
index b33e7e113f2..049c4d14b1a 100644
--- a/mysql-test/r/subselect3.result
+++ b/mysql-test/r/subselect3.result
@@ -126,7 +126,7 @@ Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
-Handler_read_rnd_next 50
+Handler_read_rnd_next 41
select 'No key lookups, seq reads: 29= 5 reads from t2 + 4 * 6 reads from t1.' Z;
Z
No key lookups, seq reads: 29= 5 reads from t2 + 4 * 6 reads from t1.