You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2012/04/15 22:31:22 UTC
svn commit: r1326420 - in /jmeter/trunk:
src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java
xdocs/changes.xml xdocs/usermanual/component_reference.xml
Author: pmouawad
Date: Sun Apr 15 20:31:22 2012
New Revision: 1326420
URL: http://svn.apache.org/viewvc?rev=1326420&view=rev
Log:
Bug 53072 - JDBC PREPARED SELECT statements should return results in variables like non prepared SELECT
Modified:
jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java
jmeter/trunk/xdocs/changes.xml
jmeter/trunk/xdocs/usermanual/component_reference.xml
Modified: jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java?rev=1326420&r1=1326419&r2=1326420&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java (original)
+++ jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java Sun Apr 15 20:31:22 2012
@@ -188,9 +188,13 @@ public abstract class AbstractJDBCTestEl
} else if (PREPARED_SELECT.equals(_queryType)) {
PreparedStatement pstmt = getPreparedStatement(conn);
setArguments(pstmt);
- boolean hasResultSet = pstmt.execute();
- String sb = resultSetsToString(pstmt,hasResultSet,null);
- return sb.getBytes(ENCODING);
+ ResultSet rs = null;
+ try {
+ rs = pstmt.executeQuery();
+ return getStringFromResultSet(rs).getBytes(ENCODING);
+ } finally {
+ close(rs);
+ }
} else if (PREPARED_UPDATE.equals(_queryType)) {
PreparedStatement pstmt = getPreparedStatement(conn);
setArguments(pstmt);
Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1326420&r1=1326419&r2=1326420&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Sun Apr 15 20:31:22 2012
@@ -105,6 +105,7 @@ Graph Full Results Listener has been rem
<li>Bug 52916 - JDBC Exception if there is an empty user defined variable</li>
<li>Bug 52937 - Webservice Sampler : Clear Soap Documents Cache at end of Test </li>
<li>Bug 53027 - Jmeter starts throwing exceptions while using SMTP Sample in a test plan with HTTP Cookie Mngr or HTTP Request Defaults</li>
+<li>Bug 53072 - JDBC PREPARED SELECT statements should return results in variables like non prepared SELECT</li>
</ul>
<h3>Controllers</h3>
Modified: jmeter/trunk/xdocs/usermanual/component_reference.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=1326420&r1=1326419&r2=1326420&view=diff
==============================================================================
--- jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jmeter/trunk/xdocs/usermanual/component_reference.xml Sun Apr 15 20:31:22 2012
@@ -523,7 +523,7 @@ the additional variables for rows 4, 5 a
<br></br>
There must be as many types as there are placeholders in the statement.
</property>
- <property name="Variable Names" required="No">Comma-separated list of variable names to hold values returned by Select statements</property>
+ <property name="Variable Names" required="No">Comma-separated list of variable names to hold values returned by Select statements or Prepared Select Statements</property>
<property name="Result Variable Name" required="No">
If specified, this will create an Object variable containing a list of row maps.
Each map contains the column name as the key and the column data as the value. Usage:<br></br>