diff options
author | gvb@phoenix.(none) <> | 2006-01-14 09:53:12 +0100 |
---|---|---|
committer | gvb@phoenix.(none) <> | 2006-01-14 09:53:12 +0100 |
commit | 421eededd316ef07b14f06a9bfd36e1f19b35d5b (patch) | |
tree | 23e9a38e51fbb86feb703c86ff06410b73a80dbc /sql/item_timefunc.cc | |
parent | 45db1c24b06517b8ead23af9b455daf9db5ebe44 (diff) | |
download | mariadb-git-421eededd316ef07b14f06a9bfd36e1f19b35d5b.tar.gz |
item_timefunc.cc:
fix for bug#15828 after review
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index d060612c9f6..be8c5d2ad15 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -2750,7 +2750,8 @@ 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()) && !args[1]->null_value) + if (!args[1]->null_value && (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(), |