Commit a5776aa3 authored by Sergei Golubchik's avatar Sergei Golubchik

online alter always uses ALGORITHM=COPY, LOCK=NONE

so any other value of ALGORITHM or LOCK disables online alter
parent d767ed5c
...@@ -10027,10 +10027,10 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db, ...@@ -10027,10 +10027,10 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db,
table_list->required_type= TABLE_TYPE_NORMAL; table_list->required_type= TABLE_TYPE_NORMAL;
if (alter_info->requested_lock == Alter_info::ALTER_TABLE_LOCK_SHARED if (alter_info->requested_lock == Alter_info::ALTER_TABLE_LOCK_SHARED
|| alter_info->requested_lock == Alter_info::ALTER_TABLE_LOCK_EXCLUSIVE || alter_info->requested_lock > Alter_info::ALTER_TABLE_LOCK_NONE
|| thd->locked_tables_mode == LTM_LOCK_TABLES || thd->locked_tables_mode == LTM_LOCK_TABLES
|| thd->lex->sql_command == SQLCOM_OPTIMIZE || thd->lex->sql_command == SQLCOM_OPTIMIZE
|| alter_info->algorithm(thd) == Alter_info::ALTER_TABLE_ALGORITHM_NOCOPY) || alter_info->algorithm(thd) > Alter_info::ALTER_TABLE_ALGORITHM_COPY)
online= false; online= false;
if (online) if (online)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment