diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-02-21 21:18:41 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-02-21 21:18:41 +0100 |
commit | c9fc9f73170a8eb16ea968a2ea51b298eb5cdcfc (patch) | |
tree | fb1c75149c75e14bdca91eee6c694e62ebc6cded /sql/item_timefunc.cc | |
parent | f93da174c514e001fd0af61bc4fba51f9f8e7c9e (diff) | |
download | mariadb-git-c9fc9f73170a8eb16ea968a2ea51b298eb5cdcfc.tar.gz |
lp:923429 Crash in decimal_cmp on using UNIX_TIMESTAMP with a wrongly formatted timestamp
UNIX_TIMESTAMP() can be null, and returns null for invalid values
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index e01a4399cbe..1002cf9fea8 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -1134,15 +1134,7 @@ bool Item_func_unix_timestamp::get_timestamp_value(my_time_t *seconds, MYSQL_TIME ltime; if (get_arg0_date(<ime, 0)) - { - /* - We have to set null_value again because get_arg0_date will also set it - to true if we have wrong datetime parameter (and we should return 0 in - this case). - */ - null_value= args[0]->null_value; return 1; - } uint error_code; *seconds= TIME_to_timestamp(current_thd, <ime, &error_code); |