diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-10-16 14:32:14 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-10-23 15:53:41 +0200 |
commit | 8c83e6eadf496267762313d577653d56bf98d945 (patch) | |
tree | 6ebebf46804b0398b37238f9698d5fce95f60869 /sql/item_timefunc.cc | |
parent | 9ad4e0d6d8952b861848da95778e35cf3abc1b93 (diff) | |
download | mariadb-git-8c83e6eadf496267762313d577653d56bf98d945.tar.gz |
cleanup: remove redundant ADDINTERVAL_PRECEDENCE
expression between INTERVAL and the unit doesns not need any
precedence rules, there's no ambiguity there
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 194933a4c54..a40c2e18b91 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -2250,9 +2250,9 @@ static const char *interval_names[]= void Item_date_add_interval::print(String *str, enum_query_type query_type) { - args[0]->print_parenthesised(str, query_type, ADDINTERVAL_PRECEDENCE); + args[0]->print_parenthesised(str, query_type, INTERVAL_PRECEDENCE); str->append(date_sub_interval?" - interval ":" + interval "); - args[1]->print_parenthesised(str, query_type, INTERVAL_PRECEDENCE); + args[1]->print(str, query_type); str->append(' '); str->append(interval_names[int_type]); } |