Skip to content

Commit e2900a1

Browse files
author
Timothy Smith
committed
Auto-merge up from 5.0
--BZR-- revision-id: [email protected] property-branch-nick: 51 testament3-sha1: 2da1602cd897d1cb849e196c834a726a6b63654b
2 parents c6b94a1 + 790186c commit e2900a1

File tree

4 files changed

+34
-1
lines changed

4 files changed

+34
-1
lines changed

mysql-test/r/func_sapdb.result

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,3 +268,17 @@ timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')<time('00:00:00')
268268
SELECT CAST(time('-73:42:12') AS DECIMAL);
269269
CAST(time('-73:42:12') AS DECIMAL)
270270
-734212
271+
SELECT TIMEDIFF(TIME('17:00:00'),TIME('17:00:00'))=TIME('00:00:00') AS 1Eq,
272+
TIMEDIFF(TIME('17:59:00'),TIME('17:00:00'))=TIME('00:00:00') AS 1NEq1,
273+
TIMEDIFF(TIME('18:00:00'),TIME('17:00:00'))=TIME('00:00:00') AS 1NEq2,
274+
TIMEDIFF(TIME('17:00:00'),TIME('17:00:00'))= '00:00:00' AS 2Eq,
275+
TIMEDIFF(TIME('17:59:00'),TIME('17:00:00'))= '00:00:00' AS 2NEq1,
276+
TIMEDIFF(TIME('18:00:00'),TIME('17:00:00'))= '00:00:00' AS 2NEq2,
277+
TIMEDIFF(TIME('17:00:00'),TIME('17:00:00'))=TIME(0) AS 3Eq,
278+
TIMEDIFF(TIME('17:59:00'),TIME('17:00:00'))=TIME(0) AS 3NEq1,
279+
TIMEDIFF(TIME('18:00:00'),TIME('17:00:00'))=TIME(0) AS 3NEq2,
280+
TIME(0) AS Time0, TIME('00:00:00') AS Time00, '00:00:00' AS Literal0000,
281+
TIMEDIFF(TIME('17:59:00'),TIME('17:00:00')),
282+
TIMEDIFF(TIME('17:00:00'),TIME('17:59:00'));
283+
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'))
284+
1 0 0 1 0 0 1 0 0 00:00:00 00:00:00 00:00:00 00:59:00 -00:59:00

mysql-test/t/func_sapdb.test

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,22 @@ select timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')<time('00:00:00');
151151
SELECT CAST(time('-73:42:12') AS DECIMAL);
152152

153153

154+
155+
#
156+
# Bug#42525 - TIMEDIFF function
157+
#
158+
159+
SELECT TIMEDIFF(TIME('17:00:00'),TIME('17:00:00'))=TIME('00:00:00') AS 1Eq,
160+
TIMEDIFF(TIME('17:59:00'),TIME('17:00:00'))=TIME('00:00:00') AS 1NEq1,
161+
TIMEDIFF(TIME('18:00:00'),TIME('17:00:00'))=TIME('00:00:00') AS 1NEq2,
162+
TIMEDIFF(TIME('17:00:00'),TIME('17:00:00'))= '00:00:00' AS 2Eq,
163+
TIMEDIFF(TIME('17:59:00'),TIME('17:00:00'))= '00:00:00' AS 2NEq1,
164+
TIMEDIFF(TIME('18:00:00'),TIME('17:00:00'))= '00:00:00' AS 2NEq2,
165+
TIMEDIFF(TIME('17:00:00'),TIME('17:00:00'))=TIME(0) AS 3Eq,
166+
TIMEDIFF(TIME('17:59:00'),TIME('17:00:00'))=TIME(0) AS 3NEq1,
167+
TIMEDIFF(TIME('18:00:00'),TIME('17:00:00'))=TIME(0) AS 3NEq2,
168+
TIME(0) AS Time0, TIME('00:00:00') AS Time00, '00:00:00' AS Literal0000,
169+
TIMEDIFF(TIME('17:59:00'),TIME('17:00:00')),
170+
TIMEDIFF(TIME('17:00:00'),TIME('17:59:00'));
171+
154172
# End of 5.0 tests

netware/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ EXTRA_DIST= $(BUILT_SOURCES) comp_err.def install_test_db.ncf \
9494
BUILD/compile-netware-standard BUILD/create-patch \
9595
BUILD/cron-build BUILD/crontab BUILD/knetware.imp \
9696
BUILD/mwasmnlm BUILD/mwccnlm BUILD/mwenv BUILD/mwldnlm \
97-
BUILD/nwbootstrap BUILD/openssl.imp BUILD/save-patch
97+
BUILD/nwbuild BUILD/openssl.imp BUILD/save-patch
9898

9999
endif
100100

sql/item_timefunc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ class Item_str_timefunc :public Item_str_func
419419
{
420420
return save_time_in_field(field);
421421
}
422+
longlong val_int() { return val_int_from_decimal(); }
422423
bool result_as_longlong() { return TRUE; }
423424
};
424425

0 commit comments

Comments
 (0)