From: Ole John Aske Date: February 17 2011 11:38am Subject: bzr push into mysql-trunk branch (ole.john.aske:3662 to 3663) Bug#11766256 List-Archive: http://lists.mysql.com/commits/131519 X-Bug: 11766256 Message-Id: <20110217113853.40E64223@fimafeng09.norway.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3663 Ole John Aske 2011-02-17 Baseline fix for Bug#11766256: GREEDY OPTIMIZER PRODUCE STUPID QUERY EXECUTION PLANS 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 execution. Handler_reads is believed to be a fairly good metric on how optimal the query plan was. added: mysql-test/include/execute_with_statistics.inc modified: mysql-test/r/greedy_optimizer.result mysql-test/t/greedy_optimizer.test 3662 Tor Didriksen 2011-02-17 [merge] merge 5.5 => trunk modified: mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test === 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-17 11:38:07 +0000 @@ -0,0 +1,28 @@ +# include/execute_with_statistics.inc +# +# SUMMARY +# +# 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. +# +# USAGE +# +# let $query=