mirror of
https://github.com/MariaDB/server.git
synced 2026-05-01 20:55:32 +02:00
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.
This commit is contained in:
parent
4d63adff26
commit
8dbbeedf41
1 changed files with 9 additions and 1 deletions
|
|
@ -4448,7 +4448,8 @@ int ha_partition::index_read_idx_map(uchar *buf, uint index,
|
|||
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, myf errflag)
|
|||
{
|
||||
/* 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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue