diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-11-27 19:50:02 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-12-02 16:19:13 +0100 |
commit | 401ae95a6089b0cec5e5b9900bdb44a1f78c4248 (patch) | |
tree | 89bf2ec9f99ae4fcc2e7cb7d3179d7faf6522a59 /sql/item_subselect.h | |
parent | 37bfe32c6d4a65ea7b8297817e01954d6212c863 (diff) | |
download | mariadb-git-401ae95a6089b0cec5e5b9900bdb44a1f78c4248.tar.gz |
MDEV-30082 View definition losing brackets changes semantics of the query and causes wrong result
Item_func_not_all::print() either uses Item_func::print() or
directly invokes args[0]->print(). Thus the precedence should be
either the one of Item_func or of args[0].
Item_allany_subselect::print() prints args[0], then a comparison op,
then a subquery. That is, the precedence should be the one of
a comparison.
Diffstat (limited to 'sql/item_subselect.h')
-rw-r--r-- | sql/item_subselect.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h index b95a02d28b2..32bedb522ac 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -783,6 +783,7 @@ public: bool select_transformer(JOIN *join); void create_comp_func(bool invert) { func= func_creator(invert); } void print(String *str, enum_query_type query_type); + enum precedence precedence() const { return CMP_PRECEDENCE; } bool is_maxmin_applicable(JOIN *join); bool transform_into_max_min(JOIN *join); void no_rows_in_result(); |