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)" <de...@db.apache.org> on 2006/08/31 19:45:22 UTC

[jira] Created: (DERBY-1790) DatabaseMetaData.getTables() with passed in table type of SYNONYM returns system tables and not SYNONYMS

DatabaseMetaData.getTables() with passed in table type of SYNONYM returns system tables and not SYNONYMS
--------------------------------------------------------------------------------------------------------

                 Key: DERBY-1790
                 URL: http://issues.apache.org/jira/browse/DERBY-1790
             Project: Derby
          Issue Type: Bug
          Components: JDBC
    Affects Versions: 10.1.3.1, 10.1.3.0, 10.1.2.1, 10.1.1.0, 10.2.1.0, 10.3.0.0
            Reporter: Daniel John Debrunner
            Priority: Minor


This database metadata call will not  return SYNONYMS in the schema indicated.

rs = dmd.getTables((String) null, schema, (String) null,
                new String[] {"SYNONYM"});

Work around is to pass in null as the last argument and then test for each row

"SYNONYM".equals(rs.getString("TABLE_TYPE"))

Due to code in EmbedDatabasemetaData aorund line 1721 that assume the type character in SYS.SYSTABLES.TABLETYPE
is equal to the first character of the JDBC TABLE_TYPE name. This is true for views and tables, but in the Derby system table
the character 'S' is used for system tables and 'A' for SYNONYMS. 

-- 
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] Assigned: (DERBY-1790) DatabaseMetaData.getTables() with passed in table type of SYNONYM returns system tables and not SYNONYMS

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

Kathey Marsden reassigned DERBY-1790:
-------------------------------------

    Assignee: Kathey Marsden

> DatabaseMetaData.getTables() with passed in table type of SYNONYM returns system tables and not SYNONYMS
> --------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1790
>                 URL: https://issues.apache.org/jira/browse/DERBY-1790
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.3.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Kathey Marsden
>            Priority: Minor
>
> This database metadata call will not  return SYNONYMS in the schema indicated.
> rs = dmd.getTables((String) null, schema, (String) null,
>                 new String[] {"SYNONYM"});
> Work around is to pass in null as the last argument and then test for each row
> "SYNONYM".equals(rs.getString("TABLE_TYPE"))
> Due to code in EmbedDatabasemetaData aorund line 1721 that assume the type character in SYS.SYSTABLES.TABLETYPE
> is equal to the first character of the JDBC TABLE_TYPE name. This is true for views and tables, but in the Derby system table
> the character 'S' is used for system tables and 'A' for SYNONYMS. 

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


[jira] Resolved: (DERBY-1790) DatabaseMetaData.getTables() with passed in table type of SYNONYM returns system tables and not SYNONYMS

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

Kathey Marsden resolved DERBY-1790.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 10.4.0.0
                   10.3.1.5

> DatabaseMetaData.getTables() with passed in table type of SYNONYM returns system tables and not SYNONYMS
> --------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1790
>                 URL: https://issues.apache.org/jira/browse/DERBY-1790
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.3.1.4
>            Reporter: Daniel John Debrunner
>            Assignee: Kathey Marsden
>            Priority: Minor
>             Fix For: 10.3.1.5, 10.4.0.0
>
>
> This database metadata call will not  return SYNONYMS in the schema indicated.
> rs = dmd.getTables((String) null, schema, (String) null,
>                 new String[] {"SYNONYM"});
> Work around is to pass in null as the last argument and then test for each row
> "SYNONYM".equals(rs.getString("TABLE_TYPE"))
> Due to code in EmbedDatabasemetaData aorund line 1721 that assume the type character in SYS.SYSTABLES.TABLETYPE
> is equal to the first character of the JDBC TABLE_TYPE name. This is true for views and tables, but in the Derby system table
> the character 'S' is used for system tables and 'A' for SYNONYMS. 

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


[jira] Commented: (DERBY-1790) DatabaseMetaData.getTables() with passed in table type of SYNONYM returns system tables and not SYNONYMS

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1790?page=comments#action_12431931 ] 
            
Daniel John Debrunner commented on DERBY-1790:
----------------------------------------------

and of course the algorithm is flawed because SYSTEM_TABLE and SYNONYM both start with an 'S' thus always map to the same type in the derby system tables. Another workaround would be to use any word starting with 'A' (I think).

> DatabaseMetaData.getTables() with passed in table type of SYNONYM returns system tables and not SYNONYMS
> --------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1790
>                 URL: http://issues.apache.org/jira/browse/DERBY-1790
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.1.1.0, 10.2.1.0, 10.1.2.1, 10.1.3.0, 10.3.0.0, 10.1.3.1
>            Reporter: Daniel John Debrunner
>            Priority: Minor
>
> This database metadata call will not  return SYNONYMS in the schema indicated.
> rs = dmd.getTables((String) null, schema, (String) null,
>                 new String[] {"SYNONYM"});
> Work around is to pass in null as the last argument and then test for each row
> "SYNONYM".equals(rs.getString("TABLE_TYPE"))
> Due to code in EmbedDatabasemetaData aorund line 1721 that assume the type character in SYS.SYSTABLES.TABLETYPE
> is equal to the first character of the JDBC TABLE_TYPE name. This is true for views and tables, but in the Derby system table
> the character 'S' is used for system tables and 'A' for SYNONYMS. 

-- 
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