db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta A. Satoor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5407) When run across the network, dblook produces unusable DDL for VARCHAR FOR BIT DATA columns.
Date Tue, 10 Jul 2012 16:46:34 GMT

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

Mamta A. Satoor commented on DERBY-5407:
----------------------------------------

With my testing so far, the problem with missing length does not happen for varchar datatype
in network server. So, if a table has 2 columns, as follows
create table t2( a1 varchar( 30 ) for bit data, a2 varchar(25) ); 
then, following query in ij returns VARCHAR(25) for column a2, but it returns VARCHAR () FOR
BIT DATA for column a1.
 SELECT COLUMNDATATYPE FROM SYS.SYSCOLUMNS;

Also, if I take the network server database to embedded, following query in ij returns correct
information for both columns a1 and a2, ie  VARCHAR(25) for column a2 and VARCHAR (30) FOR
BIT DATA for column a1.
 SELECT COLUMNDATATYPE FROM SYS.SYSCOLUMNS

So, it looks like there is nothing wrong with the information stored in the underlying database.
Could it be something to do with DRDA? I will debug this further but wanted to share what
I have found so far in case if it rings a bell to someone.
                
> When run across the network, dblook produces unusable DDL for VARCHAR FOR BIT DATA columns.
> -------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5407
>                 URL: https://issues.apache.org/jira/browse/DERBY-5407
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.8.1.2
>            Reporter: Rick Hillegas
>            Assignee: Mamta A. Satoor
>              Labels: derby_triage10_9
>
> In private correspondence, Mani Afschar Yazdi reports that dblook omits the length specification
for VARCHAR FOR BIT DATA columns when run across the network. Embedded dblook runs fine. I
can reproduce this problem as follows:
> 1) Bring up a server (here I am using port 8246).
> 2) Create a database with the following ij script:
> connect 'jdbc:derby://localhost:8246/memory:db;create=true';
> create table t( a varchar( 20 ) for bit data );
> 3) Now run dblook across the network:
> java -org.apache.derby.tools.dblook -d "jdbc:derby://localhost:8246/memory:db"
> This produces the following DDL for the table:
> CREATE TABLE "APP"."T" ("A" VARCHAR () FOR BIT DATA);
> A similar experiment using an embedded database produces usable DDL which includes a
length specification for the VARCHAR FOR BIT DATA column.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message