What is the contract for handler::change_table_ptr()? It may be called
from the following in 5.0.37: reopen_table(),
create_myisam_from_heap(). handler::change_table_ptr() isn't virtual,
so storage engines cannot add any code here. There are no debug only
checks to confirm that the new table is the same or similar to the
previous table.
This is a bit more confusing for 5.1. There are still no comments
although the method is now virtual and ha_partition implements it.
Calls are also made from ha_delete_table() and
close_handle_and_leave_table_as_lock().
virtual void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share)
{
table= table_arg;
table_share= share;
}
These args (table, table_share) are fundamental to the state of the
handler instance. It seems odd that they can be swapped, especially
with no error checks.
--
Mark Callaghan
mdcallag@stripped