From: Tor Didriksen Date: January 27 2012 11:16am Subject: bzr push into mysql-trunk branch (tor.didriksen:3532 to 3533) WL#5957 List-Archive: http://lists.mysql.com/commits/142599 Message-Id: <201201271116.q0RBGnBD003082@acsmt358.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3533 Tor Didriksen 2012-01-27 WL#5957 post-push fix: dont count_bits unless we are going to use them modified: sql/handler.cc 3532 Guilhem Bichot 2012-01-26 Final review comments for Bug#13596330 - EXTRA ROW ON SELECT WITH NESTED IN CLAUSE + IS NULL WHEN SEMIJOIN + BNL IS ON @ mysql-test/include/join_cache.inc make the test engine-agnostic (I verified that it would still fail without the code fix) modified: mysql-test/include/join_cache.inc mysql-test/r/join_cache_bka.result mysql-test/r/join_cache_bka_nixbnl.result mysql-test/r/join_cache_bkaunique.result mysql-test/r/join_cache_bnl.result mysql-test/r/join_cache_nojb.result sql/sql_join_buffer.cc sql/table.h === modified file 'sql/handler.cc' --- a/sql/handler.cc 2012-01-26 13:09:59 +0000 +++ b/sql/handler.cc 2012-01-27 11:15:59 +0000 @@ -4604,12 +4604,13 @@ handler::multi_range_read_info_const(uin because the number of rows with this value are likely to be very different than the values in the index statistics. */ - const int keyparts_used= my_count_bits(range.start_key.keypart_map); + int keyparts_used= 0; if ((range.range_flag & UNIQUE_RANGE) && // 1) !(range.range_flag & NULL_RANGE)) rows= 1; /* there can be at most one row */ else if ((range.range_flag & EQ_RANGE) && // 2a) (range.range_flag & USE_INDEX_STATISTICS) && // 2b) + (keyparts_used= my_count_bits(range.start_key.keypart_map)) && table->key_info[keyno].rec_per_key[keyparts_used-1] && // 2c) !(range.range_flag & NULL_RANGE)) rows= table->key_info[keyno].rec_per_key[keyparts_used-1]; No bundle (reason: useless for push emails).