diff options
author | unknown <gvb@phoenix.(none)> | 2006-01-13 14:42:46 +0100 |
---|---|---|
committer | unknown <gvb@phoenix.(none)> | 2006-01-13 14:42:46 +0100 |
commit | 25e32d83d6d5fdce25ba4ef68885ffbf9f7a934f (patch) | |
tree | 04b9dbe5cbab5fb0d91d20b33250df79b8ea3d9d /sql/item_timefunc.cc | |
parent | 4e195cbd520d30260e226af9e27cb937335ca1f1 (diff) | |
download | mariadb-git-25e32d83d6d5fdce25ba4ef68885ffbf9f7a934f.tar.gz |
fix for bug#15828
problem was not checking 2nd parameter of str_to_date against NULL
mysql-test/r/date_formats.result:
bk commit
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index eb58b180ed7..d060612c9f6 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -2750,7 +2750,7 @@ void Item_func_str_to_date::fix_length_and_dec() cached_field_type= MYSQL_TYPE_STRING; max_length= MAX_DATETIME_FULL_WIDTH*MY_CHARSET_BIN_MB_MAXLEN; cached_timestamp_type= MYSQL_TIMESTAMP_NONE; - if ((const_item= args[1]->const_item())) + if ((const_item= args[1]->const_item()) && !args[1]->null_value) { format= args[1]->val_str(&format_str); cached_format_type= get_date_time_result_type(format->ptr(), |