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-5407) When run across the network, dblook produces unusable DDL for VARCHAR FOR BIT DATA columns.
Date Wed, 18 Jul 2012 08:26:34 GMT

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

Knut Anders Hatlen commented on DERBY-5407:
-------------------------------------------

Maybe BaseTypeIdImpl.getTypeFormatId() could use the constants in TypeId (like TypeId.VARBIT_NAME)?
That might make it more robust against typos like the ones that caused this bug.

I would think that it's OK to remove the tests for "VARCHAR FOR BIT DATA" and "CHAR FOR BIT
DATA", as they're likely just typos. But I don't see much harm in keeping them just in case.
Perhaps move those two checks to the end of the method, and add a comment saying that they're
most likely not needed?

It's great that you added test cases for all the data types. According to the code coverage
results for BaseTypeIdImpl.getTypeFormatId(), none of the types were covered by existing tests,
so it's good to get all of them tested.
                
> 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
>         Attachments: DERBY5407_patch1_diff.txt, SystemCatalogTest.java
>
>
> 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