Hi!
On Nov 13, xiao.feng wrote:
> Hi,
> My storage engine kernel support add/drop column without copy data from one to one;
> I set HA_NO_COPY_ON_ALTER on table flag.
> when I add a column an table abc.
> it create temptable t1 with new table flags, and then rename abc to t2.
> then rename t1 to abc, at last it drop t2.
> these doesn't remain any data on table abc.
>
> how to use HA_NO_COPY_ON_ALTER on my storage engine?
You use it correctly. But HA_NO_COPY_ON_ALTER is mainly useful for MERGE
storage engine, where dropping the table does not delete the data.
That is, HA_NO_COPY_ON_ALTER works as it should, it's simply the wrong
flag for you.
Unfortunately, MySQL currently does not support adding a column without
copying the data :(
Regards,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Senior Software Developer
/_/ /_/\_, /___/\___\_\___/ Kerpen, Germany
<___/ www.mysql.com