summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-11-01 13:00:02 +0200
committerunknown <monty@mysql.com>2005-11-01 13:00:02 +0200
commitfffe74170576439325ae7b59bf56e55bbeeee5c4 (patch)
tree48f465a2fa16bd4e275d38c29d8c85701e758f58 /sql/item_timefunc.cc
parentcc953ed32a8cf5245aa1068bc6b7463992d2986c (diff)
downloadmariadb-git-fffe74170576439325ae7b59bf56e55bbeeee5c4.tar.gz
Review of new pushed code
Removed wrong fix for bug #14009 (use of abs() on null value causes problems with filesort) Mark that add_time(), time_diff() and str_to_date() can return null values myisam/mi_check.c: keyoffset is not a position (no %lx here) mysql-test/r/func_sapdb.result: Fixed test after marking that timediff() can return NULL sql/item_func.cc: Removed wrong fix for bug #14009 (use of abs() on null value causes problems with filesort) sql/item_timefunc.cc: Mark that add_time and str_to_date() can return null values sql/item_timefunc.h: Mark that time_diff can return 0 sql/spatial.cc: Simple cleanups during review of new code
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 7398b1746da..eb58b180ed7 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -2381,6 +2381,7 @@ void Item_func_add_time::fix_length_and_dec()
enum_field_types arg0_field_type;
decimals=0;
max_length=MAX_DATETIME_FULL_WIDTH*MY_CHARSET_BIN_MB_MAXLEN;
+ maybe_null= 1;
/*
The field type for the result of an Item_func_add_time function is defined
@@ -2742,7 +2743,8 @@ Field *Item_func_str_to_date::tmp_table_field(TABLE *t_arg)
void Item_func_str_to_date::fix_length_and_dec()
{
char format_buff[64];
- String format_str(format_buff, sizeof(format_buff), &my_charset_bin), *format;
+ String format_str(format_buff, sizeof(format_buff), &my_charset_bin);
+ String *format;
maybe_null= 1;
decimals=0;
cached_field_type= MYSQL_TYPE_STRING;