Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 81314 invoked from network); 10 Jul 2006 17:14:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Jul 2006 17:14:06 -0000 Received: (qmail 76228 invoked by uid 500); 10 Jul 2006 17:14:05 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 76200 invoked by uid 500); 10 Jul 2006 17:14:05 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 76191 invoked by uid 99); 10 Jul 2006 17:14:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jul 2006 10:14:05 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jul 2006 10:14:02 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0B227410487 for ; Mon, 10 Jul 2006 17:11:32 +0000 (GMT) Message-ID: <18497252.1152551492042.JavaMail.jira@brutus> Date: Mon, 10 Jul 2006 17:11:32 +0000 (GMT+00:00) From: "Deepa Remesh (JIRA)" To: derby-dev@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. In-Reply-To: <1149853848.1125618312287.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-551?page=all ] Deepa Remesh updated DERBY-551: ------------------------------- Attachment: derby-551-draft3.diff derby-551-draft3.status Attaching a new draft patch "derby-551-draft3.diff" which uses Dan's first suggestion (use the existing mechanism, which means a before trigger with a CALL procedure that is declared MODIFIES SQL DATA statement would succeed but would fail at runtime when fired. ) In this patch, I removed the checks that I had added in the parser to check for type of procedure allowed in a before trigger. Instead, the existing runtime check is used. This was slightly modified to check that insert, update, delete on "any" table is not allowed in a before trigger. The existing check was only looking for insert, update,delete on the "trigger table". If this is acceptable as a first step, I plan to submit a patch for this. And then work on a follow-up patch to move the check to compile time using Dan's second suggestion (use the existing compile time mechansim that defines what is allowed in a context). Please take a look at the new patch. Thanks. > 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-551-draft3.diff, derby-551-draft3.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