#At file:///C:/ade/mysql-bzr/b11867664-51/ based on revid:sven.sandberg@stripped
3654 Mattias Jonsson 2011-04-11
backport of Bug#11867664 from mysql-5.5
3381 Mattias Jonsson 2011-03-18
Bug#11867664: SERVER CRASHES ON UPDATE WITH JOIN ON PARTITIONED TABLE
Regression from bug#11766232.
m_last_part could be set beyond the last partition.
Fixed by only setting it if within the limit.
Also added check in print_error.
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);
}
Attachment: [text/bzr-bundle] bzr/mattias.jonsson@oracle.com-20110411160923-763pw4fngx50k9kq.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1 branch (mattias.jonsson:3654) Bug#11867664 | Mattias Jonsson | 11 Apr |