#At file:///C:/ade/mysql-bzr/b11867664-55/ based on revid:georgi.kodinov@stripped
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-03-09 17:41:16 +0000
+++ b/sql/ha_partition.cc 2011-03-18 10:03:54 +0000
@@ -4448,7 +4448,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
{
@@ -6391,7 +6392,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-20110318100354-v8kr1liddjhn756k.bundle
| Thread |
|---|
| • bzr commit into mysql-5.5 branch (mattias.jonsson:3381) Bug#11867664 | Mattias Jonsson | 18 Mar |