mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
when printing Item_in_optimizer, use precedence of wrapped Item
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.
This commit is contained in:
@@ -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(); }
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user