diff options
author | Sidney Cammeresi <sac@mariadb.com> | 2020-06-12 10:23:46 -0700 |
---|---|---|
committer | Sidney Cammeresi <sac@mariadb.com> | 2020-06-12 12:00:10 -0700 |
commit | 114a8436691fd8a42f420b1894f59a13aa03d2bc (patch) | |
tree | 1407f7e07a8c6e2f99ccd864326bf7726e8b2c7f /sql/item_cmpfunc.h | |
parent | ab9bd6284c0cac74affed900bd45293fd652c5d6 (diff) | |
download | mariadb-git-114a8436691fd8a42f420b1894f59a13aa03d2bc.tar.gz |
when printing Item_in_optimizer, use precedence of wrapped Itembb-10.5-pr1588
when Item::print() is called with the QT_PARSABLE flag, WHERE i NOT IN
(SELECT ...) gets printed as WHERE !i IN (SELECT ...) instead of WHERE
!(i in (SELECT ...)) because Item_in_optimizer returns DEFAULT_PRECEDENCE.
it should return the precedence of the inner operation.
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 8d5cfb359ec..6d02d6642e2 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -396,6 +396,7 @@ public: { return args[1]; } Item *get_copy(THD *thd) { return get_item_copy<Item_in_optimizer>(thd, this); } + enum precedence precedence() const { return args[1]->precedence(); } }; |