Hi, Zardosht!
On Sep 22, Zardosht Kasheff wrote:
> Hello all,
>
> Any ideas on how to do this? I guess what I am looking for is some way
> to differentiate between using new_mysql_alter_table and
> old_mysql_alter_table. I thought one way would be to query flags of
> the engine of the table being altered, but if that is too complicated,
> perhaps some other idea works?
if you looking for something simple, consider new_mode:
if (thd->variables.new_mode)
return new_mysql_alter_table(...)
else
return old_mysql_alter_table(...)
Or old_mode:
if (!global_system_variables.old_mode)
return new_mysql_alter_table(...)
else
return old_mysql_alter_table(...)
Or old_alter_table:
if (!thd->variables.old_alter_table)
return new_mysql_alter_table(...)
else
return old_mysql_alter_table(...)
All these already exist as mysqld command line options and system
variables. First and third are session variables, second is a global one.
> Thoughts?
>
> Thanks
> -Zardosht
>
Regards,
Sergei