diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-07-29 09:15:03 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-07-29 09:15:03 +0300 |
commit | 0e8981ef93ff4421e333386072b3a2b4c5014cce (patch) | |
tree | 26604862c32739258a24dc42cb84f5c5069923d3 | |
parent | 9b8e207ce03b2ab7a766348738055be9520561bd (diff) | |
download | mariadb-git-0e8981ef93ff4421e333386072b3a2b4c5014cce.tar.gz |
Cleanup: Remove redundant conditions
ha_innobase::prepare_inplace_alter_table(): Remove always-true conditions.
Near the start of the function, we would already have returned if
no ALTER TABLE operation flags were set that would require special
action from InnoDB.
It turns out that the conditions were redundant already when they were
introduced in mysql/mysql-server@241387a2b6b61fb8a4f78dc4ad0aaa289400c694
and in commit 068c61978e3a81836d52b8caf11e044290159ad1.
Thanks to Nikita Malyavin for noticing this.
-rw-r--r-- | storage/innobase/handler/handler0alter.cc | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index c8888bada02..c78ea76bb00 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -5506,11 +5506,7 @@ ha_innobase::prepare_inplace_alter_table( ha_alter_info->key_count)) { err_exit_no_heap: DBUG_ASSERT(m_prebuilt->trx->dict_operation_lock_mode == 0); - if (ha_alter_info->handler_flags & ~INNOBASE_INPLACE_IGNORE) { - - online_retry_drop_indexes( - m_prebuilt->table, m_user_thd); - } + online_retry_drop_indexes(m_prebuilt->table, m_user_thd); DBUG_RETURN(true); } @@ -5969,12 +5965,7 @@ err_exit: } DBUG_ASSERT(m_prebuilt->trx->dict_operation_lock_mode == 0); - if (ha_alter_info->handler_flags & ~INNOBASE_INPLACE_IGNORE) { - - online_retry_drop_indexes( - m_prebuilt->table, m_user_thd); - - } + online_retry_drop_indexes(m_prebuilt->table, m_user_thd); if ((ha_alter_info->handler_flags & Alter_inplace_info::DROP_VIRTUAL_COLUMN) |