diff options
author | Tatiana A. Nurnberg <azundris@mysql.com> | 2009-02-06 18:25:08 +0100 |
---|---|---|
committer | Tatiana A. Nurnberg <azundris@mysql.com> | 2009-02-06 18:25:08 +0100 |
commit | d66dc230652002fabfb539da516e907553024c27 (patch) | |
tree | d201e9cadc0dcd2191c24572aa038a55d8d930b6 /sql/item_timefunc.h | |
parent | 518cfea4836df56d232ba270995db83fa7655bb4 (diff) | |
download | mariadb-git-d66dc230652002fabfb539da516e907553024c27.tar.gz |
Bug#42525: TIMEDIFF function
In 37553 we declared longlong results for
class Item_str_timefunc as per comments/docs,
but didn't add a method for that. And the
default just wasn't good enough for some
cases.
Changeset adds dedicated val_int() to class.
mysql-test/r/func_sapdb.result:
More tests for casts of TIME() / TIMEDIFF() with negative results.
mysql-test/t/func_sapdb.test:
More tests for casts of TIME() / TIMEDIFF() with negative results.
sql/item_timefunc.h:
Since we claim to provide longlong results, we should have
a suitable function to provide them (the default won't do).
This one matches the val_real() variant.
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r-- | sql/item_timefunc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index 161a77f60b4..2c99d6044af 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -398,6 +398,7 @@ public: { return save_time_in_field(field); } + longlong val_int() { return val_int_from_decimal(); } bool result_as_longlong() { return TRUE; } }; |