BUG#26117 "index_merge sort-union over partitioned table crashes"

Before the fix: 
  ha_partition objects had ha_partition::m_part_info==NULL and that caused
  crash
After: 
- The new ha_partition::clone() function makes the clones use parent's
  m_part_info value.
- The parent ha_partition object remains responsible for deallocation of
  m_part_info.


mysql-test/r/partition_innodb.result:
  BUG#26117 "index_merge sort-union over partitioned table crashes"
   - Testcase
mysql-test/t/partition_innodb.test:
  BUG#26117 "index_merge sort-union over partitioned table crashes"
   - Testcase
This commit is contained in:
unknown 2007-02-27 22:01:03 +03:00
commit b68a22019e
4 changed files with 135 additions and 4 deletions

View file

@ -132,7 +132,13 @@ private:
THR_LOCK_DATA lock; /* MySQL lock */
PARTITION_SHARE *share; /* Shared lock info */
/*
TRUE <=> this object was created with ha_partition::clone and doesn't
"own" the m_part_info structure.
*/
bool is_clone;
public:
handler *clone(MEM_ROOT *mem_root);
virtual void set_part_info(partition_info *part_info)
{
m_part_info= part_info;