mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
MDEV-33971 fix --view-protocol test failure
Allow the NAME_CONST unwrap optimization when the client is not in the PREPARE step of prepared statement nor in the view analysis mode.
This commit is contained in:
parent
a938503cfb
commit
216fdb1556
1 changed files with 3 additions and 2 deletions
|
@ -2214,8 +2214,9 @@ bool Item_name_const::fix_fields(THD *thd, Item **ref)
|
|||
*/
|
||||
if ((thd->where == THD_WHERE::WHERE_CLAUSE ||
|
||||
thd->where == THD_WHERE::ON_CLAUSE) &&
|
||||
(value_item->type() == FUNC_ITEM ||
|
||||
value_item->type() == CONST_ITEM))
|
||||
(value_item->type() == CONST_ITEM ||
|
||||
value_item->type() == FUNC_ITEM) &&
|
||||
!thd->lex->is_ps_or_view_context_analysis())
|
||||
{
|
||||
thd->change_item_tree(ref, value_item);
|
||||
|
||||
|
|
Loading…
Reference in a new issue