db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepa Remesh (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-551) Allow invoking java stored procedures from inside a trigger. Make CALL a valid statement in the trigger body.
Date Fri, 07 Jul 2006 22:44:32 GMT
     [ http://issues.apache.org/jira/browse/DERBY-551?page=all ]

Deepa Remesh updated DERBY-551:
-------------------------------

    Attachment: derby-551draft2.diff
                derby-551-draft2.status

Thanks Dan for looking at the patch.

I was working on a new patch and I am uploading it as I think it may address Dan's concerns.
'derby-551draft2.diff'' uses the same approach to check the sql allowed in procedures used
in before triggers. In this patch, I moved this check to triggerDefinition(). In the first
patch, I was doing the check in routineInvocation(). The patch also includes other minor changes
and additional tests.  I had run derbyall with these changes and did not see any failures.
However, I made a few small changes after that and need to run derbyall again.

I checked the case mentioned by Dan (as issue 1) where we can have the value from a function
call as a parameter to the procedure. This works as the function calls get into the parameter
list and are evaluated later when the parameters are bound. Again it is based on the assumption
of how the nodes are currently evaluated. Also, there could be other cases where this patch
may not work. If someone can think of any other scenarios not covered in ProcedureInTrigger_Tests_v1.html,
please let me know.

I am just uploading this patch as I have it almost ready. I would appreciate if someone can
look at it and see if the check for the sql allowed in procedures is okay. If this is not
an acceptable solution, I plan to work on a new patch where the check is left to execution
time instead of compile time.

> Allow invoking java stored procedures from inside a trigger. Make CALL a valid statement
in the trigger body.
> -------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-551
>          URL: http://issues.apache.org/jira/browse/DERBY-551
>      Project: Derby
>         Type: New Feature

>   Components: SQL
>     Versions: 10.1.1.0
>  Environment: All platforms
>     Reporter: Satheesh Bandaram
>     Assignee: Deepa Remesh
>      Fix For: 10.2.0.0
>  Attachments: ProcedureInTrigger_Tests_v1.html, derby-551-draft1.diff, derby-551-draft1.status,
derby-551-draft2.status, derby-551draft2.diff
>
> Derby currently doesn't allow CALL statement to be used in a trigger body. It would be
great to allow java stored procedure invocation inside a trigger. Since Derby doesn't have
SQL procedure language, triggers can only execute a single SQL statement. If we allow stored
procedures in triggers, it would be possible to write a trigger that involves more than just
one SQL statement. Functions are currently allowed, but they are read-only.
> I believe it is fairly easy to support this enhancement. Need good amount of testing
though.

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


Mime
View raw message