Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
10.8.2.2
-
None
-
Normal
-
Release Note Needed, Repro attached
-
Deviation from standard
Description
SQL:2003, part 2, 6.12 <cast specification> specifies that a truncation warning should be raised when casting from one (character or binary) string data type to another. Derby does truncate, but it doesn't raise a warning:
ij> values cast('abc' as char(2));
1
–
ab
1 row selected
ij> values cast(x'cafebabe' as char(2) for bit data);
1
cafe
1 row selected
We should generate a warning in order to be compliant.
Attachments
Attachments
Issue Links
- duplicates
-
DERBY-129 Derby should throw a truncation error or warning when CASTing a parameter/constant to char or char for bit datatypes and the data is too large for the datatype.
- Closed
- is related to
-
DERBY-5525 Precision for UPPER function is wrong if the returned value is longer than the literal argument
- Open
- relates to
-
DERBY-5749 Implicit cast of variable length values, e.g. as arguments to stored methods and generated columns values, silently truncate if too long
- Closed