From 1be451ca797f59b23e70edf02d9c17a29c19e608 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Fri, 7 Oct 2022 13:39:02 +0400 Subject: Revert "MDEV-28727 ALTER TABLE ALGORITHM=NOCOPY does not work after upgrade" This reverts commit 1ea5e402a89a1e3fb9ba8045e58570d23837714a --- sql/handler.cc | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'sql/handler.cc') diff --git a/sql/handler.cc b/sql/handler.cc index e6e665f0e12..bf819733b81 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -4370,32 +4370,17 @@ int handler::ha_check(THD *thd, HA_CHECK_OPT *check_opt) DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE || m_lock_type != F_UNLCK); - const ulong v= table->s->mysql_version; - - if ((v >= MYSQL_VERSION_ID) && + if ((table->s->mysql_version >= MYSQL_VERSION_ID) && (check_opt->sql_flags & TT_FOR_UPGRADE)) return 0; - if (v < MYSQL_VERSION_ID) + if (table->s->mysql_version < MYSQL_VERSION_ID) { if (unlikely((error= check_old_types()))) return error; error= ha_check_for_upgrade(check_opt); if (unlikely(error && (error != HA_ADMIN_NEEDS_CHECK))) return error; - if (table->s->table_category == TABLE_CATEGORY_USER && - (v < 100142 || - (v >= 100200 && v < 100228) || - (v >= 100300 && v < 100319) || - (v >= 100400 && v < 100409))) - { - for (const KEY *key= table->key_info, - *end= table->key_info + table->s->keys; key < end; key++) - { - if (key->flags & HA_BINARY_PACK_KEY && key->flags & HA_VAR_LENGTH_KEY) - return HA_ADMIN_NEEDS_UPGRADE; - } - } if (unlikely(!error && (check_opt->sql_flags & TT_FOR_UPGRADE))) return 0; } -- cgit v1.2.1