Commit 0baa801e authored by unknown's avatar unknown
Browse files

Bug#20548 Events: crash if InnoDB, multiple events, busy procedures, partitions

setup 'share' struct for all partiton file elements. It's neccessary because we use
m_file[0]->update_create_info(create_info) during ha_partition::update_create_info
and 'share' for m_file[0] should be valid


sql/ha_partition.h:
  Bug#20548 Events: crash if InnoDB, multiple events, busy procedures, partitions
sql/handler.h:
  Bug#20548 Events: crash if InnoDB, multiple events, busy procedures, partitions
parent a649c631
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -1579,6 +1579,17 @@ void ha_partition::update_create_info(HA_CREATE_INFO *create_info)
}


void ha_partition::change_table_ptr(TABLE *table_arg, TABLE_SHARE *share)
{
  handler **file_array= m_file;
  table= table_arg;
  table_share= share;
  do
  {
    (*file_array)->change_table_ptr(table_arg, share);
  } while (*(++file_array));
}

/*
  Change comments specific to handler

+1 −0
Original line number Diff line number Diff line
@@ -199,6 +199,7 @@ class ha_partition :public handler
    *no_parts= m_tot_parts;
    DBUG_RETURN(0);
  }
  virtual void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share);
private:
  int prepare_for_delete();
  int copy_partitions(ulonglong *copied, ulonglong *deleted);
+1 −1
Original line number Diff line number Diff line
@@ -983,7 +983,7 @@ class handler :public Sql_alloc
  virtual void print_error(int error, myf errflag);
  virtual bool get_error_message(int error, String *buf);
  uint get_dup_key(int error);
  void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share)
  virtual void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share)
  {
    table= table_arg;
    table_share= share;