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 "Daniel John Debrunner (JIRA)" <ji...@apache.org> on 2007/01/19 20:39:30 UTC

[jira] Created: (DERBY-2260) DatabaseMetaData.getTypeInfo() returns incorrect precision for VARCHAR FOR BIT DATA

DatabaseMetaData.getTypeInfo() returns incorrect precision for VARCHAR FOR BIT DATA
-----------------------------------------------------------------------------------

                 Key: DERBY-2260
                 URL: https://issues.apache.org/jira/browse/DERBY-2260
             Project: Derby
          Issue Type: Bug
    Affects Versions: 10.2.2.0, 10.2.1.6, 10.1.3.1, 10.1.2.1, 10.1.1.0, 10.0.2.1, 10.3.0.0
            Reporter: Daniel John Debrunner
            Priority: Minor


PRECISION column for VARCHAR FOR BIT DATA is returned as 32762, but maximum precision is 32672 (6 & 7 swapped).

ij> create table z (a varchar(32672) for bit data);
0 rows inserted/updated/deleted
ij> create table z2(a varchar(32673) for bit data);
ERROR 42611: The length, precision, or scale attribute for column, or type mapping 'VARCHAR (32673) FOR BIT DATA' is not valid.

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

        

[jira] Commented: (DERBY-2260) DatabaseMetaData.getTypeInfo() returns incorrect precision for VARCHAR FOR BIT DATA

Posted by "Saurabh Vyas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470632 ] 

Saurabh Vyas commented on DERBY-2260:
-------------------------------------

This correction in the PRECISION values requires change in DatabaseMetaDataTest.java as the test now checks for correct precision.
This is also implemented in patch for Derby-2558.

NOTE : In future I 'll try and work on all issues independently & not mixing them (like what I did for Derby  2258, 2259 & 2260). My apologies if this caused inconvenience.  

> DatabaseMetaData.getTypeInfo() returns incorrect precision for VARCHAR FOR BIT DATA
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-2260
>                 URL: https://issues.apache.org/jira/browse/DERBY-2260
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.0.0
>            Reporter: Daniel John Debrunner
>         Assigned To: Saurabh Vyas
>            Priority: Minor
>
> PRECISION column for VARCHAR FOR BIT DATA is returned as 32762, but maximum precision is 32672 (6 & 7 swapped).
> ij> create table z (a varchar(32672) for bit data);
> 0 rows inserted/updated/deleted
> ij> create table z2(a varchar(32673) for bit data);
> ERROR 42611: The length, precision, or scale attribute for column, or type mapping 'VARCHAR (32673) FOR BIT DATA' is not valid.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-2260) DatabaseMetaData.getTypeInfo() returns incorrect precision for VARCHAR FOR BIT DATA

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-2260:
----------------------------------

    Fix Version/s: 10.3.0.0

> DatabaseMetaData.getTypeInfo() returns incorrect precision for VARCHAR FOR BIT DATA
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-2260
>                 URL: https://issues.apache.org/jira/browse/DERBY-2260
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.0.0
>            Reporter: Daniel John Debrunner
>         Assigned To: Saurabh Vyas
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>
> PRECISION column for VARCHAR FOR BIT DATA is returned as 32762, but maximum precision is 32672 (6 & 7 swapped).
> ij> create table z (a varchar(32672) for bit data);
> 0 rows inserted/updated/deleted
> ij> create table z2(a varchar(32673) for bit data);
> ERROR 42611: The length, precision, or scale attribute for column, or type mapping 'VARCHAR (32673) FOR BIT DATA' is not valid.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-2260) DatabaseMetaData.getTypeInfo() returns incorrect precision for VARCHAR FOR BIT DATA

Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470647 ] 

Daniel John Debrunner commented on DERBY-2260:
----------------------------------------------

It was just a safety check to ensure that a NULL value was not being returned for precision. Probably not required (before the XML changes) since a precision of zero was never returned. We can assume that a NULL will be returned as zero.

Now with the addition of an XML type you need to test that a NULL value is being returned, checking for a precision of 0 is not enough. So for the XML case you need ensure that rs.wasNull() returns true.

> DatabaseMetaData.getTypeInfo() returns incorrect precision for VARCHAR FOR BIT DATA
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-2260
>                 URL: https://issues.apache.org/jira/browse/DERBY-2260
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.0.0
>            Reporter: Daniel John Debrunner
>         Assigned To: Saurabh Vyas
>            Priority: Minor
>
> PRECISION column for VARCHAR FOR BIT DATA is returned as 32762, but maximum precision is 32672 (6 & 7 swapped).
> ij> create table z (a varchar(32672) for bit data);
> 0 rows inserted/updated/deleted
> ij> create table z2(a varchar(32673) for bit data);
> ERROR 42611: The length, precision, or scale attribute for column, or type mapping 'VARCHAR (32673) FOR BIT DATA' is not valid.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-2260) DatabaseMetaData.getTypeInfo() returns incorrect precision for VARCHAR FOR BIT DATA

Posted by "Saurabh Vyas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470667 ] 

Saurabh Vyas commented on DERBY-2260:
-------------------------------------

Thanks again. Added the check for XML data type that it can have NULL value for precision, for other precision cannot be NULL.
New patch for DERBY-2258 (Derby-2258_v4) addressed this change.

> DatabaseMetaData.getTypeInfo() returns incorrect precision for VARCHAR FOR BIT DATA
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-2260
>                 URL: https://issues.apache.org/jira/browse/DERBY-2260
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.0.0
>            Reporter: Daniel John Debrunner
>         Assigned To: Saurabh Vyas
>            Priority: Minor
>
> PRECISION column for VARCHAR FOR BIT DATA is returned as 32762, but maximum precision is 32672 (6 & 7 swapped).
> ij> create table z (a varchar(32672) for bit data);
> 0 rows inserted/updated/deleted
> ij> create table z2(a varchar(32673) for bit data);
> ERROR 42611: The length, precision, or scale attribute for column, or type mapping 'VARCHAR (32673) FOR BIT DATA' is not valid.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-2260) DatabaseMetaData.getTypeInfo() returns incorrect precision for VARCHAR FOR BIT DATA

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-2260:
----------------------------------

    Component/s: JDBC

> DatabaseMetaData.getTypeInfo() returns incorrect precision for VARCHAR FOR BIT DATA
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-2260
>                 URL: https://issues.apache.org/jira/browse/DERBY-2260
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.1.4
>            Reporter: Daniel John Debrunner
>            Assignee: Saurabh Vyas
>            Priority: Minor
>             Fix For: 10.3.1.4
>
>
> PRECISION column for VARCHAR FOR BIT DATA is returned as 32762, but maximum precision is 32672 (6 & 7 swapped).
> ij> create table z (a varchar(32672) for bit data);
> 0 rows inserted/updated/deleted
> ij> create table z2(a varchar(32673) for bit data);
> ERROR 42611: The length, precision, or scale attribute for column, or type mapping 'VARCHAR (32673) FOR BIT DATA' is not valid.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DERBY-2260) DatabaseMetaData.getTypeInfo() returns incorrect precision for VARCHAR FOR BIT DATA

Posted by "Saurabh Vyas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Saurabh Vyas resolved DERBY-2260.
---------------------------------

    Resolution: Fixed

> DatabaseMetaData.getTypeInfo() returns incorrect precision for VARCHAR FOR BIT DATA
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-2260
>                 URL: https://issues.apache.org/jira/browse/DERBY-2260
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.0.0
>            Reporter: Daniel John Debrunner
>         Assigned To: Saurabh Vyas
>            Priority: Minor
>
> PRECISION column for VARCHAR FOR BIT DATA is returned as 32762, but maximum precision is 32672 (6 & 7 swapped).
> ij> create table z (a varchar(32672) for bit data);
> 0 rows inserted/updated/deleted
> ij> create table z2(a varchar(32673) for bit data);
> ERROR 42611: The length, precision, or scale attribute for column, or type mapping 'VARCHAR (32673) FOR BIT DATA' is not valid.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (DERBY-2260) DatabaseMetaData.getTypeInfo() returns incorrect precision for VARCHAR FOR BIT DATA

Posted by "Saurabh Vyas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Saurabh Vyas reassigned DERBY-2260:
-----------------------------------

    Assignee: Saurabh Vyas

> DatabaseMetaData.getTypeInfo() returns incorrect precision for VARCHAR FOR BIT DATA
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-2260
>                 URL: https://issues.apache.org/jira/browse/DERBY-2260
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.0.0
>            Reporter: Daniel John Debrunner
>         Assigned To: Saurabh Vyas
>            Priority: Minor
>
> PRECISION column for VARCHAR FOR BIT DATA is returned as 32762, but maximum precision is 32672 (6 & 7 swapped).
> ij> create table z (a varchar(32672) for bit data);
> 0 rows inserted/updated/deleted
> ij> create table z2(a varchar(32673) for bit data);
> ERROR 42611: The length, precision, or scale attribute for column, or type mapping 'VARCHAR (32673) FOR BIT DATA' is not valid.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-2260) DatabaseMetaData.getTypeInfo() returns incorrect precision for VARCHAR FOR BIT DATA

Posted by "Saurabh Vyas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470633 ] 

Saurabh Vyas commented on DERBY-2260:
-------------------------------------

I have a question regarding assertFalse(rs.wasNull()) in testGetTypeInfo() method in DatabaseMetaDataTest.java. After one 'assertEquals' for precision, there is an 'assertFalse'. Why this assert is required? This assert was failing for me (after I had added case for XML data type for precision).
Did I missed any thing in the test ? 

> DatabaseMetaData.getTypeInfo() returns incorrect precision for VARCHAR FOR BIT DATA
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-2260
>                 URL: https://issues.apache.org/jira/browse/DERBY-2260
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.0.0
>            Reporter: Daniel John Debrunner
>         Assigned To: Saurabh Vyas
>            Priority: Minor
>
> PRECISION column for VARCHAR FOR BIT DATA is returned as 32762, but maximum precision is 32672 (6 & 7 swapped).
> ij> create table z (a varchar(32672) for bit data);
> 0 rows inserted/updated/deleted
> ij> create table z2(a varchar(32673) for bit data);
> ERROR 42611: The length, precision, or scale attribute for column, or type mapping 'VARCHAR (32673) FOR BIT DATA' is not valid.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.