Commit d918fa6e authored by mattiasj@witty's avatar mattiasj@witty

Valgrind warnings found after bug#32943 and after merge from -main

into -engines tree.

hander::table_share was not updated after changing table->s.
parent c400abe8
......@@ -1646,6 +1646,15 @@ void ha_partition::change_table_ptr(TABLE *table_arg, TABLE_SHARE *share)
{
(*file_array)->change_table_ptr(table_arg, share);
} while (*(++file_array));
if (m_added_file && m_added_file[0])
{
/* if in middle of a drop/rename etc */
file_array= m_added_file;
do
{
(*file_array)->change_table_ptr(table_arg, share);
} while (*(++file_array));
}
}
/*
......
......@@ -747,6 +747,7 @@ void close_handle_and_leave_table_as_lock(TABLE *table)
table->db_stat= 0; // Mark file closed
release_table_share(table->s, RELEASE_NORMAL);
table->s= share;
table->file->change_table_ptr(table, table->s);
DBUG_VOID_RETURN;
}
......
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