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 /mysql-test/r/func_sapdb.result | |
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 'mysql-test/r/func_sapdb.result')
-rw-r--r-- | mysql-test/r/func_sapdb.result | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/r/func_sapdb.result b/mysql-test/r/func_sapdb.result index a06d7004908..3a8515c8831 100644 --- a/mysql-test/r/func_sapdb.result +++ b/mysql-test/r/func_sapdb.result @@ -268,3 +268,17 @@ timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')<time('00:00:00') SELECT CAST(time('-73:42:12') AS DECIMAL); CAST(time('-73:42:12') AS DECIMAL) -734212 +SELECT TIMEDIFF(TIME('17:00:00'),TIME('17:00:00'))=TIME('00:00:00') AS 1Eq, +TIMEDIFF(TIME('17:59:00'),TIME('17:00:00'))=TIME('00:00:00') AS 1NEq1, +TIMEDIFF(TIME('18:00:00'),TIME('17:00:00'))=TIME('00:00:00') AS 1NEq2, +TIMEDIFF(TIME('17:00:00'),TIME('17:00:00'))= '00:00:00' AS 2Eq, +TIMEDIFF(TIME('17:59:00'),TIME('17:00:00'))= '00:00:00' AS 2NEq1, +TIMEDIFF(TIME('18:00:00'),TIME('17:00:00'))= '00:00:00' AS 2NEq2, +TIMEDIFF(TIME('17:00:00'),TIME('17:00:00'))=TIME(0) AS 3Eq, +TIMEDIFF(TIME('17:59:00'),TIME('17:00:00'))=TIME(0) AS 3NEq1, +TIMEDIFF(TIME('18:00:00'),TIME('17:00:00'))=TIME(0) AS 3NEq2, +TIME(0) AS Time0, TIME('00:00:00') AS Time00, '00:00:00' AS Literal0000, +TIMEDIFF(TIME('17:59:00'),TIME('17:00:00')), +TIMEDIFF(TIME('17:00:00'),TIME('17:59:00')); +1Eq 1NEq1 1NEq2 2Eq 2NEq1 2NEq2 3Eq 3NEq1 3NEq2 Time0 Time00 Literal0000 TIMEDIFF(TIME('17:59:00'),TIME('17:00:00')) TIMEDIFF(TIME('17:00:00'),TIME('17:59:00')) +1 0 0 1 0 0 1 0 0 00:00:00 00:00:00 00:00:00 00:59:00 -00:59:00 |