You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "A B (JIRA)" <de...@db.apache.org> on 2005/05/26 23:42:54 UTC

[jira] Created: (DERBY-319) Derby returns incorrect values for "LENGTH" column of DatabaseMetaData.getProcedureColumns() result set.

Derby returns incorrect values for "LENGTH" column of DatabaseMetaData.getProcedureColumns() result set.
--------------------------------------------------------------------------------------------------------

         Key: DERBY-319
         URL: http://issues.apache.org/jira/browse/DERBY-319
     Project: Derby
        Type: Bug
  Components: JDBC  
    Versions: 10.0.2.1, 10.0.2.0, 10.0.2.2, 10.1.0.0    
    Reporter: A B
 Assigned to: A B 
    Priority: Minor


Based on discussion from the following thread:

http://article.gmane.org/gmane.comp.apache.db.derby.devel/2585

The Derby implementation of DatabaseMetaData.getProcedureColumns() returns incorrect values for the "LENGTH" column of the result, primarily because there is no clear definition in the JDBC spec regarding what this method is _supposed_ to return.  Discussion in the above-posted thread concluded that the intent of the JDBC metadata is to "match the ODBC metadata", at least regard to this particular issue.  So changes reflecting this conclusion should be submitted to Derby.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DERBY-319) Derby returns incorrect values for "LENGTH" column of DatabaseMetaData.getProcedureColumns() result set.

Posted by "A B (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-319?page=all ]
     
A B resolved DERBY-319:
-----------------------

    Resolution: Fixed

Patch committed with revision 189855 and I have verified the change, so I'm resolving and closing this issue.

> Derby returns incorrect values for "LENGTH" column of DatabaseMetaData.getProcedureColumns() result set.
> --------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-319
>          URL: http://issues.apache.org/jira/browse/DERBY-319
>      Project: Derby
>         Type: Bug
>   Components: JDBC
>     Versions: 10.0.2.1, 10.0.2.0, 10.1.0.0, 10.0.2.2
>     Reporter: A B
>     Assignee: A B
>     Priority: Minor
>      Fix For: 10.1.0.0
>  Attachments: derby-319.patch, derby-319.stat
>
> Based on discussion from the following thread:
> http://article.gmane.org/gmane.comp.apache.db.derby.devel/2585
> The Derby implementation of DatabaseMetaData.getProcedureColumns() returns incorrect values for the "LENGTH" column of the result, primarily because there is no clear definition in the JDBC spec regarding what this method is _supposed_ to return.  Discussion in the above-posted thread concluded that the intent of the JDBC metadata is to "match the ODBC metadata", at least regard to this particular issue.  So changes reflecting this conclusion should be submitted to Derby.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-319) Derby returns incorrect values for "LENGTH" column of DatabaseMetaData.getProcedureColumns() result set.

Posted by "A B (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-319?page=all ]

A B updated DERBY-319:
----------------------

    Attachment: derby-319.stat
                derby-319.patch

Attaching a patch for this issue.  Adds a method to the TypeDesriptor interface to retrieve the max width of a column based on the ODBC specification found here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbctransfer_octet_length.asp

The new method is then used for Derby's implementation of the DatabaseMetaData methods, when appropriate (esp. in getProcedureColumns()). 

This patch also adds more datatypes to metadata_test.java  for "getColumns()" to ensure that the new "length in bytes" values are correct for the various types.

> Derby returns incorrect values for "LENGTH" column of DatabaseMetaData.getProcedureColumns() result set.
> --------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-319
>          URL: http://issues.apache.org/jira/browse/DERBY-319
>      Project: Derby
>         Type: Bug
>   Components: JDBC
>     Versions: 10.0.2.1, 10.0.2.0, 10.1.0.0, 10.0.2.2
>     Reporter: A B
>     Assignee: A B
>     Priority: Minor
>      Fix For: 10.1.0.0
>  Attachments: derby-319.patch, derby-319.stat
>
> Based on discussion from the following thread:
> http://article.gmane.org/gmane.comp.apache.db.derby.devel/2585
> The Derby implementation of DatabaseMetaData.getProcedureColumns() returns incorrect values for the "LENGTH" column of the result, primarily because there is no clear definition in the JDBC spec regarding what this method is _supposed_ to return.  Discussion in the above-posted thread concluded that the intent of the JDBC metadata is to "match the ODBC metadata", at least regard to this particular issue.  So changes reflecting this conclusion should be submitted to Derby.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-319) Derby returns incorrect values for "LENGTH" column of DatabaseMetaData.getProcedureColumns() result set.

Posted by "A B (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-319?page=all ]

A B updated DERBY-319:
----------------------

    Fix Version: 10.1.0.0

> Derby returns incorrect values for "LENGTH" column of DatabaseMetaData.getProcedureColumns() result set.
> --------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-319
>          URL: http://issues.apache.org/jira/browse/DERBY-319
>      Project: Derby
>         Type: Bug
>   Components: JDBC
>     Versions: 10.0.2.1, 10.0.2.0, 10.0.2.2, 10.1.0.0
>     Reporter: A B
>     Assignee: A B
>     Priority: Minor
>      Fix For: 10.1.0.0

>
> Based on discussion from the following thread:
> http://article.gmane.org/gmane.comp.apache.db.derby.devel/2585
> The Derby implementation of DatabaseMetaData.getProcedureColumns() returns incorrect values for the "LENGTH" column of the result, primarily because there is no clear definition in the JDBC spec regarding what this method is _supposed_ to return.  Discussion in the above-posted thread concluded that the intent of the JDBC metadata is to "match the ODBC metadata", at least regard to this particular issue.  So changes reflecting this conclusion should be submitted to Derby.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-319) Derby returns incorrect values for "LENGTH" column of DatabaseMetaData.getProcedureColumns() result set.

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-319?page=comments#action_12313113 ] 

David Van Couvering commented on DERBY-319:
-------------------------------------------

derbyall passes, +1 for this patch

> Derby returns incorrect values for "LENGTH" column of DatabaseMetaData.getProcedureColumns() result set.
> --------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-319
>          URL: http://issues.apache.org/jira/browse/DERBY-319
>      Project: Derby
>         Type: Bug
>   Components: JDBC
>     Versions: 10.0.2.1, 10.0.2.0, 10.1.0.0, 10.0.2.2
>     Reporter: A B
>     Assignee: A B
>     Priority: Minor
>      Fix For: 10.1.0.0
>  Attachments: derby-319.patch, derby-319.stat
>
> Based on discussion from the following thread:
> http://article.gmane.org/gmane.comp.apache.db.derby.devel/2585
> The Derby implementation of DatabaseMetaData.getProcedureColumns() returns incorrect values for the "LENGTH" column of the result, primarily because there is no clear definition in the JDBC spec regarding what this method is _supposed_ to return.  Discussion in the above-posted thread concluded that the intent of the JDBC metadata is to "match the ODBC metadata", at least regard to this particular issue.  So changes reflecting this conclusion should be submitted to Derby.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (DERBY-319) Derby returns incorrect values for "LENGTH" column of DatabaseMetaData.getProcedureColumns() result set.

Posted by Satheesh Bandaram <sa...@Sourcery.Org>.
Patch is committed.

Satheesh

Sending        java\build\org\apache\derbyBuild\odbcgen_fragments.properties
Sending        java\engine\org\apache\derby\catalog\GetProcedureColumns.java
Sending        java\engine\org\apache\derby\catalog\TypeDescriptor.java
Sending       
java\engine\org\apache\derby\catalog\types\TypeDescriptorImpl.java
Sending       
java\engine\org\apache\derby\iapi\types\DataTypeDescriptor.java
Sending       
java\testing\org\apache\derbyTesting\functionTests\master\DerbyNet\metadata.out
Sending       
java\testing\org\apache\derbyTesting\functionTests\master\DerbyNet\odbc_metadata.out
Sending       
java\testing\org\apache\derbyTesting\functionTests\master\DerbyNetClient\metadata.out
Sending       
java\testing\org\apache\derbyTesting\functionTests\master\DerbyNetClient\odbc_metadata.out
Sending       
java\testing\org\apache\derbyTesting\functionTests\master\metadata.out
Sending       
java\testing\org\apache\derbyTesting\functionTests\master\odbc_metadata.out
Sending       
java\testing\org\apache\derbyTesting\functionTests\tests\jdbcapi\
metadata_test.java
Transmitting file data ............
Committed revision 189855.

Army wrote:

> David Van Couvering (JIRA) wrote:
>
>>     [
>> http://issues.apache.org/jira/browse/DERBY-319?page=comments#action_12313084
>> ]
>> David Van Couvering commented on DERBY-319:
>> -------------------------------------------
>>
>> I took a look at this patch and it looks good, very clean and
>> well-documented.  Looks like you also covered
>> some types that were missing in the metadata test.
>
>
> Thanks for taking the time to review!
>
>> My only question was why some of the columns in the metadata test 
>> alltypes table, some of the columns have lots of underscores in
>> them.  I couldn't follow the logic for this.
>
>
> I see two columns that have extra underscores in them: "char8col___"
> and "char8forbitcol___".  Are these the columns you're referring to? 
> The first one was like that in the test before my patch--I don't know
> _why_ it was like that, but I didn't think it was something that
> needed to be changed.  The second one, which I added, has the extra
> underscores because I copied the first one and just added "forbitcol"
> to the name; I didn't think to remove to the extra underscores.
>
> So my answer to your question is "Umm...don't know".  But then again,
> since it doesn't hurt to have the underscores there, I'm not sure if
> this is something that we should bother changing?  Underscores are a
> valid part of a column name, so their presence seems acceptable to
> me...*shrug*
>
> If anyone believes that these column names _should_ be changed, then I
> can certainly go ahead and do so.  But personally, while they are a
> bit odd, I'm still okay with them being there...
>
> Thanks again for the review!
> Army
>
>
>


Re: [jira] Commented: (DERBY-319) Derby returns incorrect values for "LENGTH" column of DatabaseMetaData.getProcedureColumns() result set.

Posted by David Van Couvering <Da...@Sun.COM>.
I'm OK with the underscores, I was just curious about the motivation.

David

Army wrote:

> David Van Couvering (JIRA) wrote:
> 
>>     [ 
>> http://issues.apache.org/jira/browse/DERBY-319?page=comments#action_12313084 
>> ]
>> David Van Couvering commented on DERBY-319:
>> -------------------------------------------
>>
>> I took a look at this patch and it looks good, very clean and 
>> well-documented.  Looks like you also covered
>> some types that were missing in the metadata test.
> 
> 
> Thanks for taking the time to review!
> 
>> My only question was why some of the columns in the metadata test  
>> alltypes table, some of the columns have lots of underscores in them.  
>> I couldn't follow the logic for this.
> 
> 
> I see two columns that have extra underscores in them: "char8col___" and 
> "char8forbitcol___".  Are these the columns you're referring to?  The 
> first one was like that in the test before my patch--I don't know _why_ 
> it was like that, but I didn't think it was something that needed to be 
> changed.  The second one, which I added, has the extra underscores 
> because I copied the first one and just added "forbitcol" to the name; I 
> didn't think to remove to the extra underscores.
> 
> So my answer to your question is "Umm...don't know".  But then again, 
> since it doesn't hurt to have the underscores there, I'm not sure if 
> this is something that we should bother changing?  Underscores are a 
> valid part of a column name, so their presence seems acceptable to 
> me...*shrug*
> 
> If anyone believes that these column names _should_ be changed, then I 
> can certainly go ahead and do so.  But personally, while they are a bit 
> odd, I'm still okay with them being there...
> 
> Thanks again for the review!
> Army
> 

Re: [jira] Commented: (DERBY-319) Derby returns incorrect values for "LENGTH" column of DatabaseMetaData.getProcedureColumns() result set.

Posted by Army <qo...@sbcglobal.net>.
David Van Couvering (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/DERBY-319?page=comments#action_12313084 ] 
> 
> David Van Couvering commented on DERBY-319:
> -------------------------------------------
> 
> I took a look at this patch and it looks good, very clean and well-documented.  Looks like you also covered
> some types that were missing in the metadata test.

Thanks for taking the time to review!

> My only question was why some of the columns in the metadata test  alltypes table, some of the columns 
> have lots of underscores in them.  I couldn't follow the logic for this.

I see two columns that have extra underscores in them: "char8col___" and 
"char8forbitcol___".  Are these the columns you're referring to?  The first one 
was like that in the test before my patch--I don't know _why_ it was like that, 
but I didn't think it was something that needed to be changed.  The second one, 
which I added, has the extra underscores because I copied the first one and just 
added "forbitcol" to the name; I didn't think to remove to the extra underscores.

So my answer to your question is "Umm...don't know".  But then again, since it 
doesn't hurt to have the underscores there, I'm not sure if this is something 
that we should bother changing?  Underscores are a valid part of a column name, 
so their presence seems acceptable to me...*shrug*

If anyone believes that these column names _should_ be changed, then I can 
certainly go ahead and do so.  But personally, while they are a bit odd, I'm 
still okay with them being there...

Thanks again for the review!
Army


[jira] Commented: (DERBY-319) Derby returns incorrect values for "LENGTH" column of DatabaseMetaData.getProcedureColumns() result set.

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-319?page=comments#action_12313084 ] 

David Van Couvering commented on DERBY-319:
-------------------------------------------

I took a look at this patch and it looks good, very clean and well-documented.  Looks like you also covered
some types that were missing in the metadata test.

My only question was why some of the columns in the metadata test  alltypes table, some of the columns 
have lots of underscores in them.  I couldn't follow the logic for this.

It compiles fine.  I am running derbyall and will add a separate comment regarding that when it completes.

> Derby returns incorrect values for "LENGTH" column of DatabaseMetaData.getProcedureColumns() result set.
> --------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-319
>          URL: http://issues.apache.org/jira/browse/DERBY-319
>      Project: Derby
>         Type: Bug
>   Components: JDBC
>     Versions: 10.0.2.1, 10.0.2.0, 10.1.0.0, 10.0.2.2
>     Reporter: A B
>     Assignee: A B
>     Priority: Minor
>      Fix For: 10.1.0.0
>  Attachments: derby-319.patch, derby-319.stat
>
> Based on discussion from the following thread:
> http://article.gmane.org/gmane.comp.apache.db.derby.devel/2585
> The Derby implementation of DatabaseMetaData.getProcedureColumns() returns incorrect values for the "LENGTH" column of the result, primarily because there is no clear definition in the JDBC spec regarding what this method is _supposed_ to return.  Discussion in the above-posted thread concluded that the intent of the JDBC metadata is to "match the ODBC metadata", at least regard to this particular issue.  So changes reflecting this conclusion should be submitted to Derby.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (DERBY-319) Derby returns incorrect values for "LENGTH" column of DatabaseMetaData.getProcedureColumns() result set.

Posted by "A B (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-319?page=all ]
     
A B closed DERBY-319:
---------------------


> Derby returns incorrect values for "LENGTH" column of DatabaseMetaData.getProcedureColumns() result set.
> --------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-319
>          URL: http://issues.apache.org/jira/browse/DERBY-319
>      Project: Derby
>         Type: Bug
>   Components: JDBC
>     Versions: 10.0.2.1, 10.0.2.0, 10.1.0.0, 10.0.2.2
>     Reporter: A B
>     Assignee: A B
>     Priority: Minor
>      Fix For: 10.1.0.0
>  Attachments: derby-319.patch, derby-319.stat
>
> Based on discussion from the following thread:
> http://article.gmane.org/gmane.comp.apache.db.derby.devel/2585
> The Derby implementation of DatabaseMetaData.getProcedureColumns() returns incorrect values for the "LENGTH" column of the result, primarily because there is no clear definition in the JDBC spec regarding what this method is _supposed_ to return.  Discussion in the above-posted thread concluded that the intent of the JDBC metadata is to "match the ODBC metadata", at least regard to this particular issue.  So changes reflecting this conclusion should be submitted to Derby.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira