mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
small cleanup
This commit is contained in:
@@ -7616,6 +7616,9 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
|
|||||||
{
|
{
|
||||||
if (drop->type == Alter_drop::COLUMN &&
|
if (drop->type == Alter_drop::COLUMN &&
|
||||||
!my_strcasecmp(system_charset_info, field->field_name, drop->name))
|
!my_strcasecmp(system_charset_info, field->field_name, drop->name))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (drop)
|
||||||
{
|
{
|
||||||
/* Reset auto_increment value if it was dropped */
|
/* Reset auto_increment value if it was dropped */
|
||||||
if (MTYP_TYPENR(field->unireg_check) == Field::NEXT_NUMBER &&
|
if (MTYP_TYPENR(field->unireg_check) == Field::NEXT_NUMBER &&
|
||||||
@@ -7624,11 +7627,6 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
|
|||||||
create_info->auto_increment_value=0;
|
create_info->auto_increment_value=0;
|
||||||
create_info->used_fields|=HA_CREATE_USED_AUTO;
|
create_info->used_fields|=HA_CREATE_USED_AUTO;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (drop)
|
|
||||||
{
|
|
||||||
if (table->s->tmp_table == NO_TMP_TABLE)
|
if (table->s->tmp_table == NO_TMP_TABLE)
|
||||||
(void) delete_statistics_for_column(thd, table, field);
|
(void) delete_statistics_for_column(thd, table, field);
|
||||||
drop_it.remove();
|
drop_it.remove();
|
||||||
@@ -8975,11 +8973,8 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
|||||||
alter_info->requested_algorithm !=
|
alter_info->requested_algorithm !=
|
||||||
Alter_info::ALTER_TABLE_ALGORITHM_INPLACE)
|
Alter_info::ALTER_TABLE_ALGORITHM_INPLACE)
|
||||||
|| is_inplace_alter_impossible(table, create_info, alter_info)
|
|| is_inplace_alter_impossible(table, create_info, alter_info)
|
||||||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
|| IF_PARTITIONING((partition_changed &&
|
||||||
|| (partition_changed &&
|
!(table->s->db_type()->partition_flags() & HA_USE_AUTO_PARTITION)), 0))
|
||||||
!(table->s->db_type()->partition_flags() & HA_USE_AUTO_PARTITION))
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (alter_info->requested_algorithm ==
|
if (alter_info->requested_algorithm ==
|
||||||
Alter_info::ALTER_TABLE_ALGORITHM_INPLACE)
|
Alter_info::ALTER_TABLE_ALGORITHM_INPLACE)
|
||||||
|
Reference in New Issue
Block a user