db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2350) Use of XML values in the action statement of a trigger throw exceptions.
Date Fri, 29 Jun 2007 01:50:04 GMT

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

Daniel John Debrunner commented on DERBY-2350:

Some trigger background here:


I believe 2) is the best approach. The before & after rows are currently forced as JDBC
objects which means a performance hit for most datatypes.
There's no reason to use JDBC, it's a hang over from Cloudscape 4.x when a non-standard mechanism
was provided to access the before & after rows. But now Derby uses standard SQL to access
the before & after rows, thus there is no requirement to convert the row into a JDBC form,
keeping the rows as Derby rows (Row & DataValueDescriptor's) would make more sense. This
approach would also avoid any jdk specific issues since the SQLXML datatype was only introduced
in JDBC 4.

Not sure of the effort involved, I'll try to think about it.

> Use of XML values in the action statement of a trigger throw exceptions.
> ------------------------------------------------------------------------
>                 Key: DERBY-2350
>                 URL: https://issues.apache.org/jira/browse/DERBY-2350
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions:
>            Reporter: Daniel John Debrunner
> A  trigger like, where V, V1 and V2 are columns of type XML will thrown an exception
when fired.
>                 REFERENCING NEW_TABLE AS N
>                 FOR EACH STATEMENT  
>                 INSERT INTO T_ACTION_STATEMENT(A, V1, ID, V2) 
>                 SELECT 'I', V, ID, V FROM N
> ERROR 38000: The exception 'java.sql.SQLException: An attempt was made to get a data
value of type 'java.lang.Object' from a data value of type 'XML'.' was thrown while evaluating
an expression.
> Most likely because triggers are implementing using VTIs and hence JDBC ResultSets and
XML is not supported through JDBC yet.
> TriggerTest shows this issue, see the comment with the bug number to reproduce.

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

View raw message