db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r789879 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
Date Tue, 30 Jun 2009 19:01:57 GMT
Author: kmarsden
Date: Tue Jun 30 19:01:57 2009
New Revision: 789879

URL: http://svn.apache.org/viewvc?rev=789879&view=rev
Log:
DERBY-4142  java.lang.VerifyError causing java.sql.SQLException: Cannot create an instance
of generated class ... in lang.GeneratedColumnsTest and GeneratedColumnsPermsTest on IBM iseries

patch d4142-kah-noField.diff contributed by Knut Anders Hatlen (knut dot hatlen at sun dot
com) an improvement on earlier patch from Myrna van Lunteren (m dot v dot lunteren at gmail
dot com). This solution removes the mis-typed ExecRow field and keeps the current row on the
stack.


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java?rev=789879&r1=789878&r2=789879&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
Tue Jun 30 19:01:57 2009
@@ -33,7 +33,6 @@
 import org.apache.derby.iapi.reference.ClassName;
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.services.classfile.VMOpcode;
-import org.apache.derby.iapi.services.compiler.LocalField;
 import org.apache.derby.iapi.services.compiler.MethodBuilder;
 import org.apache.derby.iapi.services.context.ContextManager;
 import org.apache.derby.iapi.services.io.FormatableBitSet;
@@ -1671,12 +1670,10 @@
 		// 	java.lang.Object userExprFun( ) { }
 		MethodBuilder userExprFun = ecb.newUserExprFun();
 
-		/* Declare the field and load it with the current row */
-		LocalField field = ecb.newFieldDeclaration(Modifier.PRIVATE, ClassName.ExecRow);
+        /* Push the the current row onto the stack. */
         userExprFun.pushThis();
         userExprFun.push( rsNumber );
         userExprFun.callMethod(VMOpcode.INVOKEVIRTUAL, ClassName.BaseActivation, "getCurrentRow",
ClassName.Row, 1);
-        userExprFun.putField( field );
 
 		// Loop through the result columns, computing generated columns
         // as we go. 
@@ -1698,7 +1695,7 @@
 
             if ( !rc.hasGenerationClause() ) { continue; }
 
-            userExprFun.getField(field); // instance
+            userExprFun.dup();       // instance (current row)
             userExprFun.push(i + 1); // arg1
 
             rc.generateExpression(ecb, userExprFun);



Mime
View raw message