diff options
author | unknown <aivanov@mysql.com> | 2005-09-14 20:25:00 +0400 |
---|---|---|
committer | unknown <aivanov@mysql.com> | 2005-09-14 20:25:00 +0400 |
commit | b214671e0953e0fb11d2d8737f053320f6b21327 (patch) | |
tree | a96961d0d3883524dcd53ca0300556dc7d1de536 /sql/item_timefunc.h | |
parent | 0b318fd64f1da2c658f90073f12e7349e3e4bac4 (diff) | |
download | mariadb-git-b214671e0953e0fb11d2d8737f053320f6b21327.tar.gz |
Fixed BUG#12963, BUG#13000: wrong VIEW creation with DAYNAME(),
DAYOFWEEK(), and WEEKDAY().
mysql-test/r/func_time.result:
Fixed new results for testcases containing EXPLAIN EXTENDED SELECT ...
WEEKDAY ... DAYNAME. The new results are correct and correspond to
the changes in create_func_weekday() and create_func_dayname().
mysql-test/r/view.result:
Fixed some testcases results (bugs #12963, #13000).
mysql-test/t/view.test:
Added testcases for for bugs #12963, #13000.
sql/item_create.cc:
Fixed bugs #12963, #13000: wrong VIEW creation with DAYNAME(),
DAYOFWEEK(), and WEEKDAY().
Modified create_func_dayname(), create_func_dayofweek(), and
create_func_weekday(). They donĀ“t insert Item_func_to_days
object now.
sql/item_timefunc.cc:
Fixed bugs #12963, #13000: wrong VIEW creation with DAYNAME(),
DAYOFWEEK(), and WEEKDAY().
Modified Item_func_weekday::val_int(). The argument of weekday should
not be considered now to be Item_func_to_days object.
sql/item_timefunc.h:
Fixed bugs #12963, 13000: wrong VIEW creation with DAYNAME(),
DAYOFWEEK(), and WEEKDAY.
Modified Item_func_weekday::func_name(). It returns now different
names depending on the odbc_type attribute value.
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r-- | sql/item_timefunc.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index 4602088a5f5..8e15acbc1fc 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -257,7 +257,10 @@ public: str->set(val_int(), &my_charset_bin); return null_value ? 0 : str; } - const char *func_name() const { return "weekday"; } + const char *func_name() const + { + return (odbc_type ? "dayofweek" : "weekday"); + } enum Item_result result_type () const { return INT_RESULT; } void fix_length_and_dec() { |