1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bug#42661: sec_to_time() and signedness

Bug#42662: maketime() and signedness

Item_time_typecast::val_int() dropped sign from
MYSQL_TIME gotten using from get_time().

Propagates sign now.
This commit is contained in:
Tatiana A. Nurnberg
2009-02-09 06:21:48 +01:00
parent 67bd15a554
commit 4e0e0db47e
3 changed files with 53 additions and 2 deletions

View File

@@ -282,3 +282,33 @@ 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
SELECT sec_to_time(3020399)=time('838:59:59');
sec_to_time(3020399)=time('838:59:59')
1
SELECT sec_to_time(-3020399)=time('-838:59:59');
sec_to_time(-3020399)=time('-838:59:59')
1
SELECT sec_to_time(-3020399)='-838:59:59';
sec_to_time(-3020399)='-838:59:59'
1
SELECT time(sec_to_time(-3020399))=time('-838:59:59');
time(sec_to_time(-3020399))=time('-838:59:59')
1
SELECT time(sec_to_time(-3020399))=time('-838:59:58');
time(sec_to_time(-3020399))=time('-838:59:58')
0
SELECT maketime(-1,0,1)='-01:00:01';
maketime(-1,0,1)='-01:00:01'
1
SELECT TIME(maketime(-1,0,1))=TIME('-01:00:01');
TIME(maketime(-1,0,1))=TIME('-01:00:01')
1
SELECT maketime(-1,0,1)=TIME('-01:00:01');
maketime(-1,0,1)=TIME('-01:00:01')
1
SELECT maketime(1,0,1)=TIME('01:00:01');
maketime(1,0,1)=TIME('01:00:01')
1
SELECT maketime(1,0,1)=TIME('01:00:02');
maketime(1,0,1)=TIME('01:00:02')
0