@@ -6331,10 +6331,12 @@ static bool fill_alter_inplace_info(THD *thd,
6331
6331
{
6332
6332
case IS_EQUAL_NO:
6333
6333
/* New column type is incompatible with old one. */
6334
- ha_alter_info->handler_flags |=
6335
- field->is_virtual_gcol () ?
6336
- Alter_inplace_info::ALTER_VIRTUAL_COLUMN_TYPE :
6337
- Alter_inplace_info::ALTER_STORED_COLUMN_TYPE;
6334
+ if (field->is_virtual_gcol ())
6335
+ ha_alter_info->handler_flags |=
6336
+ Alter_inplace_info::ALTER_VIRTUAL_COLUMN_TYPE;
6337
+ else
6338
+ ha_alter_info->handler_flags |=
6339
+ Alter_inplace_info::ALTER_STORED_COLUMN_TYPE;
6338
6340
break ;
6339
6341
case IS_EQUAL_YES:
6340
6342
/*
@@ -6429,10 +6431,12 @@ static bool fill_alter_inplace_info(THD *thd,
6429
6431
Field is not present in new version of table and therefore was dropped.
6430
6432
*/
6431
6433
DBUG_ASSERT (alter_info->flags & Alter_info::ALTER_DROP_COLUMN);
6432
- ha_alter_info->handler_flags |=
6433
- field->is_virtual_gcol () ?
6434
- Alter_inplace_info::DROP_VIRTUAL_COLUMN :
6435
- Alter_inplace_info::DROP_STORED_COLUMN;
6434
+ if (field->is_virtual_gcol ())
6435
+ ha_alter_info->handler_flags |=
6436
+ Alter_inplace_info::DROP_VIRTUAL_COLUMN;
6437
+ else
6438
+ ha_alter_info->handler_flags |=
6439
+ Alter_inplace_info::DROP_STORED_COLUMN;
6436
6440
field->flags |= FIELD_IS_DROPPED;
6437
6441
}
6438
6442
if (field->stored_in_db )
@@ -6449,10 +6453,12 @@ static bool fill_alter_inplace_info(THD *thd,
6449
6453
/*
6450
6454
Field is not present in old version of table and therefore was added.
6451
6455
*/
6452
- ha_alter_info->handler_flags |=
6453
- new_field->is_virtual_gcol () ?
6454
- Alter_inplace_info::ADD_VIRTUAL_COLUMN :
6455
- Alter_inplace_info::ADD_STORED_COLUMN;
6456
+ if (new_field->is_virtual_gcol ())
6457
+ ha_alter_info->handler_flags |=
6458
+ Alter_inplace_info::ADD_VIRTUAL_COLUMN;
6459
+ else
6460
+ ha_alter_info->handler_flags |=
6461
+ Alter_inplace_info::ADD_STORED_COLUMN;
6456
6462
}
6457
6463
}
6458
6464
/* One of these should be set since Alter_info::ALTER_ADD_COLUMN was set. */
0 commit comments