diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-11-01 10:33:44 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-11-01 10:33:44 +0100 |
commit | ebf2121529fcf06971b4c0fc28f40654ef8dd99f (patch) | |
tree | 420ddcc5b2aeae06a75224062e85ee8b1ffce504 /sql/handler.cc | |
parent | 4b87d3628acf815836c0efc84fbcd878517d9b89 (diff) | |
parent | e0421b7cc8969edefca25c9a47e24f7e77c4bdf6 (diff) | |
download | mariadb-git-ebf2121529fcf06971b4c0fc28f40654ef8dd99f.tar.gz |
Merge branch '10.8' into 10.9
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index d31d7f50ba2..00c7fcf077a 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -4933,32 +4933,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; } |