MDEV-7482 VIEW containing INTERVAL(...)

Item_func::print() prints itself as name + "(" + arguments + ")".
Normally that works, but Item_func_interval internally implements its
arguments as one single Item_row. Item_row prints itself as
"(" + values + ")". As a result, "INTERVAL(1,2)" was being printed
as "INTERVAL((1,2))". Fixed with a custom Item_func_interval::print().
This commit is contained in:
Sergei Golubchik 2015-02-20 16:37:02 +01:00
commit 22cf2f117a
4 changed files with 23 additions and 1 deletions

View file

@ -734,6 +734,11 @@ public:
void fix_length_and_dec();
const char *func_name() const { return "interval"; }
uint decimal_precision() const { return 2; }
void print(String *str, enum_query_type query_type)
{
str->append(func_name());
print_args(str, 0, query_type);
}
};