[MDEV-17478] Wrong result for TIME('+100:20:30') Created: 2018-10-16  Updated: 2018-10-30  Resolved: 2018-10-20

Status: Closed
Project: MariaDB Server
Component/s: Temporal Types
Affects Version/s: 10.0, 10.1, 10.2, 10.3, 10.4
Fix Version/s: 10.4.0

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-16991 Rounding vs truncation for TIME, DATE... Closed
Relates
relates to MDEV-17563 Different results using table or view... Closed

 Description   

SELECT TIME('+100:20:30');

+--------------------+
| TIME('+100:20:30') |
+--------------------+
| 00:00:00           |
+--------------------+
1 row in set, 1 warning (0.00 sec)

Looks wrong. The expected result is '100:20:30'.

The literal plays a role of an interval string here:

<interval string>    ::=   <quote> <unquoted interval string> <quote>
<unquoted interval string>    ::=   [ <sign> ] { <year-month literal> | <day-time literal> } 
<sign>    ::=   <plus sign> | <minus sign>

So it should understand both - and +



 Comments   
Comment by Alexander Barkov [ 2018-10-20 ]

Closed by a joint patch for MDEV-17477

Generated at Thu Feb 08 08:36:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.