|
This correction in the PRECISION values requires change in DatabaseMetaDataTest.java as the test now checks for correct precision.
This is also implemented in patch for Derby-2558. NOTE : In future I 'll try and work on all issues independently & not mixing them (like what I did for Derby 2258, 2259 & 2260). My apologies if this caused inconvenience. I have a question regarding assertFalse(rs.wasNull()) in testGetTypeInfo() method in DatabaseMetaDataTest.java. After one 'assertEquals' for precision, there is an 'assertFalse'. Why this assert is required? This assert was failing for me (after I had added case for XML data type for precision).
Did I missed any thing in the test ? It was just a safety check to ensure that a NULL value was not being returned for precision. Probably not required (before the XML changes) since a precision of zero was never returned. We can assume that a NULL will be returned as zero.
Now with the addition of an XML type you need to test that a NULL value is being returned, checking for a precision of 0 is not enough. So for the XML case you need ensure that rs.wasNull() returns true. Thanks again. Added the check for XML data type that it can have NULL value for precision, for other precision cannot be NULL.
New patch for |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getTypeInfo() method in 'metadata.properties' returns incorrect value for the maximum precision in case of VARCHAR FOR BIT DATA.
Thus modifying the value '32672' & modifying test output also to expect the correct value.