From: Marc Alff Date: January 28 2011 12:49pm Subject: bzr push into mysql-trunk branch (marc.alff:3564 to 3566) List-Archive: http://lists.mysql.com/commits/129859 Message-Id: <201101281250.p0SCoNJ7024254@rcsinet13.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3566 Marc Alff 2011-01-28 Fixed compiler warning modified: storage/perfschema/pfs_column_types.h 3565 Marc Alff 2011-01-28 Bug#59740 Performance schema test failures on freebsd Changed the tests status from disabled to experimental, to maintain the test coverage on non affected platforms. modified: mysql-test/collections/default.experimental mysql-test/suite/perfschema/t/disabled.def 3564 Olav Sandstaa 2011-01-28 Fix for Bug#58838 Wrong results with HAVING + LIMIT without GROUP BY when ICP is enabled. The wrong result was caused due to "loosing" the HAVING condition when changing to use a different index than originally selected by the optimizer. During the optimization phase it was decided to use a secondary index for retrieving data from the table. Since ICP was enabled the WHERE condition was pushed down to the storage engine. A copy of the WHERE condition was kept in the JOINTAB's pre_idx_push_select_cond member. In the start of the execution phase it was determined that the HAVING condition could be included in the JOINTAB's select condition. Then in test_if_skip_sort_order() we (since part of the select condition has been pushed down to the storage engine) replace the JOINTAB's select condition with the original select condition (found in the pre_idx_push_select_cond member). Since test_if_skip_sort_order() determines that is will be less costly to use the primary key for doing the retrieval of data (due to LIMIT) it changes to use the primary key. If it had not changed index then test_if_skip_sort_order() would have restored the select condition to what it was when it was called. But due to changing index the part of the select condition that has been pushed down must also be included in the select condition. To achieve this the condition in pre_idx_push_select_cond is kept as the JOINTAB's select condition. This does not include the HAVING condition and as a result the HAVING condition is no longer part of the JOINTAB's select condition. The fix for this problem: When adding the HAVING condition to the JOINTAB's select condition also add it to the pre_idx_push_select_cond (if this exists). @ mysql-test/include/icp_tests.inc Test case for Bug#58838 "Wrong results with HAVING + LIMIT without GROUP BY when ICP is enabled". @ mysql-test/r/innodb_icp.result Test case for Bug#58838 "Wrong results with HAVING + LIMIT without GROUP BY when ICP is enabled". @ mysql-test/r/innodb_icp_all.result Test case for Bug#58838 "Wrong results with HAVING + LIMIT without GROUP BY when ICP is enabled". @ mysql-test/r/innodb_icp_none.result Test case for Bug#58838 "Wrong results with HAVING + LIMIT without GROUP BY when ICP is enabled". @ mysql-test/r/myisam_icp.result Test case for Bug#58838 "Wrong results with HAVING + LIMIT without GROUP BY when ICP is enabled". @ mysql-test/r/myisam_icp_all.result Test case for Bug#58838 "Wrong results with HAVING + LIMIT without GROUP BY when ICP is enabled". @ mysql-test/r/myisam_icp_none.result Test case for Bug#58838 "Wrong results with HAVING + LIMIT without GROUP BY when ICP is enabled". @ sql/sql_select.cc When including the HAVING condition as part of the JOINTAB's select condition it should also be added to the original select condition (stored in pre_idx_push_select_cond) if parts of the select condition has been pushed down to the storage engine. This is necessary since the pre_idx_push_select_cond is used in test_if_skip_sort_order() and might replace the select condition in the cases where test_if_skip_sort_order() decides to change to use a different index for retrieving data. modified: mysql-test/include/icp_tests.inc mysql-test/r/innodb_icp.result mysql-test/r/innodb_icp_all.result mysql-test/r/innodb_icp_none.result mysql-test/r/myisam_icp.result mysql-test/r/myisam_icp_all.result mysql-test/r/myisam_icp_none.result sql/sql_select.cc === modified file 'mysql-test/collections/default.experimental' --- a/mysql-test/collections/default.experimental 2011-01-26 15:50:00 +0000 +++ b/mysql-test/collections/default.experimental 2011-01-28 12:46:03 +0000 @@ -43,5 +43,45 @@ main.type_newdecimal # Not a test, utility to troubleshoot test failures # Flagged as experimental since output will vary -perfschema.debug_env # Bug#59740 2011-02-26 Marc Alff, script needed to investigate the failure +perfschema.debug_env # Bug#59740 2011-02-26 Marc Alff, script needed to investigate the failure + +perfschema.ortho_iter # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.event_aggregate # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_aggregate_off # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_aggregate_global_2u_2t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_aggregate_global_2u_3t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_aggregate_global_4u_2t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_aggregate_global_4u_3t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_aggregate_hist_2u_2t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_aggregate_hist_2u_3t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_aggregate_hist_4u_2t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_aggregate_hist_4u_3t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_aggregate_thread_2u_2t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_aggregate_thread_2u_3t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_aggregate_thread_4u_2t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_aggregate_thread_4u_3t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_io_aggregate_global_2u_2t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_io_aggregate_global_2u_3t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_io_aggregate_global_4u_2t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_io_aggregate_global_4u_3t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_io_aggregate_hist_2u_2t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_io_aggregate_hist_2u_3t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_io_aggregate_hist_4u_2t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_io_aggregate_hist_4u_3t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_io_aggregate_thread_2u_2t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_io_aggregate_thread_2u_3t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_io_aggregate_thread_4u_2t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_io_aggregate_thread_4u_3t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_lock_aggregate_global_2u_2t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_lock_aggregate_global_2u_3t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_lock_aggregate_global_4u_2t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_lock_aggregate_global_4u_3t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_lock_aggregate_hist_2u_2t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_lock_aggregate_hist_2u_3t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_lock_aggregate_hist_4u_2t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_lock_aggregate_hist_4u_3t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_lock_aggregate_thread_2u_2t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_lock_aggregate_thread_2u_3t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_lock_aggregate_thread_4u_2t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD +perfschema.table_lock_aggregate_thread_4u_3t # BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD === modified file 'mysql-test/suite/perfschema/t/disabled.def' --- a/mysql-test/suite/perfschema/t/disabled.def 2011-01-26 14:41:43 +0000 +++ b/mysql-test/suite/perfschema/t/disabled.def 2011-01-28 12:46:03 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -25,41 +25,3 @@ # ############################################################################## -ortho_iter : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_aggregate_global_2u_2t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_aggregate_global_2u_3t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_aggregate_global_4u_2t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_aggregate_global_4u_3t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_aggregate_hist_2u_2t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_aggregate_hist_2u_3t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_aggregate_hist_4u_2t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_aggregate_hist_4u_3t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_aggregate_thread_2u_2t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_aggregate_thread_2u_3t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_aggregate_thread_4u_2t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_aggregate_thread_4u_3t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_io_aggregate_global_2u_2t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_io_aggregate_global_2u_3t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_io_aggregate_global_4u_2t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_io_aggregate_global_4u_3t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_io_aggregate_hist_2u_2t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_io_aggregate_hist_2u_3t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_io_aggregate_hist_4u_2t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_io_aggregate_hist_4u_3t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_io_aggregate_thread_2u_2t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_io_aggregate_thread_2u_3t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_io_aggregate_thread_4u_2t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_io_aggregate_thread_4u_3t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_lock_aggregate_global_2u_2t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_lock_aggregate_global_2u_3t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_lock_aggregate_global_4u_2t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_lock_aggregate_global_4u_3t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_lock_aggregate_hist_2u_2t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_lock_aggregate_hist_2u_3t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_lock_aggregate_hist_4u_2t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_lock_aggregate_hist_4u_3t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_lock_aggregate_thread_2u_2t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_lock_aggregate_thread_2u_3t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_lock_aggregate_thread_4u_2t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD -table_lock_aggregate_thread_4u_3t : BUG#59740 2011-02-26 Marc Alff Test fails on FreeBSD - === modified file 'storage/perfschema/pfs_column_types.h' --- a/storage/perfschema/pfs_column_types.h 2010-12-09 16:17:13 +0000 +++ b/storage/perfschema/pfs_column_types.h 2011-01-28 12:49:11 +0000 @@ -135,7 +135,7 @@ enum enum_operation_type OPERATION_TYPE_TL_WRITE_LOW_PRIORITY= 37, OPERATION_TYPE_TL_WRITE_NORMAL= 38, OPERATION_TYPE_TL_READ_EXTERNAL= 39, - OPERATION_TYPE_TL_WRITE_EXTERNAL= 40, + OPERATION_TYPE_TL_WRITE_EXTERNAL= 40 }; #define FIRST_OPERATION_TYPE (static_cast (OPERATION_TYPE_LOCK)) #define LAST_OPERATION_TYPE (static_cast (OPERATION_TYPE_TL_WRITE_EXTERNAL)) No bundle (reason: useless for push emails).