db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r902147 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
Date Fri, 22 Jan 2010 16:29:56 GMT
Author: kahatlen
Date: Fri Jan 22 16:29:56 2010
New Revision: 902147

URL: http://svn.apache.org/viewvc?rev=902147&view=rev
Log:
DERBY-3024 (partial) Validation of shared plans hurts scalability

Removed an unneeded call to rePrepare() in EmbedStatement.executeStatement().
The call is not needed because rePrepare() will be called again in
GenericPreparedStatement.execute(), so the plan will be reprepared anyways
before it's executed, if it has become stale.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java?rev=902147&r1=902146&r2=902147&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java Fri Jan
22 16:29:56 2010
@@ -1203,12 +1203,9 @@
 					}
 				}
 
-				// if this was a prepared statement, this just
-				// gets it for us, it won't recompile unless it is invalid.
+				// Get the statement. We don't care if it's invalid, because it
+				// will be recompiled when we execute it if needed (DERBY-3024).
 				PreparedStatement ps = a.getPreparedStatement();
-				ps.rePrepare(lcc);
-				addWarning(ps.getCompileTimeWarnings());
-
 
 				/*
 				** WARNING WARNING
@@ -1233,6 +1230,7 @@
 				a.reset();
 				a.setMaxRows(maxRows);
                 ResultSet resultsToWrap = ps.execute(a, timeoutMillis);
+                addWarning(ps.getCompileTimeWarnings());
 				addWarning(a.getWarnings());
 
 



Mime
View raw message