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:
Introduce constants to replace magic numbers.
Create methods for determining whether the connection supports nanosecond-precision timestamps.
Logic to use full nanosecond-precision timestamps if the connection allows it.
Updated this test to account for the corrected behavior.