summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2005-06-17 17:27:47 +0300
committerunknown <bell@sanja.is.com.ua>2005-06-17 17:27:47 +0300
commit467ca505b5c5cb6f1512fc3425fd0f0b8620c099 (patch)
treea1524e75158ce5df834d60837e8609e95d3b7d3f /sql/item_timefunc.h
parent04cc7cdef7dc0c6dbb60821f3d2ab7ff0497074c (diff)
downloadmariadb-git-467ca505b5c5cb6f1512fc3425fd0f0b8620c099.tar.gz
fixed printing of sum(distinct ) & avg(distinct ) & cast(... as decimal) (BUG#7015, BUG#11387)
mysql-test/r/view.result: using sum(distinct ), cast(... as decimal) & avg(distinct ) in views mysql-test/t/view.test: using sum(distinct ), cast(... as decimal) & avg(distinct ) in views sql/item.h: Add a comment for Item::print sql/item_func.cc: Use functype(), not func_name() for item equvalence detection sql/item_func.h: Missed function typoes added Add a comment for Item_func::func_name() style fix sql/item_strfunc.cc: Use functype(), not func_name() for item equvalence detection sql/item_strfunc.h: Add missing func_name and func_type sql/item_sum.cc: Item_sum func_name report beggining of function till first argument sql/item_sum.h: Item_sum func_name report beggining of function till first argument sql/item_timefunc.cc: Use functype(), not func_name() for item equvalence detection sql/item_timefunc.h: Add missing func_name and func_type sql/item_uniq.h: Add missing func_name
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r--sql/item_timefunc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index c8fb2b39836..5c172b4698b 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -637,6 +637,7 @@ class Item_extract :public Item_int_func
Item_extract(interval_type type_arg, Item *a)
:Item_int_func(a), int_type(type_arg) {}
longlong val_int();
+ enum Functype functype() const { return EXTRACT_FUNC; }
const char *func_name() const { return "extract"; }
void fix_length_and_dec();
bool eq(const Item *item, bool binary_cmp) const;
@@ -689,6 +690,7 @@ class Item_char_typecast :public Item_typecast
public:
Item_char_typecast(Item *a, int length_arg, CHARSET_INFO *cs_arg)
:Item_typecast(a), cast_length(length_arg), cast_cs(cs_arg) {}
+ enum Functype functype() const { return CHAR_TYPECAST_FUNC; }
bool eq(const Item *item, bool binary_cmp) const;
const char *func_name() const { return "cast_as_char"; }
const char* cast_type() const { return "char"; };
@@ -790,6 +792,7 @@ public:
return (new Field_string(max_length, maybe_null, name, t_arg, &my_charset_bin));
}
void print(String *str);
+ const char *func_name() const { return "add_time"; }
};
class Item_func_timediff :public Item_str_func