From: Mattias Jonsson Date: April 11 2011 4:16pm Subject: bzr commit into mysql-5.1 branch (mattias.jonsson:3654) List-Archive: http://lists.mysql.com/commits/135217 Message-Id: <201104111617.p3BGH52O026030@acsmt356.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit #At file:///C:/ade/mysql-bzr/topush-5.1/ based on revid:sven.sandberg@stripped 3654 Mattias Jonsson 2011-04-11 [merge] merge modified: sql/ha_partition.cc === modified file 'sql/ha_partition.cc' --- a/sql/ha_partition.cc 2011-01-24 12:41:44 +0000 +++ b/sql/ha_partition.cc 2011-04-11 16:09:23 +0000 @@ -4317,7 +4317,8 @@ int ha_partition::index_read_idx_map(uch break; } } - m_last_part= part; + if (part <= m_part_spec.end_part) + m_last_part= part; } else { @@ -6237,7 +6238,14 @@ void ha_partition::print_error(int error { /* In case m_file has not been initialized, like in bug#42438 */ if (m_file) + { + if (m_last_part >= m_tot_parts) + { + DBUG_ASSERT(0); + m_last_part= 0; + } m_file[m_last_part]->print_error(error, errflag); + } else handler::print_error(error, errflag); } No bundle (reason: revision is a merge (you can force generation of a bundle with env var BZR_FORCE_BUNDLE=1)).