db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta A. Satoor (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2896) DatabaseMetaData.getTables() fails in TERRORITY_BASED collation database with SQLState 42818: Comparisions between CHAR and CHAR not allowed.
Date Thu, 12 Jul 2007 16:20:04 GMT

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

Mamta A. Satoor commented on DERBY-2896:
----------------------------------------

I am starting to derbug to see what is happening with compilation schema not being SYS. 

It looks like getTables is treated differently than other stored prepared statements in EmbedDatabaseMetaData.
For instance, for getTablePrivileges, we try to get the already prepared query(EmbedDatabaseMetaData.getTablePrivileges)
from system tables as shown below.
	PreparedStatement s = getPreparedQuery("getTablePrivileges");

For getTables, we are bypassing the system table and instead it appears that we are trying
to compile getTables's metadata query like we would any other query
	PreparedStatement s =getEmbedConnection().prepareMetaDataStatement(whereClauseTail.toString());
That might be the cause of the problem that getTables's metadata query does not get compiled
in SYS schema. Note that getTables does try to modify the metadata query text by appending
an optional additional condition to WHERE clause and it appends an ORDER BY. Maybe that's
why it can't use the system table. I am not sure. I will continue debugging. If anyone knows
about this part of the code, will like to hear to their input.


> DatabaseMetaData.getTables() fails in TERRORITY_BASED collation database with SQLState
42818: Comparisions between CHAR and CHAR not allowed.
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2896
>                 URL: https://issues.apache.org/jira/browse/DERBY-2896
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.0.0, 10.3.1.0, 10.4.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Mamta A. Satoor
>            Priority: Critical
>         Attachments: Test2896.zip
>
>
> I tried adding DatabaseMetaDataTest.suite() to be run within CollationTest so that it
would test DatabaseMetaData within a collated database.
> I had to fix one item in JDBC.dropSchema() where a string constant was being compared
to a system column while not in a system schema,
> but with that fixed the next error hit was executing DatabaseMetaData.getTables().
> I will add the code to collation test with the use of DatabaseMetaDataTest commented
out with this bug number.

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


Mime
View raw message