Hi, Sergey! On Jun 04, Sergey Vojtovich wrote:
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index eedf149..7ad4c06 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -4467,6 +4467,13 @@ bool Item_dyncol_get::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
void Item_dyncol_get::print(String *str, enum_query_type query_type)
How do you get to Item_dyncol_get::print if cast couldn't be created?
Trace is as following: Item_dyncol_get::print() item_name() wrong_precision_error() create_func_cast() create_func_dyncol_get()
Oh, it's from wrong_precision_error(). I've missed that, sorry.
Frankly speaking I'd gladly replace this my hack, but I couldn't come up with something more solid.
What Item_dyncol_get is doing with cast is already a hack. I'd rather fix that, but we cannot do it in 5.5. Let's keep your fix, but please mention in the comment that this happens (str.length() == 0) when called from wrong_precision_error(), from create_func_cast(). Regards, Sergei