4218 Ole John Aske 2011-02-22
Added missing file from previous commit.
4217 Ole John Aske 2011-02-22
Baseline fix for Bug#11766256: GREEDY OPTIMIZER PRODUCE STUPID QUERY EXECUTION PLANS
(Fix has been cherry picked for backporting from mysql-trunk to mysql-5.1-telco-7.0)
Extend greedy_optimizer.test creating a new baseline before commiting
real fixes for this bug.
Test has been enhanced to both explain the optimized query plan *and*
execute it and report total number of 'Handler_reads%' during
Handler_reads is believed to be a fairly good metric on how optimal the
query plan was.
=== added file 'mysql-test/include/execute_with_statistics.inc'
--- a/mysql-test/include/execute_with_statistics.inc 1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/execute_with_statistics.inc 2011-02-22 17:44:38 +0000
@@ -0,0 +1,28 @@
+# Explain and execute the select statment in $query.
+# Then report 'Last_query_cost' estimate from the query
+# optimizer and total number of 'Handler_read%' when the
+# query was executed.
+# Intended usage is to verify that there are not regressions
+# in either calculated or actuall cost for $query.
+# let $query= <select statement>;
+# --source include/execute_with_statistics.inc
+eval EXPLAIN $query;
+SHOW STATUS LIKE 'Last_query_cost';
+SELECT SUM(variable_value) AS Total_handler_reads
+ FROM information_schema.session_status
+ WHERE variable_name LIKE 'Handler_read%';
No bundle (reason: useless for push emails).
|• bzr push into mysql-5.1-telco-7.0 branch (ole.john.aske:4217 to 4218) ||Ole John Aske||22 Feb|