db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Klebanoff <kleba...@Mutagen.Net>
Subject Re: release status as of 9/28/04
Date Tue, 28 Sep 2004 22:27:44 GMT
There is one bug fix that was not applied. Being new to Apache I did not 
include "[PATCH]" in the subject.

My original email is:

| I would like to submit a fix for a bug in triggers.
|
| The bug is that a trigger of the form:
|  create trigger ... values myFunction();
| has no effect. MyFunction is not called even if the trigger is fired.
| Side effects of myFunction do not happen. Derby does not allow a "CALL"
| statement inside a trigger action so a values statement is the only way
| to call a function/procedure in a trigger action.
|
| The cause of the bug is that since the values are not actually used by
| the trigger, the trigger code does not fetch the row(s) returned by the
| trigger action. The fix is simple: change class
| org.apache.derby.impl.sql.execute.GenericTriggerExecutor to fetch (and
| discard) the rows returned by a trigger action.
|
| Please review the change. The diff file is attached.

Index: java/engine/org/apache/derby/impl/sql/execute/GenericTriggerExecutor.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/execute/GenericTriggerExecutor.java	(revision 37092)
+++ java/engine/org/apache/derby/impl/sql/execute/GenericTriggerExecutor.java	(working copy)
@@ -157,7 +157,18 @@
 			*/
 			try
 			{
-				ps.execute(spsActivation, false, false, false);
+				ResultSet rs = ps.execute(spsActivation, false, false, false);
+                if( rs.returnsRows())
+                {
+                    // Fetch all the data to ensure that functions in the select list or
values statement will
+                    // be evaluated and side effects will happen. Why else would the trigger
action return
+                    // rows, but for side effects?
+                    // The result set was opened in ps.execute()
+                    while( rs.getNextRow() != null)
+                    {
+                    }
+                }
+                rs.close();
 			} 
 			catch (StandardException e)
 			{

===================================================================
Samuel Andrew McIntyre wrote:

>
> Hello all,
>
> Here's a summary of the movement on the various issues concerning 
> getting a first Derby release out there.
>
> 1 - IP/copyright concerns - It appears this has ballooned into a more 
> serious issue than previously thought. Discussion of the proper way to 
> handle the transition of the code to the ASF license and in what way 
> IBM copyright is retained, if any, is occurring at 
> licensing@apache.org. I am sure we will hear from the Incubator PMC as 
> soon as this issue is settled.
>
> 2 - Apply all currently pending bug fixes. I have the following list 
> of submitted patches:
>
> [APPLIED] [PATCH] Optimization of 
> org.apache.derby.impl.services.uuid.BasicUUID.toByteArray()
> [APPLIED] [PATCH] Set Derby's build number to be the subversion 
> revision number
> [PATCH] derby.war file build
> [PATCH] Fix to prevent empty log file switches that could cause 
> recovery failures
> [PATCH] minor bugs in dblook
> [PATCH] Extension Packaging
> [PATCH] retrieveMessages... true by default in ij
> [PATCH] Network servlet display only message key
> [PATCH] added 3 more parser generated files to the clobber target in 
> main build.xml
> [PATCH] Various fixes to javadoc generation
>
> Please let me know if there are any I am missing here. Note that the 
> change copyright to ASF patch is not included here because of issue #1.
>
> 3 - Now that we have bug tracking, please speak up if you consider any 
> of the currently logged bugs as a showstopper for the release.
>
> 4 - Please comment on what the content and form of the release should 
> be. I think jars, javadoc and HTML documentation should be included, 
> since that is what we have at the moment, packaged as a zip and tar.gz 
> file. Please speak up if you are interested in rpms for this first 
> release.
>
> 5 - Consensus on Derby's upgrade policy/version scheme. There is 
> currently a vote pending in the "[VOTE] Derby upgrade policy" thread.
>
> Please post other concerns if you have them.
>
> Thanks,
> andrew


Mime
View raw message