db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-1745) System catalog columns of type BIGINT and INT created with incorrect precision of zero.
Date Wed, 15 Jun 2011 10:12:47 GMT

    [ https://issues.apache.org/jira/browse/DERBY-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13049700#comment-13049700

Knut Anders Hatlen commented on DERBY-1745:

One consequence of this was seen in the first proposed fix for DERBY-5274. When using the
CHAR function to convert a BIGINT in SYS.SYSCOLUMNS to a CHAR value in DatabaseMetaData.getColumns(),
a truncation error was raised when running on a database upgraded from or later.

For a simple reproduction, create a database with and boot it with Then
execute the following statements:

ij> create table t (x int not null generated always as identity (start with 12));
0 rows inserted/updated/deleted
ij> select char(autoincrementstart) from sys.syscolumns where columnname='X';
ERROR 22001: A truncation error was encountered trying to shrink CHAR '12' to length 1.

If the database had been created with or later, the select statement would complete

> System catalog columns of type BIGINT and INT created with incorrect precision of zero.
> ---------------------------------------------------------------------------------------
>                 Key: DERBY-1745
>                 URL: https://issues.apache.org/jira/browse/DERBY-1745
>             Project: Derby
>          Issue Type: Task
>          Components: SQL
>    Affects Versions:,,,,,
>            Reporter: Daniel John Debrunner
>            Priority: Minor
> Due to the way system column metadata was handled in the code system columns of these
types are always created with precision 0.
> User defined columns of these types will have precision 10 (INT) and 19 (BIGINT)
> DERBY-1734 will fix this for 10.3 and hopefully 10.2 by a merge before the release.
> This bug is here to investigate upgrade issues and fix them if required.
> Not known of any incorrect issues due to this, except for incorrect JDBC metadata for
such columns.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message