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 19:26:30 UTC

[jira] Created: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list of supported Derby SQL types.

DatabaseMetaData.getTypeInfo() does not list of supported Derby SQL types.
--------------------------------------------------------------------------

                 Key: DERBY-2258
                 URL: https://issues.apache.org/jira/browse/DERBY-2258
             Project: Derby
          Issue Type: Bug
          Components: JDBC, Network Client
    Affects Versions: 10.2.2.0, 10.2.1.6, 10.1.3.1, 10.1.2.1, 10.1.1.0, 10.3.0.0
            Reporter: Daniel John Debrunner


These types are returned by not supported by Derby.

LONG NVARCHAR
NATIONAL CHAR
NATIONAL CHAR VARYING

The XML type is supported by Derby but not returned.


-- 
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] Updated: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

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

Saurabh Vyas updated DERBY-2258:
--------------------------------

    Attachment: Derby-2258.stat
                Derby-2258.diff

After some investigations I found out following : -

 - For Metadata values, derby uses procedures from 'metadata.properties' and getTypeInfo() is one such method. 

 - getTypeInfo() is use to for retrieving the description for all the data types supported by this database and in derby there are descriptions of some data types which are not  supported by derby  & data type like XML not present at all ( as addressed in this issue ) 

 - some data types have incorrect description (as addressed by Derby 2259 & 2260).

I had modified the procedure to remove the data type not supported by derby & added XML data type, but I am not sure for the remaining values in the description so I used values similar to that of CLOB. Can some one please correct me for XML data type on following descriptions : 

   1. TYPE_NAME String => XML
   2. DATA_TYPE int => 2007
   3. PRECISION int => 2147483647
   4. LITERAL_PREFIX String => ''''
   5. LITERAL_SUFFIX String => ''''
   6. CREATE_PARAMS String => length
   7. NULLABLE short => 1 (i.e. typeNullable)
   8. CASE_SENSITIVE boolean=> TRUE
   9. SEARCHABLE short => 0 (i.e. typePredNone)
  10. UNSIGNED_ATTRIBUTE boolean => CAST (NULL AS BOOLEAN)
  11. FIXED_PREC_SCALE boolean => FALSE
  12. AUTO_INCREMENT boolean => CAST (NULL AS BOOLEAN)
  13. LOCAL_TYPE_NAME String => CAST (NULL AS INTEGER)
  14. MINIMUM_SCALE short => CAST (NULL AS INTEGER)
  15. MAXIMUM_SCALE short => CAST (NULL AS INTEGER)

Apart this issue also address Derby-2259 (https://issues.apache.org/jira/browse/DERBY-2259) & Derby-2260 (https://issues.apache.org/jira/browse/DERBY-2260)


> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>         Attachments: Derby-2258.diff, Derby-2258.stat
>
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

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


[jira] Commented: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12468991 ] 

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

Saurabh Vyas wrote:
> should these corrections (if required ?) be implemented in this issue itself or another JIRA should be created to solve these?

Either approach is OK. I prefer separate JIRAs since that makes the discussion less confusing, and the patches smaller and easier to review.

> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>         Attachments: Derby-2258.diff, Derby-2258.stat, Derby-2258_v2.diff
>
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

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


[jira] Assigned: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

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

Saurabh Vyas reassigned DERBY-2258:
-----------------------------------

    Assignee: Saurabh Vyas

> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

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


[jira] Commented: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

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

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

Not sure what PRECISION should be for an XML type. It doesn't really have any meaning, but I bet returning NULL there would not be acceptable. In the various JDBC docs precision is usually described as number of decimal digits, but also seems to apply to length of character strings.

> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>         Attachments: Derby-2258.diff, Derby-2258.stat
>
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

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


[jira] Updated: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

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

Saurabh Vyas updated DERBY-2258:
--------------------------------

    Derby Info: [Patch Available]

> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>         Attachments: Derby-2258.diff, Derby-2258.stat
>
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

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


[jira] Commented: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12468656 ] 

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

I think DATA_TYPE should be 2009 (java.sql.Types.SQLXML). Not sure about LITERAL_PREFIX and LITERAL_SUFFIX, but I think they should be NULL. I'm also not sure about CREATE_PARAMS, but suspect it should be NULL as well.

UNSIGNED_ATTRIBUTE and AUTO_INCREMENT should probably be false instead of null.

LOCAL_TYPE_NAME is identical to TYPE_NAME (not null) for the other types, but that seems to be how your patch implements it too. (You probably got confused by the query in metadata.properties. The VALUES clause has 15 columns, but the top-level SELECT inserts three extra columns at position 13, 16 and 17.)

> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>         Attachments: Derby-2258.diff, Derby-2258.stat
>
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

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


[jira] Updated: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list of supported Derby SQL types.

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

Daniel John Debrunner updated DERBY-2258:
-----------------------------------------

    Priority: Minor  (was: Major)

> DatabaseMetaData.getTypeInfo() does not list of supported Derby SQL types.
> --------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>            Priority: Minor
>
> These types are returned by not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

-- 
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-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

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

Saurabh Vyas commented on DERBY-2258:
-------------------------------------

Modified the test output files also as datatype which are not supported are removed from the expected output & XML is also added in the list of supported data types.

> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>         Attachments: Derby-2258.diff, Derby-2258.stat
>
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

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


[jira] Commented: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

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

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

I think the changes means the test DatabaseMetaDataTest needs to be updated, otherwise it will most likely fail.

> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>         Attachments: Derby-2258.diff, Derby-2258.stat, Derby-2258_v2.diff
>
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

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


[jira] Updated: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

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

Daniel John Debrunner updated DERBY-2258:
-----------------------------------------

    Description: 
These types are returned but not supported by Derby.

LONG NVARCHAR
NATIONAL CHAR
NATIONAL CHAR VARYING

The XML type is supported by Derby but not returned.


  was:
These types are returned by not supported by Derby.

LONG NVARCHAR
NATIONAL CHAR
NATIONAL CHAR VARYING

The XML type is supported by Derby but not returned.


        Summary: DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.  (was: DatabaseMetaData.getTypeInfo() does not list of supported Derby SQL types.)

> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>            Priority: Minor
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

-- 
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-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

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

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

Just an FYI - if in Jira comments you refer to Derby Jira issues as DERBY-2259 (upper case) then they will automatically hyperlink to the issue. Using Derby-2259 does not.

> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>         Attachments: Derby-2258.diff, Derby-2258.stat, Derby-2258_v2.diff, Derby-2258_v3.diff, Derby-2258_v3.stat
>
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

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


[jira] Resolved: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

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

Saurabh Vyas resolved DERBY-2258.
---------------------------------

    Resolution: Fixed

Thanks Dan. I 'll work on DERBY-2245 also and try to provide a final patch asap.

> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>         Attachments: Derby-2258.diff, Derby-2258.stat, Derby-2258_v2.diff, Derby-2258_v3.diff, Derby-2258_v3.stat, Derby-2258_v4.diff
>
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

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


[jira] Commented: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

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

Saurabh Vyas commented on DERBY-2258:
-------------------------------------

Thanks Dan for drawing attention towards DatabaseMetaDataTest. 

Well I modified the test method testGetTypeInfo() accordingly and done the following changes :
 - removed the LONG NVARCHAR, NATIONAL CHAR, NATIONAL CHAR VARYING data (which are not supported by derby)
 - corrected the precision value for VARCHAR FOR BIT DATA
 - then I tried adding the XML data type checks also as 

<----------- code snippet---------------------> 

case Types.SQLXML:
              createParams = null;
              break;
---------------
case Types.SQLXML:
            searchable = DatabaseMetaData.typePredNone;
            break;
<------------------------------------------------------>

But after doing the last change (i.e. adding XML data type in test) I got following build error :

compilet2:
    [javac] Compiling 11 source files to /export/home/vyas/NewDerby/trunk/classes
    [javac] /export/home/vyas/NewDerby/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java:1506: cannot find symbol
    [javac] symbol  : variable SQLXML
    [javac] location: class java.sql.Types
    [javac]         case Types.SQLXML:
    [javac]                   ^
    [javac] /export/home/vyas/NewDerby/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java:1554: cannot find symbol
    [javac] symbol  : variable SQLXML
    [javac] location: class java.sql.Types
    [javac]         case Types.SQLXML:
    [javac]                   ^
    [javac] 2 errors

--------------------------

After some investigation on this, I got to know that build.xml in jdbcapi still uses jdk 1.3 & jdk 1.4 only  and SQLXML data type is added in java.sql.Types only in jdk 1.6.
Thus this modification in test will require the dependency on jdk1.6 to be added in the build.xml in jdbcapi. I tried some modification bu was not successful in getting it compiled correctly. 

Now not to make things complex I 'll raise another JIRA for this.
Also that issue will be a blocker for this issue.
Comments / Suggestions ? 



> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>         Attachments: Derby-2258.diff, Derby-2258.stat, Derby-2258_v2.diff
>
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

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


[jira] Commented: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12468984 ] 

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

Daniel John Debrunner wrote:
> Not sure what PRECISION should be for an XML type. It doesn't really have any meaning, but I bet returning NULL there would not be acceptable.

JDBC 4.0 clarified this in the javadoc:

The PRECISION column represents the maximum column size that the server supports for the given datatype. For numeric data, this is the maximum precision. For character data, this is the length in characters. For datetime datatypes, this is the length in characters of the String representation (assuming the maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, this is the length in bytes. Null is returned for data types where the column size is not applicable.

> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>         Attachments: Derby-2258.diff, Derby-2258.stat, Derby-2258_v2.diff
>
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

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


[jira] Updated: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

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

Saurabh Vyas updated DERBY-2258:
--------------------------------

    Attachment: Derby-2258_v2.diff

Thanks Knut, A B & Dan for your valuable comments. I had modified the values for XML data type as following (incorporating the changes suggested ) :

   1. TYPE_NAME String => XML
   2. DATA_TYPE int => 2009
   3. PRECISION int => CAST (NULL AS INTEGER)
   4. LITERAL_PREFIX String => CAST (NULL AS CHAR)
   5. LITERAL_SUFFIX String => CAST (NULL AS CHAR)
   6. CREATE_PARAMS String => CAST (NULL AS CHAR)
   7. NULLABLE short => 1 (i.e. typeNullable)
   8. CASE_SENSITIVE boolean=> TRUE
   9. SEARCHABLE short => 0 (i.e. typePredNone)
  10. UNSIGNED_ATTRIBUTE boolean => FALSE
  11. FIXED_PREC_SCALE boolean => FALSE
  12. AUTO_INCREMENT boolean => FALSE
  13. LOCAL_TYPE_NAME String => XML (Not required to specify as its same as TYPE_INFO)
  14. MINIMUM_SCALE short => CAST (NULL AS INTEGER)
  15. MAXIMUM_SCALE short => CAST (NULL AS INTEGER)
  16. SQL_DATA_TYPE int => unused
  17. SQL_DATETIME_SUB int => unused
  18. NUM_PREC_RADIX int => CAST (NULL AS INTEGER)

Is this correct ?
Attached version 2 for the patch with the above changes. Please have a look at Derby-2259 & Derby-2260 also to verify the fix.

Apart as mentioned by A B, 
---- "Given that the JDBC API does not say that these "may be null", I tend to agree with Knut Anders on this, too. I did find it odd that CLOB and BLOB have "null" for these values while the other char types have "TRUE" and "FALSE", respectively. Is that a bug/inconsistency that should be fixed (as a separate issue)? "

should these corrections (if required ?) be implemented in this issue itself or another JIRA should be created to solve these?

Thanks again

> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>         Attachments: Derby-2258.diff, Derby-2258.stat, Derby-2258_v2.diff
>
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

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


[jira] Updated: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

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

Saurabh Vyas updated DERBY-2258:
--------------------------------

    Attachment: Derby-2258_v3.stat
                Derby-2258_v3.diff

Incorporated all the changes required for Derby-2258, Derby-2259 & Derby-2260.

Explanation for the patch (Derby-2258_v3.diff)

 - It requires removing unsupported data types & adding XML data type. This change is incorporated in following files :

1) metadata.properties : Removed entries for LONG NVARCHAR, NATIONAL CHAR, NATIONAL CHAR VARYING data type & added XML data type in getTypeInfo()
2) DatabaseMetaDataTest.java : Removed check for unsupported types (all supported types are specified in supportedTypes array ) from testGetTypeInfo() method & added support for SQLXML type in the test. This requires extending the test to verify the field values for XML data type (like PRECISION, SEARCHABLE etc)
3) connectionJdbc20.out : It requires removing unsupported data types & adding XML data type in the expected output for the test.

This patch also address Derby-2259 & Derby-2260
 

> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>         Attachments: Derby-2258.diff, Derby-2258.stat, Derby-2258_v2.diff, Derby-2258_v3.diff, Derby-2258_v3.stat
>
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

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


[jira] Commented: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

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

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

Patch Derby-2258_v3.diff Committed revision 504234.Thanks Saurabh.
Note the patch also contained some minor changes for DERBY-2245.
Committed this before I saw there was patch 4 attached, will try to apply next.

> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>         Attachments: Derby-2258.diff, Derby-2258.stat, Derby-2258_v2.diff, Derby-2258_v3.diff, Derby-2258_v3.stat, Derby-2258_v4.diff
>
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

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


[jira] Updated: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

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

Kathey Marsden updated DERBY-2258:
----------------------------------

    Fix Version/s: 10.3.0.0

> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>
>         Attachments: Derby-2258.diff, Derby-2258.stat, Derby-2258_v2.diff, Derby-2258_v3.diff, Derby-2258_v3.stat, Derby-2258_v4.diff
>
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

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


[jira] Updated: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

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

Saurabh Vyas updated DERBY-2258:
--------------------------------

    Attachment: Derby-2258_v4.diff

Modified the assert case for XML data type in DatabaseMetaDataTest.java for precision check.

> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>         Attachments: Derby-2258.diff, Derby-2258.stat, Derby-2258_v2.diff, Derby-2258_v3.diff, Derby-2258_v3.stat, Derby-2258_v4.diff
>
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

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


[jira] Updated: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

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

Daniel John Debrunner updated DERBY-2258:
-----------------------------------------

    Derby Info:   (was: [Patch Available])

The delta from patch 3 to patch 4 was Committed revision 504241.
Note that the change for DERBY-2245 for getSQLKeywords was committed as it was part of patch 3.
Can you now mark issues as resolved if you believe you have completed them. Thanks.

> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>         Attachments: Derby-2258.diff, Derby-2258.stat, Derby-2258_v2.diff, Derby-2258_v3.diff, Derby-2258_v3.stat, Derby-2258_v4.diff
>
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

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


[jira] Commented: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

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

A B commented on DERBY-2258:
----------------------------

> I think DATA_TYPE should be 2009 (java.sql.Types.SQLXML). Not sure about
> LITERAL_PREFIX and LITERAL_SUFFIX, but I think they should be NULL. I'm
> also not sure about CREATE_PARAMS, but suspect it should be NULL as well.

I agree with Knut Anders on all of the above.  There is currently no way to specify an XML literal in SQL--a user has to use the XMLPARSE() operator, which takes a string literal--so there is no prefix/suffix defined.  And when an XML column is created, there is no length argument:

  create table t1 (x xml);  // correct.
  create table t1 (x xml(256))  // incorrect -- length not allowed

So CREATE_PARAMS should be null, too.

> UNSIGNED_ATTRIBUTE and AUTO_INCREMENT should probably be false instead of null. 

Given that the JDBC API does not say that these "may be null", I tend to agree with Knut Anders on this, too.  I did find it odd that CLOB and BLOB have "null" for these values while the other char types have "TRUE" and "FALSE", respectively.   Is that a bug/inconsistency that  should be fixed (as a separate issue)?

In ODBC land these two fields are supposed to be null "if the attribute is not applicable to the data type or the data type is not numeric"--but as people have said before, ODBC and JDBC are different, so I guess that's irrelevant...

In any event, +1 to the suggestions made by Knut Anders.

> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>         Attachments: Derby-2258.diff, Derby-2258.stat
>
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

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


[jira] Commented: (DERBY-2258) DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.

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

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

Patch 3 had an incorrect master file for connectionJdbc20, fixed:

Sending        connectionJdbc20.out
Transmitting file data .
Committed revision 504273.

> DatabaseMetaData.getTypeInfo() does not list supported Derby SQL types correctly.
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2258
>                 URL: https://issues.apache.org/jira/browse/DERBY-2258
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 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
>         Attachments: Derby-2258.diff, Derby-2258.stat, Derby-2258_v2.diff, Derby-2258_v3.diff, Derby-2258_v3.stat, Derby-2258_v4.diff
>
>
> These types are returned but not supported by Derby.
> LONG NVARCHAR
> NATIONAL CHAR
> NATIONAL CHAR VARYING
> The XML type is supported by Derby but not returned.

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