weird compilation fix

strangely enough, ?: variant does not link in some older gcc versions:

sql/sql_table.cc:6409: undefined reference to `Alter_inplace_info::ALTER_STORED_GCOL_EXPR'
sql/sql_table.cc:6409: undefined reference to `Alter_inplace_info::ALTER_VIRTUAL_GCOL_EXPR'
This commit is contained in:
Sergei Golubchik 2016-11-28 12:46:49 +01:00
parent 8c876adfb6
commit 5d5e83277f

View file

@ -6407,9 +6407,11 @@ static bool fill_alter_inplace_info(THD *thd,
if (field->vcol_info && new_field->vcol_info)
{
bool value_changes= is_equal == IS_EQUAL_NO;
Alter_inplace_info::HA_ALTER_FLAGS alter_expr= field->stored_in_db()
? Alter_inplace_info::ALTER_STORED_GCOL_EXPR
: Alter_inplace_info::ALTER_VIRTUAL_GCOL_EXPR;
Alter_inplace_info::HA_ALTER_FLAGS alter_expr;
if (field->stored_in_db())
alter_expr= Alter_inplace_info::ALTER_STORED_GCOL_EXPR;
else
alter_expr= Alter_inplace_info::ALTER_VIRTUAL_GCOL_EXPR;
if (!field->vcol_info->is_equal(new_field->vcol_info))
{
ha_alter_info->handler_flags|= alter_expr;