From a23fdf7f741df08e59d9216d24653d7baf299221 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 8 Nov 2004 01:51:10 +0200 Subject: [PATCH] After merge fixes --- sql/item.cc | 7 +++++++ sql/item.h | 1 + sql/item_func.cc | 2 ++ 3 files changed, 10 insertions(+) diff --git a/sql/item.cc b/sql/item.cc index 1f90b1842ac..14ba097cf6d 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1733,6 +1733,13 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) return 0; } +Item *Item_field::safe_charset_converter(CHARSET_INFO *tocs) +{ + no_const_subst= 1; + return Item::safe_charset_converter(tocs); +} + + void Item_field::cleanup() { DBUG_ENTER("Item_field::cleanup"); diff --git a/sql/item.h b/sql/item.h index 11aeb22b6e5..37583143548 100644 --- a/sql/item.h +++ b/sql/item.h @@ -561,6 +561,7 @@ public: bool replace_equal_field_processor(byte *arg); inline uint32 max_disp_length() { return field->max_length(); } Item_field *filed_for_view_update() { return this; } + Item *safe_charset_converter(CHARSET_INFO *tocs); friend class Item_default_value; friend class Item_insert_value; friend class st_select_lex_unit; diff --git a/sql/item_func.cc b/sql/item_func.cc index 173b1b3fd82..583371aed32 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -193,6 +193,8 @@ bool Item_func::agg_arg_charsets(DTCollation &coll, res= TRUE; break; // we cannot return here, we need to restore "arena". } + if ((*arg)->type() == FIELD_ITEM) + ((Item_field *)(*arg))->no_const_subst= 1; conv->fix_fields(thd, 0, &conv); *arg= conv; }