Details
Description
While trying the new Derby release (10.6.1.0), I ran into the following error using XPLAIN style tables:
ERROR 22001: A truncation error was encountered trying to shrink CHAR 'C0A80265.A193-436003464463927241
{25}' to length 32.
(Full stack trace is at the end of this message)
The culprit seems to be that the table SYSXPLAIN_STATEMENTS is created with a column 'DRDA_ID CHAR(32)'.
After digging in the Derby code I found the following in org.apache.derby.diag.ErrorLogReader
EmbedResultSetMetaData.getResultColumnDescriptor("DRDAID", Types.VARCHAR, true, 50),
However, I also found the following in org.apache.derby.impl.sql.catalog.XPLAINStatementDescriptor
SystemColumnImpl.getColumn("DRDA_ID", Types.CHAR, true, 32),
Another error in the XPLAIN tables is the following:
ERROR 22001: A truncation error was encountered trying to shrink VARCHAR 'Column[0][0] Id: 18
Operator: =
Ordered nulls: false
Unknown&' to length 512.
This time, it's the SYSXPLAIN_SCAN_PROPS table (org.apache.derby.impl.sql.catalog.XPLAINScanPropsDescriptor):
SystemColumnImpl.getColumn("SCAN_QUALIFIERS", Types.VARCHAR, true, 512),
Attachments
Issue Links
- is part of
-
DERBY-4772 Data truncation error with XPLAIN-functionality enabled
- Closed