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
parent b2a95f0d
......@@ -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
......
......@@ -199,6 +199,7 @@ public:
*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);
......
......@@ -983,7 +983,7 @@ public:
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;
......
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