diff options
author | unknown <bar@mysql.com> | 2004-09-07 15:42:19 +0500 |
---|---|---|
committer | unknown <bar@mysql.com> | 2004-09-07 15:42:19 +0500 |
commit | 95f42e1da29deb3fb2843c5066ea8692e7bdca08 (patch) | |
tree | 256da1b65d60ac047776d8ed3c5bd1d23a364457 /sql/item_timefunc.h | |
parent | 7e7dfcccd64472c9d46b319e997181d0354b668c (diff) | |
download | mariadb-git-95f42e1da29deb3fb2843c5066ea8692e7bdca08.tar.gz |
Bug #5228 ORDER BY CAST(enumcol) sorts incorrectly under certain conditions
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r-- | sql/item_timefunc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index 2254fc830c9..df0b05d6d42 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -683,6 +683,8 @@ 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) {} + 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"; }; String *val_str(String *a); void fix_length_and_dec(); @@ -694,6 +696,7 @@ class Item_date_typecast :public Item_typecast_maybe_null { public: Item_date_typecast(Item *a) :Item_typecast_maybe_null(a) {} + const char *func_name() const { return "cast_as_date"; } String *val_str(String *str); bool get_date(TIME *ltime, uint fuzzy_date); const char *cast_type() const { return "date"; } @@ -709,6 +712,7 @@ class Item_time_typecast :public Item_typecast_maybe_null { public: Item_time_typecast(Item *a) :Item_typecast_maybe_null(a) {} + const char *func_name() const { return "cast_as_time"; } String *val_str(String *str); bool get_time(TIME *ltime); const char *cast_type() const { return "time"; } @@ -724,6 +728,7 @@ class Item_datetime_typecast :public Item_typecast_maybe_null { public: Item_datetime_typecast(Item *a) :Item_typecast_maybe_null(a) {} + const char *func_name() const { return "cast_as_datetime"; } String *val_str(String *str); const char *cast_type() const { return "datetime"; } enum_field_types field_type() const { return MYSQL_TYPE_DATETIME; } |