Hello Sergei,
Thanks for the suggestion. I will look into this. I am still hoping
for something that is storage engine based, because making users be
sure to set a variable for our engine and unset it for other engines
may be a pain. But if this is the only safe and easy option, then
perhaps it will work.
Does anyone have any ideas on how to make this engine-based?
Thanks
-Zardosht
On Wed, Sep 22, 2010 at 2:29 AM, Sergei Golubchik <serg@stripped> wrote:
> 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
>