Commit ba2223a4 authored by unknown's avatar unknown

BUG#21357: Valgrind error in partition test

memcpy was too long m_reorged_parts was already temp_partitions * no_subparts so multiplying
by no_subparts again was not a good idea.


sql/ha_partition.cc:
  memcpy was too long m_reorged_parts was already temp_partitions * no_subparts so multiplying
  by no_subparts again was not a good idea.
parent 429ca80d
......@@ -1343,9 +1343,9 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
ones used to be.
*/
first= FALSE;
DBUG_ASSERT(i + m_reorged_parts <= m_file_tot_parts);
DBUG_ASSERT(((i*no_subparts) + m_reorged_parts) <= m_file_tot_parts);
memcpy((void*)m_reorged_file, &m_file[i*no_subparts],
sizeof(handler*)*m_reorged_parts*no_subparts);
sizeof(handler*)*m_reorged_parts);
}
} while (++i < no_parts);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment