diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2020-04-25 14:27:00 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2020-05-04 09:35:38 +0530 |
commit | ec9908b2577758ffb3cb0d1b06400f12ff47b81c (patch) | |
tree | a18426dce230626e84f752cf5d966d8e205f530b /sql/sql_yacc.yy | |
parent | f98017bb6df0110aa0a359ab4378cc97f6a95473 (diff) | |
download | mariadb-git-ec9908b2577758ffb3cb0d1b06400f12ff47b81c.tar.gz |
MDEV-16288 ALTER TABLE…ALGORITHM=DEFAULT does not override alter_algorithm
- ALTER_ALGORITHM should be substituted when there is no mention of
algorithm in alter statement.
- Introduced algorithm(thd) in Alter_info. It returns the
user requested algorithm. If user doesn't specify algorithm explicitly then
it returns alter_algorithm variable.
- changed algorithm() to get_algorithm(thd) to return algorithm name for
displaying the error.
- set_requested_algorithm(algo_value) to avoid direct assignment on
requested_algorithm variable.
- Avoid direct access of requested_algorithm to encapsulate
requested_algorithm variable
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 2a382dc7666..14d71139dad 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -8531,8 +8531,8 @@ opt_index_lock_algorithm: alter_algorithm_option: ALGORITHM_SYM opt_equal DEFAULT { - Lex->alter_info.requested_algorithm= - Alter_info::ALTER_TABLE_ALGORITHM_DEFAULT; + Lex->alter_info.set_requested_algorithm( + Alter_info::ALTER_TABLE_ALGORITHM_DEFAULT); } | ALGORITHM_SYM opt_equal ident { |