[jira] Updated: (DERBY-2602) TIMESTAMP value is truncated when return to client

2010-04-13 Thread Rick Hillegas (JIRA)

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

Rick Hillegas updated DERBY-2602:
-

Fix Version/s: 10.6.0.0

> TIMESTAMP value is truncated  when return to client
> ---
>
> Key: DERBY-2602
> URL: https://issues.apache.org/jira/browse/DERBY-2602
> Project: Derby
>  Issue Type: Bug
>  Components: Network Client
>Affects Versions: 10.3.1.4
>Reporter: Kathey Marsden
>Assignee: Rick Hillegas
>Priority: Minor
> Fix For: 10.6.0.0
>
> Attachments: d2602.java, derby-2602-01-ad-dontTruncate.diff, 
> derby-2602-01-ae-dontTruncate.diff, derby-2602-01-af-dontTruncate.diff
>
>
> In ParameterMappingTest   I see the following differences between embedded 
> and client.  Client is truncating the TIMESTAMP value.  Look for this bug 
> number in the test for reproduction.
>  case java.sql.Types.TIMESTAMP:
> if (param == 2)
> if (usingEmbedded())
> assertEquals("2004-03-12 21:14:24.938222433", 
> val.toString());
> else
> assertEquals("2004-03-12 21:14:24.938222", 
> val.toString());
> else if (param == 3)
> if (usingEmbedded())
> assertEquals("2004-04-12 04:25:26.462983731", 
> val.toString());
> else
> assertEquals("2004-04-12 04:25:26.462983", 
> val.toString());
> break; 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Updated: (DERBY-2602) TIMESTAMP value is truncated when return to client

2010-04-13 Thread Rick Hillegas (JIRA)

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

Rick Hillegas updated DERBY-2602:
-

Bug behavior facts: [Deviation from standard, Embedded/Client difference, 
Wrong query result]  (was: [Embedded/Client difference, Wrong query result])

> TIMESTAMP value is truncated  when return to client
> ---
>
> Key: DERBY-2602
> URL: https://issues.apache.org/jira/browse/DERBY-2602
> Project: Derby
>  Issue Type: Bug
>  Components: Network Client
>Affects Versions: 10.3.1.4
>Reporter: Kathey Marsden
>Assignee: Rick Hillegas
>Priority: Minor
> Attachments: d2602.java, derby-2602-01-ad-dontTruncate.diff, 
> derby-2602-01-ae-dontTruncate.diff, derby-2602-01-af-dontTruncate.diff
>
>
> In ParameterMappingTest   I see the following differences between embedded 
> and client.  Client is truncating the TIMESTAMP value.  Look for this bug 
> number in the test for reproduction.
>  case java.sql.Types.TIMESTAMP:
> if (param == 2)
> if (usingEmbedded())
> assertEquals("2004-03-12 21:14:24.938222433", 
> val.toString());
> else
> assertEquals("2004-03-12 21:14:24.938222", 
> val.toString());
> else if (param == 3)
> if (usingEmbedded())
> assertEquals("2004-04-12 04:25:26.462983731", 
> val.toString());
> else
> assertEquals("2004-04-12 04:25:26.462983", 
> val.toString());
> break; 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Updated: (DERBY-2602) TIMESTAMP value is truncated when return to client

2010-04-13 Thread Rick Hillegas (JIRA)

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

Rick Hillegas updated DERBY-2602:
-

Attachment: derby-2602-01-af-dontTruncate.diff

Thanks, Knut. You are right. The abstract method in Connection makes this 
better. I have made that change and added a compatibility test to the next rev 
of the patch: derby-2602-01-af-dontTruncate.diff. I am re-running the 
regression tests now.  Thanks.

> TIMESTAMP value is truncated  when return to client
> ---
>
> Key: DERBY-2602
> URL: https://issues.apache.org/jira/browse/DERBY-2602
> Project: Derby
>  Issue Type: Bug
>  Components: Network Client
>Affects Versions: 10.3.1.4
>Reporter: Kathey Marsden
>Assignee: Rick Hillegas
>Priority: Minor
> Attachments: d2602.java, derby-2602-01-ad-dontTruncate.diff, 
> derby-2602-01-ae-dontTruncate.diff, derby-2602-01-af-dontTruncate.diff
>
>
> In ParameterMappingTest   I see the following differences between embedded 
> and client.  Client is truncating the TIMESTAMP value.  Look for this bug 
> number in the test for reproduction.
>  case java.sql.Types.TIMESTAMP:
> if (param == 2)
> if (usingEmbedded())
> assertEquals("2004-03-12 21:14:24.938222433", 
> val.toString());
> else
> assertEquals("2004-03-12 21:14:24.938222", 
> val.toString());
> else if (param == 3)
> if (usingEmbedded())
> assertEquals("2004-04-12 04:25:26.462983731", 
> val.toString());
> else
> assertEquals("2004-04-12 04:25:26.462983", 
> val.toString());
> break; 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Updated: (DERBY-2602) TIMESTAMP value is truncated when return to client

2010-04-13 Thread Rick Hillegas (JIRA)

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

Rick Hillegas updated DERBY-2602:
-

Attachment: derby-2602-01-ae-dontTruncate.diff

Thanks for those suggestions, Knut. Attaching 
derby-2602-01-ae-dontTruncate.diff, which eliminates the extra cached version 
of NetDatabaseMetaData. However, things are still a little pear-shaped. I am 
not able to remove serverSupportsTimestampNanoseconds() from the Agent classes. 
This is because that method is implemented in the net package but is needed by 
Cursor in the am package. It seems wrong to me for an am class to directly 
reference net classes. Mind you, I'm not a big fan of the split between am and 
net, but there it is. Thanks.

> TIMESTAMP value is truncated  when return to client
> ---
>
> Key: DERBY-2602
> URL: https://issues.apache.org/jira/browse/DERBY-2602
> Project: Derby
>  Issue Type: Bug
>  Components: Network Client
>Affects Versions: 10.3.1.4
>Reporter: Kathey Marsden
>Assignee: Rick Hillegas
>Priority: Minor
> Attachments: d2602.java, derby-2602-01-ad-dontTruncate.diff, 
> derby-2602-01-ae-dontTruncate.diff
>
>
> In ParameterMappingTest   I see the following differences between embedded 
> and client.  Client is truncating the TIMESTAMP value.  Look for this bug 
> number in the test for reproduction.
>  case java.sql.Types.TIMESTAMP:
> if (param == 2)
> if (usingEmbedded())
> assertEquals("2004-03-12 21:14:24.938222433", 
> val.toString());
> else
> assertEquals("2004-03-12 21:14:24.938222", 
> val.toString());
> else if (param == 3)
> if (usingEmbedded())
> assertEquals("2004-04-12 04:25:26.462983731", 
> val.toString());
> else
> assertEquals("2004-04-12 04:25:26.462983", 
> val.toString());
> break; 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Updated: (DERBY-2602) TIMESTAMP value is truncated when return to client

2010-04-12 Thread Rick Hillegas (JIRA)

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

Rick Hillegas updated DERBY-2602:
-

Attachment: derby-2602-01-ad-dontTruncate.diff

Attaching derby-2602-01-ad-dontTruncate.diff. This patch makes the client and 
server exchange full nanosecond-precision timestamps as happens in the embedded 
situation.

Although the regression tests pass, this patch is not ready for commit. I would 
like to verify the compatibility of this patch with older clients.

Once this new behavior is committed, we may want to correct some metadata. For 
instance, the maximum column width for timestamps is 26 characters today. That 
is correct for timestamps which only have millisecond-precision, but for full 
nanosecond-precision, the column width should be 29 characters. However, I 
don't want to muddy this patch with that change because I suspect that it may 
affect a lot of test results.

One of the tricky bits about coding this patch was tracking down the relevant 
places in the code where the magic number 26 was used. I have replaced those 
magic numbers with a constant. Hopefully that will help the next person who has 
to study this logic.

Touches the following files:

M  java/engine/org/apache/derby/iapi/types/TypeId.java
M  java/engine/org/apache/derby/iapi/reference/DRDAConstants.java

Introduce constants to replace magic numbers.

---

M  java/drda/org/apache/derby/impl/drda/AppRequester.java
M  java/client/org/apache/derby/client/net/NetAgent.java
M  java/client/org/apache/derby/client/net/NetDatabaseMetaData.java
M  java/client/org/apache/derby/client/net/NetConnection.java
M  java/client/org/apache/derby/client/am/Connection.java
M  java/client/org/apache/derby/client/am/Agent.java

Create methods for determining whether the connection supports 
nanosecond-precision timestamps.

---

M  java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
M  java/drda/org/apache/derby/impl/drda/FdocaConstants.java
M  java/client/org/apache/derby/client/net/Request.java
M  java/client/org/apache/derby/client/am/Cursor.java
M  java/client/org/apache/derby/client/am/DateTime.java
M  java/client/org/apache/derby/client/net/NetStatementRequest.java

Logic to use full nanosecond-precision timestamps if the connection allows it.


---

M  
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java

Updated this test to account for the corrected behavior.


> TIMESTAMP value is truncated  when return to client
> ---
>
> Key: DERBY-2602
> URL: https://issues.apache.org/jira/browse/DERBY-2602
> Project: Derby
>  Issue Type: Bug
>  Components: Network Client
>Affects Versions: 10.3.1.4
>Reporter: Kathey Marsden
>Assignee: Rick Hillegas
>Priority: Minor
> Attachments: d2602.java, derby-2602-01-ad-dontTruncate.diff
>
>
> In ParameterMappingTest   I see the following differences between embedded 
> and client.  Client is truncating the TIMESTAMP value.  Look for this bug 
> number in the test for reproduction.
>  case java.sql.Types.TIMESTAMP:
> if (param == 2)
> if (usingEmbedded())
> assertEquals("2004-03-12 21:14:24.938222433", 
> val.toString());
> else
> assertEquals("2004-03-12 21:14:24.938222", 
> val.toString());
> else if (param == 3)
> if (usingEmbedded())
> assertEquals("2004-04-12 04:25:26.462983731", 
> val.toString());
> else
> assertEquals("2004-04-12 04:25:26.462983", 
> val.toString());
> break; 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Updated: (DERBY-2602) TIMESTAMP value is truncated when return to client

2009-08-17 Thread Knut Anders Hatlen (JIRA)

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

Knut Anders Hatlen updated DERBY-2602:
--

  Issue & fix info: [Repro attached]
   Urgency: Normal
Bug behavior facts: [Embedded/Client difference, Wrong query result]

> TIMESTAMP value is truncated  when return to client
> ---
>
> Key: DERBY-2602
> URL: https://issues.apache.org/jira/browse/DERBY-2602
> Project: Derby
>  Issue Type: Bug
>  Components: Network Client
>Affects Versions: 10.3.1.4
>Reporter: Kathey Marsden
>Priority: Minor
> Attachments: d2602.java
>
>
> In ParameterMappingTest   I see the following differences between embedded 
> and client.  Client is truncating the TIMESTAMP value.  Look for this bug 
> number in the test for reproduction.
>  case java.sql.Types.TIMESTAMP:
> if (param == 2)
> if (usingEmbedded())
> assertEquals("2004-03-12 21:14:24.938222433", 
> val.toString());
> else
> assertEquals("2004-03-12 21:14:24.938222", 
> val.toString());
> else if (param == 3)
> if (usingEmbedded())
> assertEquals("2004-04-12 04:25:26.462983731", 
> val.toString());
> else
> assertEquals("2004-04-12 04:25:26.462983", 
> val.toString());
> break; 

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



[jira] Updated: (DERBY-2602) TIMESTAMP value is truncated when return to client

2009-01-09 Thread Kathey Marsden (JIRA)

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

Kathey Marsden updated DERBY-2602:
--

Assignee: (was: Mayuresh Nirhali)

Haven't heard from the issue owner in some time.  Unassigning so maybe someone 
else can pick it up.  Please reassign yourself if you are still interested in 
pursuing this issue.



> TIMESTAMP value is truncated  when return to client
> ---
>
> Key: DERBY-2602
> URL: https://issues.apache.org/jira/browse/DERBY-2602
> Project: Derby
>  Issue Type: Bug
>  Components: Network Client
>Affects Versions: 10.3.1.4
>Reporter: Kathey Marsden
>Priority: Minor
> Attachments: d2602.java
>
>
> In ParameterMappingTest   I see the following differences between embedded 
> and client.  Client is truncating the TIMESTAMP value.  Look for this bug 
> number in the test for reproduction.
>  case java.sql.Types.TIMESTAMP:
> if (param == 2)
> if (usingEmbedded())
> assertEquals("2004-03-12 21:14:24.938222433", 
> val.toString());
> else
> assertEquals("2004-03-12 21:14:24.938222", 
> val.toString());
> else if (param == 3)
> if (usingEmbedded())
> assertEquals("2004-04-12 04:25:26.462983731", 
> val.toString());
> else
> assertEquals("2004-04-12 04:25:26.462983", 
> val.toString());
> break; 

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



[jira] Updated: (DERBY-2602) TIMESTAMP value is truncated when return to client

2007-05-03 Thread Kathey Marsden (JIRA)

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

Kathey Marsden updated DERBY-2602:
--

Attachment: d2602.java

The issue is with java.sql.Timestamp object as well 
Attached is a reproduction which shows the following behavior.

Embedded Timestamp
getHours:17
getMinutes:14
getSeconds:24
getNanos:97625551

Network Timestamp
getHours:17
getMinutes:14
getSeconds:24
getNanos:97625000



> TIMESTAMP value is truncated  when return to client
> ---
>
> Key: DERBY-2602
> URL: https://issues.apache.org/jira/browse/DERBY-2602
> Project: Derby
>  Issue Type: Bug
>  Components: Network Client
>Affects Versions: 10.3.0.0
>Reporter: Kathey Marsden
>Priority: Minor
> Attachments: d2602.java
>
>
> In ParameterMappingTest   I see the following differences between embedded 
> and client.  Client is truncating the TIMESTAMP value.  Look for this bug 
> number in the test for reproduction.
>  case java.sql.Types.TIMESTAMP:
> if (param == 2)
> if (usingEmbedded())
> assertEquals("2004-03-12 21:14:24.938222433", 
> val.toString());
> else
> assertEquals("2004-03-12 21:14:24.938222", 
> val.toString());
> else if (param == 3)
> if (usingEmbedded())
> assertEquals("2004-04-12 04:25:26.462983731", 
> val.toString());
> else
> assertEquals("2004-04-12 04:25:26.462983", 
> val.toString());
> break; 

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