db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-2386) timestampdiff function fails when using SQL_TSI_FRAC_SECOND for datepart parameter, except for very small intervals
Date Wed, 04 Apr 2007 16:17:32 GMT

     [ https://issues.apache.org/jira/browse/DERBY-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel John Debrunner updated DERBY-2386:
-----------------------------------------

    Derby Info: [Existing Application Impact]

Existing application impact in that the return type of this function changed to BIGINT from
INTEGER.
Can cause existing applications to fail, e.g. an existing application that passed this as
an argument to a SQL function will not resolve since the previous resolution would be to a
function with an INTEGER parameter.

> timestampdiff function fails when using SQL_TSI_FRAC_SECOND for datepart parameter, except
for very small intervals
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2386
>                 URL: https://issues.apache.org/jira/browse/DERBY-2386
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.2.0
>         Environment: SUSE Linux Enterprise Desktop 10
>            Reporter: Don Smith
>         Assigned To: Mayuresh Nirhali
>             Fix For: 10.3.0.0
>
>         Attachments: derby2386-v2.diff, derby2386.diff
>
>
> Using the timestampdiff function produces and integer overflow except for very small
intervals. Error message is:
> [Error Code: -1, SQL State: 22003]  The resulting value is outside the range for the
data type INTEGER.
> I inserted the following row into my test table:
> insert into datetest (ID, 
> startdate, 
> enddate) values (
> 5, 
> '2006-11-20 04:20:00.0', 
> '2006-11-20 04:20:00.2');
> This test row works:
> select {fn timestampdiff(SQL_TSI_FRAC_SECOND, startdate, enddate)} as diff from datetest
where id = 5
> DIFF
> 200000000
> The value also looks too large, which could be exacerbating the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message