List:Internals« Previous MessageNext Message »
From:MARK CALLAGHAN Date:February 2 2009 10:17pm
View as plain text  
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

  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
handler::change_table_ptr()MARK CALLAGHAN2 Feb
  • Re: handler::change_table_ptr()Sergei Golubchik3 Feb
  • Re: handler::change_table_ptr()Konstantin Osipov3 Feb