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 2019/07/25 21:39:38 UTC

[jmeter] branch master updated: limit result set for jdbc sampler (added option) (#476)

This is an automated email from the ASF dual-hosted git repository.

pmouawad pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new ab9770b  limit result set for jdbc sampler (added option) (#476)
ab9770b is described below

commit ab9770b88bef2e99f61af0388a9c8e61de940f23
Author: Franz Schwab <fr...@users.noreply.github.com>
AuthorDate: Thu Jul 25 23:39:30 2019 +0200

    limit result set for jdbc sampler (added option) (#476)
    
    * limit result set
    
    
    Former-commit-id: ca96394e0e4913f7b2407a6bcf7f843d92959310
    
    * added french translation
    renamed loop variables to meaningful names
    
    * adapted countRows() function, now takes an optional limit setting for the result set (max rows) into account - otherwise this function would iterate through the complete result set by calling resultSet.last()
    
    * added section in the user manual
    
    * changed screenshot of jdbc request sampler dialogue
    
    * added test case for result set limit
    
    * improved description for result set handling option - i checked the code, it is only relevant for callable statements
    
    * fixed test reference output xml and csv file
    
    
    This fixes https://bz.apache.org/bugzilla/show_bug.cgi?id=63561
---
 bin/testfiles/JDBC_TESTS.csv                       |   5 +
 bin/testfiles/JDBC_TESTS.jmx                       | 467 ++++++++++++++++++++-
 bin/testfiles/JDBC_TESTS.xml                       | 125 ++++++
 .../protocol/jdbc/AbstractJDBCTestElement.java     | 115 +++--
 .../jdbc/JDBCTestElementBeanInfoSupport.java       |   5 +
 .../JDBCPostProcessorResources.properties          |   4 +-
 .../JDBCPostProcessorResources_fr.properties       |   2 +
 .../processor/JDBCPreProcessorResources.properties |   4 +-
 .../JDBCPreProcessorResources_fr.properties        |   2 +
 .../jdbc/sampler/JDBCSamplerResources.properties   |   4 +-
 .../sampler/JDBCSamplerResources_fr.properties     |   2 +
 xdocs/images/screenshots/jdbctest/jdbc-request.png | Bin 7697 -> 20492 bytes
 xdocs/usermanual/component_reference.xml           |   1 +
 13 files changed, 701 insertions(+), 35 deletions(-)

diff --git a/bin/testfiles/JDBC_TESTS.csv b/bin/testfiles/JDBC_TESTS.csv
index d405c8f..ca2d5b2 100644
--- a/bin/testfiles/JDBC_TESTS.csv
+++ b/bin/testfiles/JDBC_TESTS.csv
@@ -18,6 +18,11 @@ JDBC_ROLLBACK,200,OK,TG-OK 1-1,text,true,1,1,1,0
 JDBC_CHECK_COUNT_1,200,OK,TG-OK 1-1,text,true,1,1,1,0
 CheckTransaction,200,"Number of samples in transaction : 4, number of failing samples : 0",TG-OK 1-1,,true,1,1,1,0
 JDBC_INSERT_2,200,OK,TG-OK 1-1,text,true,1,1,1,0
+JDBC_SELECT_LIMIT_RESULTSET_0,200,OK,TG-OK 1-1,text,true,1,1,1,0
+JDBC_SELECT_LIMIT_RESULTSET_1,200,OK,TG-OK 1-1,text,true,1,1,1,0
+JDBC_SELECT_LIMIT_RESULTSET_2,200,OK,TG-OK 1-1,text,true,1,1,1,0
+JDBC_SELECT_LIMIT_RESULTSET_3,200,OK,TG-OK 1-1,text,true,1,1,1,0
+JDBC_SELECT_LIMIT_RESULTSET_4,200,OK,TG-OK 1-1,text,true,1,1,1,0
 JDBC_NoConfig,000,java.lang.IllegalArgumentException: Variable Name must not be null in JDBC_NoConfig,TG-Errors 2-1,text,true,1,1,1,0
 JDBC_Wrong_Sql,42581 -5581,java.sql.SQLSyntaxErrorException: unexpected token: WHERE,TG-Errors 2-1,text,true,1,1,1,0
 JDBC_With_Failing_PreProcessor,200,OK,TG-Errors 2-1,text,true,1,1,1,0
diff --git a/bin/testfiles/JDBC_TESTS.jmx b/bin/testfiles/JDBC_TESTS.jmx
index 6f35336..c99b5e3 100644
--- a/bin/testfiles/JDBC_TESTS.jmx
+++ b/bin/testfiles/JDBC_TESTS.jmx
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<jmeterTestPlan version="1.2" properties="3.4" jmeter="3.4-SNAPSHOT.20171120">
+<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.2-SNAPSHOT.20190723">
   <hashTree>
     <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
       <stringProp name="TestPlan.comments"></stringProp>
@@ -26,6 +26,7 @@
         <stringProp name="trimInterval">60000</stringProp>
         <stringProp name="username">SA</stringProp>
         <boolProp name="preinit">true</boolProp>
+        <stringProp name="initQuery"></stringProp>
       </JDBCDataSource>
       <hashTree/>
       <SetupThreadGroup guiclass="SetupThreadGroupGui" testclass="SetupThreadGroup" testname="setUp Thread Group" enabled="true">
@@ -41,6 +42,7 @@
         <boolProp name="ThreadGroup.scheduler">false</boolProp>
         <stringProp name="ThreadGroup.duration"></stringProp>
         <stringProp name="ThreadGroup.delay"></stringProp>
+        <boolProp name="ThreadGroup.same_user_on_next_iteration">false</boolProp>
       </SetupThreadGroup>
       <hashTree>
         <JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="JSR223_CHECK_POOL_PREINIT" enabled="true">
@@ -90,6 +92,7 @@ sql.close()
           <stringProp name="resultSetHandler">Store as String</stringProp>
           <stringProp name="resultVariable"></stringProp>
           <stringProp name="variableNames"></stringProp>
+          <stringProp name="resultSetMaxRows"></stringProp>
         </JDBCSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="RA" enabled="true">
@@ -99,6 +102,7 @@ sql.close()
             <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
             <boolProp name="Assertion.assume_success">false</boolProp>
             <intProp name="Assertion.test_type">16</intProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
         </hashTree>
@@ -113,6 +117,7 @@ sql.close()
           <stringProp name="resultSetHandler">Store as String</stringProp>
           <stringProp name="resultVariable"></stringProp>
           <stringProp name="variableNames"></stringProp>
+          <stringProp name="resultSetMaxRows"></stringProp>
         </JDBCSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="RA" enabled="true">
@@ -122,6 +127,7 @@ sql.close()
             <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
             <boolProp name="Assertion.assume_success">false</boolProp>
             <intProp name="Assertion.test_type">16</intProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
         </hashTree>
@@ -136,6 +142,7 @@ sql.close()
           <stringProp name="resultSetHandler">Store as String</stringProp>
           <stringProp name="resultVariable"></stringProp>
           <stringProp name="variableNames"></stringProp>
+          <stringProp name="resultSetMaxRows"></stringProp>
         </JDBCSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="RA" enabled="true">
@@ -145,6 +152,7 @@ sql.close()
             <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
             <boolProp name="Assertion.assume_success">false</boolProp>
             <intProp name="Assertion.test_type">16</intProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
         </hashTree>
@@ -166,6 +174,7 @@ sql.close()
           <stringProp name="resultSetHandler">Store as String</stringProp>
           <stringProp name="resultVariable"></stringProp>
           <stringProp name="variableNames"></stringProp>
+          <stringProp name="resultSetMaxRows"></stringProp>
         </JDBCSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="RA" enabled="true">
@@ -175,6 +184,7 @@ sql.close()
             <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
             <boolProp name="Assertion.assume_success">false</boolProp>
             <intProp name="Assertion.test_type">16</intProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
         </hashTree>
@@ -194,6 +204,7 @@ sql.close()
           <stringProp name="resultSetHandler">Store as String</stringProp>
           <stringProp name="resultVariable"></stringProp>
           <stringProp name="variableNames"></stringProp>
+          <stringProp name="resultSetMaxRows"></stringProp>
         </JDBCSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="RA" enabled="true">
@@ -203,6 +214,7 @@ sql.close()
             <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
             <boolProp name="Assertion.assume_success">false</boolProp>
             <intProp name="Assertion.test_type">16</intProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
         </hashTree>
@@ -221,6 +233,7 @@ sql.close()
           <stringProp name="resultSetHandler">Store as String</stringProp>
           <stringProp name="resultVariable"></stringProp>
           <stringProp name="variableNames"></stringProp>
+          <stringProp name="resultSetMaxRows"></stringProp>
         </JDBCSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="RA" enabled="true">
@@ -230,6 +243,7 @@ sql.close()
             <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
             <boolProp name="Assertion.assume_success">false</boolProp>
             <intProp name="Assertion.test_type">16</intProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
         </hashTree>
@@ -247,6 +261,7 @@ sql.close()
         <boolProp name="ThreadGroup.scheduler">false</boolProp>
         <stringProp name="ThreadGroup.duration"></stringProp>
         <stringProp name="ThreadGroup.delay"></stringProp>
+        <boolProp name="ThreadGroup.same_user_on_next_iteration">false</boolProp>
       </ThreadGroup>
       <hashTree>
         <JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="JDBC_INSERT" enabled="true">
@@ -259,6 +274,7 @@ sql.close()
           <stringProp name="resultSetHandler">Store as String</stringProp>
           <stringProp name="resultVariable"></stringProp>
           <stringProp name="variableNames"></stringProp>
+          <stringProp name="resultSetMaxRows"></stringProp>
         </JDBCSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -268,6 +284,7 @@ sql.close()
             <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
             <boolProp name="Assertion.assume_success">false</boolProp>
             <intProp name="Assertion.test_type">16</intProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
         </hashTree>
@@ -281,6 +298,7 @@ sql.close()
           <stringProp name="resultSetHandler">Store as String</stringProp>
           <stringProp name="resultVariable">result</stringProp>
           <stringProp name="variableNames">id,title,author</stringProp>
+          <stringProp name="resultSetMaxRows"></stringProp>
         </JDBCSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -292,6 +310,7 @@ sql.close()
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">id_1</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -303,6 +322,7 @@ sql.close()
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">title_1</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -314,6 +334,7 @@ sql.close()
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">author_1</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -325,6 +346,7 @@ sql.close()
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">author_#</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JA_checkResult" enabled="true">
@@ -361,6 +383,7 @@ if (list.size()==1) {
           <stringProp name="resultSetHandler">Store as String</stringProp>
           <stringProp name="resultVariable">result</stringProp>
           <stringProp name="variableNames">id,title,author</stringProp>
+          <stringProp name="resultSetMaxRows"></stringProp>
         </JDBCSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -372,6 +395,7 @@ if (list.size()==1) {
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">id_1</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -383,6 +407,7 @@ if (list.size()==1) {
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">title_1</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -394,6 +419,7 @@ if (list.size()==1) {
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">author_1</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -405,6 +431,7 @@ if (list.size()==1) {
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">author_#</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JA_checkResult" enabled="true">
@@ -441,6 +468,7 @@ if (list.size()==2) {
           <stringProp name="resultSetHandler">Store as String</stringProp>
           <stringProp name="resultVariable">result</stringProp>
           <stringProp name="variableNames">title,author,submission_date</stringProp>
+          <stringProp name="resultSetMaxRows"></stringProp>
         </JDBCSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -452,6 +480,7 @@ if (list.size()==2) {
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">title_1</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -463,6 +492,7 @@ if (list.size()==2) {
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">author_1</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -474,6 +504,7 @@ if (list.size()==2) {
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">submission_date_1</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -485,6 +516,7 @@ if (list.size()==2) {
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">author_#</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JA_checkResult" enabled="true">
@@ -521,6 +553,7 @@ if (list.size()==1) {
           <stringProp name="resultSetHandler">Store as String</stringProp>
           <stringProp name="resultVariable">result</stringProp>
           <stringProp name="variableNames">title,author,submission_date</stringProp>
+          <stringProp name="resultSetMaxRows"></stringProp>
         </JDBCSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -532,6 +565,7 @@ if (list.size()==1) {
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">title_1</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -543,6 +577,7 @@ if (list.size()==1) {
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">author_1</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -554,6 +589,7 @@ if (list.size()==1) {
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">submission_date_1</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -565,6 +601,7 @@ if (list.size()==1) {
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">author_#</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JA_checkResult" enabled="true">
@@ -601,6 +638,7 @@ if (list.size()==1) {
           <stringProp name="resultVariable"></stringProp>
           <stringProp name="queryTimeout"></stringProp>
           <stringProp name="resultSetHandler">Store as String</stringProp>
+          <stringProp name="resultSetMaxRows"></stringProp>
         </JDBCSampler>
         <hashTree/>
         <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="CheckTransaction" enabled="true">
@@ -618,6 +656,7 @@ if (list.size()==1) {
             <stringProp name="resultSetHandler">Store as String</stringProp>
             <stringProp name="resultVariable"></stringProp>
             <stringProp name="variableNames"></stringProp>
+            <stringProp name="resultSetMaxRows"></stringProp>
           </JDBCSampler>
           <hashTree>
             <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -627,6 +666,7 @@ if (list.size()==1) {
               <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
               <boolProp name="Assertion.assume_success">false</boolProp>
               <intProp name="Assertion.test_type">16</intProp>
+              <stringProp name="Assertion.custom_message"></stringProp>
             </ResponseAssertion>
             <hashTree/>
           </hashTree>
@@ -640,6 +680,7 @@ if (list.size()==1) {
             <stringProp name="resultSetHandler">Store as String</stringProp>
             <stringProp name="resultVariable">number_users</stringProp>
             <stringProp name="variableNames">number_user</stringProp>
+            <stringProp name="resultSetMaxRows"></stringProp>
           </JDBCSampler>
           <hashTree>
             <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JA_checkResult" enabled="true">
@@ -676,6 +717,7 @@ if (list.size()==1) {
             <stringProp name="resultVariable"></stringProp>
             <stringProp name="queryTimeout"></stringProp>
             <stringProp name="resultSetHandler">Store as String</stringProp>
+            <stringProp name="resultSetMaxRows"></stringProp>
           </JDBCSampler>
           <hashTree/>
           <JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="JDBC_CHECK_COUNT_1" enabled="true">
@@ -688,6 +730,7 @@ if (list.size()==1) {
             <stringProp name="resultSetHandler">Store as String</stringProp>
             <stringProp name="resultVariable">number_users</stringProp>
             <stringProp name="variableNames">number_user</stringProp>
+            <stringProp name="resultSetMaxRows"></stringProp>
           </JDBCSampler>
           <hashTree>
             <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JA_checkResult" enabled="true">
@@ -725,6 +768,7 @@ if (list.size()==1) {
           <stringProp name="resultVariable"></stringProp>
           <stringProp name="queryTimeout"></stringProp>
           <stringProp name="resultSetHandler">Store as String</stringProp>
+          <stringProp name="resultSetMaxRows"></stringProp>
         </JDBCSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -734,6 +778,7 @@ if (list.size()==1) {
             <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
             <boolProp name="Assertion.assume_success">false</boolProp>
             <intProp name="Assertion.test_type">16</intProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <JDBCPreProcessor guiclass="TestBeanGUI" testclass="JDBCPreProcessor" testname="JDBC PreProcessor" enabled="true">
@@ -746,6 +791,7 @@ if (list.size()==1) {
             <stringProp name="resultSetHandler">Store as String</stringProp>
             <stringProp name="resultVariable"></stringProp>
             <stringProp name="variableNames">number_user_before</stringProp>
+            <stringProp name="resultSetMaxRows"></stringProp>
           </JDBCPreProcessor>
           <hashTree/>
           <JDBCPostProcessor guiclass="TestBeanGUI" testclass="JDBCPostProcessor" testname="JDBC PostProcessor" enabled="true">
@@ -758,6 +804,7 @@ if (list.size()==1) {
             <stringProp name="resultSetHandler">Store as String</stringProp>
             <stringProp name="resultVariable"></stringProp>
             <stringProp name="variableNames">number_user_after</stringProp>
+            <stringProp name="resultSetMaxRows"></stringProp>
           </JDBCPostProcessor>
           <hashTree/>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="RA_number_user_before_equal1" enabled="true">
@@ -769,6 +816,7 @@ if (list.size()==1) {
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">number_user_before_1</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="RA_number_user_after_equal2" enabled="true">
@@ -780,6 +828,7 @@ if (list.size()==1) {
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">number_user_after_1</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="RA_number_user_before_count" enabled="true">
@@ -791,6 +840,7 @@ if (list.size()==1) {
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">number_user_before_#</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="RA_number_user_after_count" enabled="true">
@@ -802,9 +852,405 @@ if (list.size()==1) {
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">number_user_after_#</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
         </hashTree>
+        <JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="JDBC_SELECT_LIMIT_RESULTSET_0" enabled="true">
+          <stringProp name="dataSource">dbConfig</stringProp>
+          <stringProp name="queryType">Select Statement</stringProp>
+          <stringProp name="query">select * from (VALUES(cast(1 as int), cast(&apos;conference table&apos; as varchar(20))), (14, &apos;sofa&apos;), (5, &apos;coffee table&apos;)) as t(id_furniture,name_furniture) order by 1</stringProp>
+          <stringProp name="queryArguments"></stringProp>
+          <stringProp name="queryArgumentsTypes"></stringProp>
+          <stringProp name="variableNames">ID_FURNITURE,NAME_FURNITURE</stringProp>
+          <stringProp name="resultVariable">result</stringProp>
+          <stringProp name="queryTimeout"></stringProp>
+          <stringProp name="resultSetHandler">Store as String</stringProp>
+          <stringProp name="resultSetMaxRows">0</stringProp>
+        </JDBCSampler>
+        <hashTree>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="48">0</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">8</intProp>
+            <stringProp name="Assertion.scope">variable</stringProp>
+            <stringProp name="Scope.variable">ID_FURNITURE_#</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
+          </ResponseAssertion>
+          <hashTree/>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="48">0</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">8</intProp>
+            <stringProp name="Assertion.scope">variable</stringProp>
+            <stringProp name="Scope.variable">NAME_FURNITURE_#</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
+          </ResponseAssertion>
+          <hashTree/>
+          <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JA_checkResult" enabled="true">
+            <stringProp name="cacheKey">true</stringProp>
+            <stringProp name="filename"></stringProp>
+            <stringProp name="parameters"></stringProp>
+            <stringProp name="script">import java.util.Map;
+def list = vars.getObject(&quot;result&quot;);
+if (list.size()==0 &amp;&amp; vars.get(&quot;ID_FURNITURE_1&quot;) == null &amp;&amp; vars.get(&quot;NAME_FURNITURE_1&quot;) == null) {
+	AssertionResult.setFailure(false);
+} else {
+	AssertionResult.setFailure(true);
+	AssertionResult.setFailureMessage(&quot;Expected 0 rows in result, got:&quot;+list.size());
+}
+
+</stringProp>
+            <stringProp name="scriptLanguage">groovy</stringProp>
+          </JSR223Assertion>
+          <hashTree/>
+        </hashTree>
+        <JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="JDBC_SELECT_LIMIT_RESULTSET_1" enabled="true">
+          <stringProp name="dataSource">dbConfig</stringProp>
+          <stringProp name="queryType">Select Statement</stringProp>
+          <stringProp name="query">select * from (VALUES(cast(1 as int), cast(&apos;conference table&apos; as varchar(20))), (14, &apos;sofa&apos;), (5, &apos;coffee table&apos;)) as t(id_furniture,name_furniture) order by 1</stringProp>
+          <stringProp name="queryArguments"></stringProp>
+          <stringProp name="queryArgumentsTypes"></stringProp>
+          <stringProp name="variableNames">ID_FURNITURE,NAME_FURNITURE</stringProp>
+          <stringProp name="resultVariable">result</stringProp>
+          <stringProp name="queryTimeout"></stringProp>
+          <stringProp name="resultSetHandler">Store as String</stringProp>
+          <stringProp name="resultSetMaxRows">1</stringProp>
+        </JDBCSampler>
+        <hashTree>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="49">1</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">8</intProp>
+            <stringProp name="Assertion.scope">variable</stringProp>
+            <stringProp name="Scope.variable">ID_FURNITURE_1</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
+          </ResponseAssertion>
+          <hashTree/>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="-59682870">conference table</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">8</intProp>
+            <stringProp name="Assertion.scope">variable</stringProp>
+            <stringProp name="Scope.variable">NAME_FURNITURE_1</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
+          </ResponseAssertion>
+          <hashTree/>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="49">1</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">8</intProp>
+            <stringProp name="Assertion.scope">variable</stringProp>
+            <stringProp name="Scope.variable">ID_FURNITURE_#</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
+          </ResponseAssertion>
+          <hashTree/>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="49">1</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">8</intProp>
+            <stringProp name="Assertion.scope">variable</stringProp>
+            <stringProp name="Scope.variable">NAME_FURNITURE_#</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
+          </ResponseAssertion>
+          <hashTree/>
+          <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JA_checkResult" enabled="true">
+            <stringProp name="cacheKey">true</stringProp>
+            <stringProp name="filename"></stringProp>
+            <stringProp name="parameters"></stringProp>
+            <stringProp name="script">import java.util.Map;
+def list = vars.getObject(&quot;result&quot;);
+if (list.size()==1) {
+	Map map = list.get(0);
+	if(map.get(&quot;ID_FURNITURE&quot;).equals(1) &amp;&amp; map.get(&quot;NAME_FURNITURE&quot;).equals(&quot;conference table&quot;)) {
+		AssertionResult.setFailure(false);
+	} else {
+		AssertionResult.setFailure(true);
+		AssertionResult.setFailureMessage(&quot;Expected:	1	&apos;conference table&apos;&quot;);
+	}
+} else {
+	AssertionResult.setFailure(true);
+	AssertionResult.setFailureMessage(&quot;Expected 1 row in result, got:&quot;+list.size());
+}
+
+</stringProp>
+            <stringProp name="scriptLanguage">groovy</stringProp>
+          </JSR223Assertion>
+          <hashTree/>
+        </hashTree>
+        <JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="JDBC_SELECT_LIMIT_RESULTSET_2" enabled="true">
+          <stringProp name="dataSource">dbConfig</stringProp>
+          <stringProp name="queryType">Select Statement</stringProp>
+          <stringProp name="query">select * from (VALUES(cast(1 as int), cast(&apos;conference table&apos; as varchar(20))), (14, &apos;sofa&apos;), (5, &apos;coffee table&apos;)) as t(id_furniture,name_furniture) order by 1</stringProp>
+          <stringProp name="queryArguments"></stringProp>
+          <stringProp name="queryArgumentsTypes"></stringProp>
+          <stringProp name="variableNames">ID_FURNITURE,NAME_FURNITURE</stringProp>
+          <stringProp name="resultVariable">result</stringProp>
+          <stringProp name="queryTimeout"></stringProp>
+          <stringProp name="resultSetHandler">Store as String</stringProp>
+          <stringProp name="resultSetMaxRows">2</stringProp>
+        </JDBCSampler>
+        <hashTree>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="53">5</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">8</intProp>
+            <stringProp name="Assertion.scope">variable</stringProp>
+            <stringProp name="Scope.variable">ID_FURNITURE_2</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
+          </ResponseAssertion>
+          <hashTree/>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="154871418">coffee table</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">8</intProp>
+            <stringProp name="Assertion.scope">variable</stringProp>
+            <stringProp name="Scope.variable">NAME_FURNITURE_2</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
+          </ResponseAssertion>
+          <hashTree/>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="50">2</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">8</intProp>
+            <stringProp name="Assertion.scope">variable</stringProp>
+            <stringProp name="Scope.variable">ID_FURNITURE_#</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
+          </ResponseAssertion>
+          <hashTree/>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="50">2</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">8</intProp>
+            <stringProp name="Assertion.scope">variable</stringProp>
+            <stringProp name="Scope.variable">NAME_FURNITURE_#</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
+          </ResponseAssertion>
+          <hashTree/>
+          <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JA_checkResult" enabled="true">
+            <stringProp name="cacheKey">true</stringProp>
+            <stringProp name="filename"></stringProp>
+            <stringProp name="parameters"></stringProp>
+            <stringProp name="script">import java.util.Map;
+def list = vars.getObject(&quot;result&quot;);
+if (list.size()==2) {
+	Map map = list.get(1);
+	if(map.get(&quot;ID_FURNITURE&quot;).equals(5) &amp;&amp; map.get(&quot;NAME_FURNITURE&quot;).equals(&quot;coffee table&quot;)) {
+		AssertionResult.setFailure(false);
+	} else {
+		AssertionResult.setFailure(true);
+		AssertionResult.setFailureMessage(&quot;Expected:	5	&apos;coffee table&apos;&quot;);
+	}
+} else {
+	AssertionResult.setFailure(true);
+	AssertionResult.setFailureMessage(&quot;Expected 2 rows in result, got:&quot;+list.size());
+}
+
+</stringProp>
+            <stringProp name="scriptLanguage">groovy</stringProp>
+          </JSR223Assertion>
+          <hashTree/>
+        </hashTree>
+        <JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="JDBC_SELECT_LIMIT_RESULTSET_3" enabled="true">
+          <stringProp name="dataSource">dbConfig</stringProp>
+          <stringProp name="queryType">Select Statement</stringProp>
+          <stringProp name="query">select * from (VALUES(cast(1 as int), cast(&apos;conference table&apos; as varchar(20))), (14, &apos;sofa&apos;), (5, &apos;coffee table&apos;)) as t(id_furniture,name_furniture) order by 1</stringProp>
+          <stringProp name="queryArguments"></stringProp>
+          <stringProp name="queryArgumentsTypes"></stringProp>
+          <stringProp name="variableNames">ID_FURNITURE,NAME_FURNITURE</stringProp>
+          <stringProp name="resultVariable">result</stringProp>
+          <stringProp name="queryTimeout"></stringProp>
+          <stringProp name="resultSetHandler">Store as String</stringProp>
+          <stringProp name="resultSetMaxRows">3</stringProp>
+        </JDBCSampler>
+        <hashTree>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="1571">14</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">8</intProp>
+            <stringProp name="Assertion.scope">variable</stringProp>
+            <stringProp name="Scope.variable">ID_FURNITURE_3</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
+          </ResponseAssertion>
+          <hashTree/>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="3535895">sofa</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">8</intProp>
+            <stringProp name="Assertion.scope">variable</stringProp>
+            <stringProp name="Scope.variable">NAME_FURNITURE_3</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
+          </ResponseAssertion>
+          <hashTree/>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="51">3</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">8</intProp>
+            <stringProp name="Assertion.scope">variable</stringProp>
+            <stringProp name="Scope.variable">ID_FURNITURE_#</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
+          </ResponseAssertion>
+          <hashTree/>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="51">3</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">8</intProp>
+            <stringProp name="Assertion.scope">variable</stringProp>
+            <stringProp name="Scope.variable">NAME_FURNITURE_#</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
+          </ResponseAssertion>
+          <hashTree/>
+          <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JA_checkResult" enabled="true">
+            <stringProp name="cacheKey">true</stringProp>
+            <stringProp name="filename"></stringProp>
+            <stringProp name="parameters"></stringProp>
+            <stringProp name="script">import java.util.Map;
+def list = vars.getObject(&quot;result&quot;);
+if (list.size()==3) {
+	Map map = list.get(2);
+	if(map.get(&quot;ID_FURNITURE&quot;).equals(14) &amp;&amp; map.get(&quot;NAME_FURNITURE&quot;).equals(&quot;sofa&quot;)) {
+		AssertionResult.setFailure(false);
+	} else {
+		AssertionResult.setFailure(true);
+		AssertionResult.setFailureMessage(&quot;Expected:	14	&apos;sofa&apos;&quot;);
+	}
+} else {
+	AssertionResult.setFailure(true);
+	AssertionResult.setFailureMessage(&quot;Expected 3 rows in result, got:&quot;+list.size());
+}
+
+</stringProp>
+            <stringProp name="scriptLanguage">groovy</stringProp>
+          </JSR223Assertion>
+          <hashTree/>
+        </hashTree>
+        <JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="JDBC_SELECT_LIMIT_RESULTSET_4" enabled="true">
+          <stringProp name="dataSource">dbConfig</stringProp>
+          <stringProp name="queryType">Select Statement</stringProp>
+          <stringProp name="query">select * from (VALUES(cast(1 as int), cast(&apos;conference table&apos; as varchar(20))), (14, &apos;sofa&apos;), (5, &apos;coffee table&apos;)) as t(id_furniture,name_furniture) order by 1</stringProp>
+          <stringProp name="queryArguments"></stringProp>
+          <stringProp name="queryArgumentsTypes"></stringProp>
+          <stringProp name="variableNames">ID_FURNITURE,NAME_FURNITURE</stringProp>
+          <stringProp name="resultVariable">result</stringProp>
+          <stringProp name="queryTimeout"></stringProp>
+          <stringProp name="resultSetHandler">Store as String</stringProp>
+          <stringProp name="resultSetMaxRows">4</stringProp>
+        </JDBCSampler>
+        <hashTree>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="1571">14</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">8</intProp>
+            <stringProp name="Assertion.scope">variable</stringProp>
+            <stringProp name="Scope.variable">ID_FURNITURE_3</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
+          </ResponseAssertion>
+          <hashTree/>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="3535895">sofa</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">8</intProp>
+            <stringProp name="Assertion.scope">variable</stringProp>
+            <stringProp name="Scope.variable">NAME_FURNITURE_3</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
+          </ResponseAssertion>
+          <hashTree/>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="51">3</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">8</intProp>
+            <stringProp name="Assertion.scope">variable</stringProp>
+            <stringProp name="Scope.variable">ID_FURNITURE_#</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
+          </ResponseAssertion>
+          <hashTree/>
+          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
+            <collectionProp name="Asserion.test_strings">
+              <stringProp name="51">3</stringProp>
+            </collectionProp>
+            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+            <boolProp name="Assertion.assume_success">false</boolProp>
+            <intProp name="Assertion.test_type">8</intProp>
+            <stringProp name="Assertion.scope">variable</stringProp>
+            <stringProp name="Scope.variable">NAME_FURNITURE_#</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
+          </ResponseAssertion>
+          <hashTree/>
+          <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JA_checkResult" enabled="true">
+            <stringProp name="cacheKey">true</stringProp>
+            <stringProp name="filename"></stringProp>
+            <stringProp name="parameters"></stringProp>
+            <stringProp name="script">import java.util.Map;
+def list = vars.getObject(&quot;result&quot;);
+if (list.size()==3) {
+	Map map = list.get(2);
+	if(map.get(&quot;ID_FURNITURE&quot;).equals(14) &amp;&amp; map.get(&quot;NAME_FURNITURE&quot;).equals(&quot;sofa&quot;)) {
+		AssertionResult.setFailure(false);
+	} else {
+		AssertionResult.setFailure(true);
+		AssertionResult.setFailureMessage(&quot;Expected:	14	&apos;sofa&apos;&quot;);
+	}
+} else {
+	AssertionResult.setFailure(true);
+	AssertionResult.setFailureMessage(&quot;Expected 3 rows in result, got:&quot;+list.size());
+}
+
+</stringProp>
+            <stringProp name="scriptLanguage">groovy</stringProp>
+          </JSR223Assertion>
+          <hashTree/>
+        </hashTree>
       </hashTree>
       <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="TG-Errors" enabled="true">
         <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
@@ -819,6 +1265,7 @@ if (list.size()==1) {
         <boolProp name="ThreadGroup.scheduler">false</boolProp>
         <stringProp name="ThreadGroup.duration"></stringProp>
         <stringProp name="ThreadGroup.delay"></stringProp>
+        <boolProp name="ThreadGroup.same_user_on_next_iteration">false</boolProp>
       </ThreadGroup>
       <hashTree>
         <JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="JDBC_NoConfig" enabled="true">
@@ -831,6 +1278,7 @@ if (list.size()==1) {
           <stringProp name="resultSetHandler">Store as String</stringProp>
           <stringProp name="resultVariable"></stringProp>
           <stringProp name="variableNames"></stringProp>
+          <stringProp name="resultSetMaxRows"></stringProp>
         </JDBCSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -840,6 +1288,7 @@ if (list.size()==1) {
             <stringProp name="Assertion.test_field">Assertion.response_message</stringProp>
             <boolProp name="Assertion.assume_success">true</boolProp>
             <intProp name="Assertion.test_type">16</intProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
         </hashTree>
@@ -853,6 +1302,7 @@ if (list.size()==1) {
           <stringProp name="resultSetHandler">Store as String</stringProp>
           <stringProp name="resultVariable">result</stringProp>
           <stringProp name="variableNames">title,author,submission_date</stringProp>
+          <stringProp name="resultSetMaxRows"></stringProp>
         </JDBCSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -863,6 +1313,7 @@ if (list.size()==1) {
             <boolProp name="Assertion.assume_success">true</boolProp>
             <intProp name="Assertion.test_type">16</intProp>
             <stringProp name="Scope.variable">title_1</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
         </hashTree>
@@ -876,6 +1327,7 @@ if (list.size()==1) {
           <stringProp name="resultVariable"></stringProp>
           <stringProp name="queryTimeout"></stringProp>
           <stringProp name="resultSetHandler">Store as String</stringProp>
+          <stringProp name="resultSetMaxRows"></stringProp>
         </JDBCSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -885,6 +1337,7 @@ if (list.size()==1) {
             <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
             <boolProp name="Assertion.assume_success">false</boolProp>
             <intProp name="Assertion.test_type">16</intProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <JDBCPreProcessor guiclass="TestBeanGUI" testclass="JDBCPreProcessor" testname="JDBC PreProcessor" enabled="true">
@@ -897,6 +1350,7 @@ if (list.size()==1) {
             <stringProp name="resultSetHandler">Store as String</stringProp>
             <stringProp name="resultVariable"></stringProp>
             <stringProp name="variableNames">number_user_before</stringProp>
+            <stringProp name="resultSetMaxRows"></stringProp>
           </JDBCPreProcessor>
           <hashTree/>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="RA_number_user_after_count" enabled="true">
@@ -908,6 +1362,7 @@ if (list.size()==1) {
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">number_user_after_#</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
         </hashTree>
@@ -921,6 +1376,7 @@ if (list.size()==1) {
           <stringProp name="resultVariable"></stringProp>
           <stringProp name="queryTimeout"></stringProp>
           <stringProp name="resultSetHandler">Store as String</stringProp>
+          <stringProp name="resultSetMaxRows"></stringProp>
         </JDBCSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -930,6 +1386,7 @@ if (list.size()==1) {
             <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
             <boolProp name="Assertion.assume_success">false</boolProp>
             <intProp name="Assertion.test_type">16</intProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <JDBCPostProcessor guiclass="TestBeanGUI" testclass="JDBCPostProcessor" testname="JDBC PostProcessor" enabled="true">
@@ -942,6 +1399,7 @@ if (list.size()==1) {
             <stringProp name="resultSetHandler">Store as String</stringProp>
             <stringProp name="resultVariable"></stringProp>
             <stringProp name="variableNames">number_user_after</stringProp>
+            <stringProp name="resultSetMaxRows"></stringProp>
           </JDBCPostProcessor>
           <hashTree/>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="RA_number_user_after_count" enabled="true">
@@ -953,6 +1411,7 @@ if (list.size()==1) {
             <intProp name="Assertion.test_type">8</intProp>
             <stringProp name="Assertion.scope">variable</stringProp>
             <stringProp name="Scope.variable">number_user_after_#</stringProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
         </hashTree>
@@ -966,6 +1425,7 @@ if (list.size()==1) {
           <stringProp name="resultVariable"></stringProp>
           <stringProp name="queryTimeout"></stringProp>
           <stringProp name="resultSetHandler">Store as String</stringProp>
+          <stringProp name="resultSetMaxRows"></stringProp>
         </JDBCSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -975,6 +1435,7 @@ if (list.size()==1) {
             <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
             <boolProp name="Assertion.assume_success">false</boolProp>
             <intProp name="Assertion.test_type">16</intProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <JDBCPreProcessor guiclass="TestBeanGUI" testclass="JDBCPreProcessor" testname="JDBC PreProcessor" enabled="true">
@@ -987,6 +1448,7 @@ if (list.size()==1) {
             <stringProp name="resultSetHandler">Store as String</stringProp>
             <stringProp name="resultVariable"></stringProp>
             <stringProp name="variableNames">number_user_before</stringProp>
+            <stringProp name="resultSetMaxRows"></stringProp>
           </JDBCPreProcessor>
           <hashTree/>
           <DebugPostProcessor guiclass="TestBeanGUI" testclass="DebugPostProcessor" testname="Debug PostProcessor" enabled="true">
@@ -1007,6 +1469,7 @@ if (list.size()==1) {
           <stringProp name="resultVariable"></stringProp>
           <stringProp name="queryTimeout"></stringProp>
           <stringProp name="resultSetHandler">Store as String</stringProp>
+          <stringProp name="resultSetMaxRows"></stringProp>
         </JDBCSampler>
         <hashTree>
           <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
@@ -1016,6 +1479,7 @@ if (list.size()==1) {
             <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
             <boolProp name="Assertion.assume_success">false</boolProp>
             <intProp name="Assertion.test_type">16</intProp>
+            <stringProp name="Assertion.custom_message"></stringProp>
           </ResponseAssertion>
           <hashTree/>
           <JDBCPostProcessor guiclass="TestBeanGUI" testclass="JDBCPostProcessor" testname="JDBC PostProcessor" enabled="true">
@@ -1028,6 +1492,7 @@ if (list.size()==1) {
             <stringProp name="resultSetHandler">Store as String</stringProp>
             <stringProp name="resultVariable"></stringProp>
             <stringProp name="variableNames">number_user_after</stringProp>
+            <stringProp name="resultSetMaxRows"></stringProp>
           </JDBCPostProcessor>
           <hashTree/>
           <DebugPostProcessor guiclass="TestBeanGUI" testclass="DebugPostProcessor" testname="Debug PostProcessor" enabled="true">
diff --git a/bin/testfiles/JDBC_TESTS.xml b/bin/testfiles/JDBC_TESTS.xml
index 27b0726..e2c5e13 100644
--- a/bin/testfiles/JDBC_TESTS.xml
+++ b/bin/testfiles/JDBC_TESTS.xml
@@ -215,6 +215,131 @@
     <error>false</error>
   </assertionResult>
 </sample>
+<sample s="true" lb="JDBC_SELECT_LIMIT_RESULTSET_0" rc="200" rm="OK" tn="TG-OK 1-1" dt="text" sc="1" ec="0" ng="1" na="1">
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+  <assertionResult>
+    <name>JA_checkResult</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+</sample>
+<sample s="true" lb="JDBC_SELECT_LIMIT_RESULTSET_1" rc="200" rm="OK" tn="TG-OK 1-1" dt="text" sc="1" ec="0" ng="1" na="1">
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+  <assertionResult>
+    <name>JA_checkResult</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+</sample>
+<sample s="true" lb="JDBC_SELECT_LIMIT_RESULTSET_2" rc="200" rm="OK" tn="TG-OK 1-1" dt="text" sc="1" ec="0" ng="1" na="1">
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+  <assertionResult>
+    <name>JA_checkResult</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+</sample>
+<sample s="true" lb="JDBC_SELECT_LIMIT_RESULTSET_3" rc="200" rm="OK" tn="TG-OK 1-1" dt="text" sc="1" ec="0" ng="1" na="1">
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+  <assertionResult>
+    <name>JA_checkResult</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+</sample>
+<sample s="true" lb="JDBC_SELECT_LIMIT_RESULTSET_4" rc="200" rm="OK" tn="TG-OK 1-1" dt="text" sc="1" ec="0" ng="1" na="1">
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+  <assertionResult>
+    <name>Response Assertion</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+  <assertionResult>
+    <name>JA_checkResult</name>
+    <failure>false</failure>
+    <error>false</error>
+  </assertionResult>
+</sample>
 <sample s="true" lb="JDBC_NoConfig" rc="000" rm="java.lang.IllegalArgumentException: Variable Name must not be null in JDBC_NoConfig" tn="TG-Errors 2-1" dt="text" sc="1" ec="0" ng="1" na="1">
   <assertionResult>
     <name>Response Assertion</name>
diff --git a/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java b/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java
index 1ca7f8a..04f5930 100644
--- a/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java
+++ b/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java
@@ -128,6 +128,7 @@ public abstract class AbstractJDBCTestElement extends AbstractTestElement implem
     private String resultSetHandler = RS_STORE_AS_STRING;
     private String resultVariable = ""; // $NON-NLS-1$
     private String queryTimeout = ""; // $NON-NLS-1$
+    private String resultSetMaxRows = ""; // $NON-NLS-1$
 
     private static final int MAX_RETAIN_SIZE = JMeterUtils.getPropDefault("jdbcsampler.max_retain_result_size", 64 * 1024);
 
@@ -365,7 +366,14 @@ public abstract class AbstractJDBCTestElement extends AbstractTestElement implem
      * @return number of rows in resultSet
      * @throws SQLException
      */
-    private static int countRows(ResultSet resultSet) throws SQLException {
+    private int countRows(ResultSet resultSet) throws SQLException {
+        int resultSetMaxRows = getIntegerResultSetMaxRows();
+        if (resultSetMaxRows >= 0) {
+            resultSet.absolute(resultSetMaxRows);
+            if (!resultSet.isAfterLast()) {
+                return resultSet.getRow();
+            }
+        }
         return resultSet.last() ? resultSet.getRow() : 0;
     }
 
@@ -544,34 +552,15 @@ public abstract class AbstractJDBCTestElement extends AbstractTestElement implem
             results = new ArrayList<>();
             jmvars.putObject(currentResultVariable, results);
         }
-        int j = 0;
-        while (rs.next()) {
-            Map<String, Object> row = null;
-            j++;
-            for (int i = 1; i <= numColumns; i++) {
-                Object o = rs.getObject(i);
-                if(results != null) {
-                    if(row == null) {
-                        row = new HashMap<>(numColumns);
-                        results.add(row);
-                    }
-                    row.put(meta.getColumnLabel(i), o);
-                }
-                if (o instanceof byte[]) {
-                    o = new String((byte[]) o, ENCODING);
-                }
-                sb.append(o);
-                if (i==numColumns){
-                    sb.append('\n');
-                } else {
-                    sb.append('\t');
-                }
-                if (i <= varNames.length) { // i starts at 1
-                    String name = varNames[i - 1].trim();
-                    if (name.length()>0){ // Save the value in the variable if present
-                        jmvars.put(name+UNDERSCORE+j, o == null ? null : o.toString());
-                    }
-                }
+        int currentIterationIndex = 0;
+        int resultSetMaxRows = getIntegerResultSetMaxRows();
+        if (resultSetMaxRows < 0) {
+            while (rs.next()) {
+                currentIterationIndex = processRow(rs, meta, sb, numColumns, jmvars, varNames, results, currentIterationIndex);
+            }
+        } else {
+            while (currentIterationIndex < resultSetMaxRows && rs.next()) {
+                currentIterationIndex = processRow(rs, meta, sb, numColumns, jmvars, varNames, results, currentIterationIndex);
             }
         }
         // Remove any additional values from previous sample
@@ -583,17 +572,50 @@ public abstract class AbstractJDBCTestElement extends AbstractTestElement implem
                 String prevCount = jmvars.get(varCount);
                 if (prevCount != null) {
                     int prev = Integer.parseInt(prevCount);
-                    for (int n = j + 1; n <= prev; n++) {
+                    for (int n = currentIterationIndex + 1; n <= prev; n++) {
                         jmvars.remove(name + UNDERSCORE + n);
                     }
                 }
-                jmvars.put(varCount, Integer.toString(j)); // save the current count
+                jmvars.put(varCount, Integer.toString(currentIterationIndex)); // save the current count
             }
         }
 
         return sb.toString();
     }
 
+    private int processRow(ResultSet rs, ResultSetMetaData meta, StringBuilder sb, int numColumns,
+            JMeterVariables jmvars, String[] varNames, List<Map<String, Object>> results, int currentIterationIndex)
+            throws SQLException, UnsupportedEncodingException {
+        Map<String, Object> row = null;
+        currentIterationIndex++;
+        for (int i = 1; i <= numColumns; i++) {
+            Object o = rs.getObject(i);
+            if(results != null) {
+                if(row == null) {
+                    row = new HashMap<>(numColumns);
+                    results.add(row);
+                }
+                row.put(meta.getColumnLabel(i), o);
+            }
+            if (o instanceof byte[]) {
+                o = new String((byte[]) o, ENCODING);
+            }
+            sb.append(o);
+            if (i==numColumns){
+                sb.append('\n');
+            } else {
+                sb.append('\t');
+            }
+            if (i <= varNames.length) { // i starts at 1
+                String name = varNames[i - 1].trim();
+                if (name.length()>0){ // Save the value in the variable if present
+                    jmvars.put(name+UNDERSCORE+currentIterationIndex, o == null ? null : o.toString());
+                }
+            }
+        }
+        return currentIterationIndex;
+    }
+
     public static void close(Connection c) {
         try {
             if (c != null) {
@@ -655,6 +677,37 @@ public abstract class AbstractJDBCTestElement extends AbstractTestElement implem
         this.queryTimeout = queryTimeout;
     }
 
+    /**
+     * @return the integer representation resultSetMaxRows
+     */
+    public int getIntegerResultSetMaxRows() {
+        int maxrows;
+        if(StringUtils.isEmpty(resultSetMaxRows)) {
+            return -1;
+        } else {
+            try {
+                maxrows = Integer.parseInt(resultSetMaxRows);
+            } catch (NumberFormatException nfe) {
+                maxrows = -1;
+            }
+        }
+        return maxrows;
+    }
+
+    /**
+     * @return the resultSetMaxRows
+     */
+    public String getResultSetMaxRows() {
+        return resultSetMaxRows ;
+    }
+
+    /**
+     * @param resultSetMaxRows max number of rows to iterate through the ResultSet
+     */
+    public void setResultSetMaxRows(String resultSetMaxRows) {
+        this.resultSetMaxRows = resultSetMaxRows;
+    }
+
     public String getQuery() {
         return query;
     }
diff --git a/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/JDBCTestElementBeanInfoSupport.java b/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/JDBCTestElementBeanInfoSupport.java
index 9b6640e..862cf4f 100644
--- a/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/JDBCTestElementBeanInfoSupport.java
+++ b/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/JDBCTestElementBeanInfoSupport.java
@@ -44,6 +44,7 @@ public abstract class JDBCTestElementBeanInfoSupport extends BeanInfoSupport {
                 "variableNames", // $NON-NLS-1$
                 "resultVariable", // $NON-NLS-1$
                 "queryTimeout", // $NON-NLS-1$
+                "resultSetMaxRows", // $NON-NLS-1$
                 "resultSetHandler" // $NON-NLS-1$
                 });
 
@@ -81,6 +82,10 @@ public abstract class JDBCTestElementBeanInfoSupport extends BeanInfoSupport {
         p.setValue(NOT_UNDEFINED, Boolean.TRUE);
         p.setValue(DEFAULT, "");
 
+        p = property("resultSetMaxRows"); // $NON-NLS-1$
+        p.setValue(NOT_UNDEFINED, Boolean.TRUE);
+        p.setValue(DEFAULT, "");
+
         p = property("queryType"); // $NON-NLS-1$
         p.setValue(NOT_UNDEFINED, Boolean.TRUE);
         p.setValue(DEFAULT, AbstractJDBCTestElement.SELECT);
diff --git a/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/processor/JDBCPostProcessorResources.properties b/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/processor/JDBCPostProcessorResources.properties
index 3792549..511f475 100644
--- a/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/processor/JDBCPostProcessorResources.properties
+++ b/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/processor/JDBCPostProcessorResources.properties
@@ -29,8 +29,10 @@ queryArgumentsTypes.shortDescription=JDBC Type names from java.sql.Types. VARCHA
 variableNames.displayName=Variable names
 variableNames.shortDescription=Output variable names for each column  (comma separated)
 resultSetHandler.displayName=Handle ResultSet
-resultSetHandler.shortDescription=How should return values of type ResultSet be handled
+resultSetHandler.shortDescription=How should return values of type ResultSet be handled (only relevant for query type 'callable statement')
 resultVariable.displayName=Result variable name
 resultVariable.shortDescription=Name of the JMeter variable that stores the result set objects in a list of maps for looking up results by column name.
 queryTimeout.displayName=Query timeout
 queryTimeout.shortDescription=The timeout of statement measured in seconds
+resultSetMaxRows.displayName=Limit ResultSet
+resultSetMaxRows.shortDescription=Maximum number of rows to iterate through the ResultSet
diff --git a/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/processor/JDBCPostProcessorResources_fr.properties b/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/processor/JDBCPostProcessorResources_fr.properties
index 5a58806..e8e0e86 100644
--- a/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/processor/JDBCPostProcessorResources_fr.properties
+++ b/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/processor/JDBCPostProcessorResources_fr.properties
@@ -35,3 +35,5 @@ variableNames.displayName=Noms des variables
 variableNames.shortDescription=Noms des variables en sortie pour chaque colonne (séparés par des virgules)
 queryTimeout.displayName=Délai d'expiration de la requête
 queryTimeout.shortDescription=Délai d'expiration de le requête en secondes
+resultSetMaxRows.displayName=Limite le ResultSet
+resultSetMaxRows.shortDescription=Nombre maximum de lignes à itérer dans le ResultSet.
diff --git a/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/processor/JDBCPreProcessorResources.properties b/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/processor/JDBCPreProcessorResources.properties
index 4ef4296..c3ea336 100644
--- a/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/processor/JDBCPreProcessorResources.properties
+++ b/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/processor/JDBCPreProcessorResources.properties
@@ -29,8 +29,10 @@ queryArgumentsTypes.shortDescription=JDBC Type names from java.sql.Types. VARCHA
 variableNames.displayName=Variable names
 variableNames.shortDescription=Output variable names for each column  (comma separated)
 resultSetHandler.displayName=Handle ResultSet
-resultSetHandler.shortDescription=How should return values of type ResultSet be handled
+resultSetHandler.shortDescription=How should return values of type ResultSet be handled (only relevant for query type 'callable statement')
 resultVariable.displayName=Result variable name
 resultVariable.shortDescription=Name of the JMeter variable that stores the result set objects in a list of maps for looking up results by column name.
 queryTimeout.displayName=Query timeout
 queryTimeout.shortDescription=The timeout of statement measured in seconds
+resultSetMaxRows.displayName=Limit ResultSet
+resultSetMaxRows.shortDescription=Maximum number of rows to iterate through the ResultSet
diff --git a/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/processor/JDBCPreProcessorResources_fr.properties b/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/processor/JDBCPreProcessorResources_fr.properties
index efedf24..0ff34b0 100644
--- a/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/processor/JDBCPreProcessorResources_fr.properties
+++ b/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/processor/JDBCPreProcessorResources_fr.properties
@@ -35,3 +35,5 @@ variableNames.displayName=Noms des variables
 variableNames.shortDescription=Noms des variables en sortie pour chaque colonne (séparés par des virgules)
 queryTimeout.displayName=Délai d'expiration de la requête
 queryTimeout.shortDescription=Délai d'expiration de le requête en secondes
+resultSetMaxRows.displayName=Limite le ResultSet
+resultSetMaxRows.shortDescription=Nombre maximum de lignes à itérer dans le ResultSet.
diff --git a/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSamplerResources.properties b/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSamplerResources.properties
index 7d09e96..dd78e75 100644
--- a/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSamplerResources.properties
+++ b/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSamplerResources.properties
@@ -29,8 +29,10 @@ queryArgumentsTypes.shortDescription=JDBC Type names from java.sql.Types. VARCHA
 variableNames.displayName=Variable names
 variableNames.shortDescription=Output variable names for each column  (comma separated)
 resultSetHandler.displayName=Handle ResultSet
-resultSetHandler.shortDescription=How should return values of type ResultSet be handled
+resultSetHandler.shortDescription=How should return values of type ResultSet be handled (only relevant for query type 'callable statement')
 resultVariable.displayName=Result variable name
 resultVariable.shortDescription=Name of the JMeter variable that stores the result set objects in a list of maps for looking up results by column name.
 queryTimeout.displayName=Query timeout (s)
 queryTimeout.shortDescription=The timeout of statement measured in seconds
+resultSetMaxRows.displayName=Limit ResultSet
+resultSetMaxRows.shortDescription=Maximum number of rows to iterate through the ResultSet
diff --git a/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSamplerResources_fr.properties b/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSamplerResources_fr.properties
index 7d6b7c0..ffd7c87 100644
--- a/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSamplerResources_fr.properties
+++ b/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSamplerResources_fr.properties
@@ -35,3 +35,5 @@ variableNames.displayName=Noms des variables
 variableNames.shortDescription=Noms des variables en sortie pour chaque colonne (séparés par des virgules)
 queryTimeout.displayName=Délai d'expiration de la requête (s)
 queryTimeout.shortDescription=Délai d'expiration de le requête en secondes
+resultSetMaxRows.displayName=Limite le ResultSet
+resultSetMaxRows.shortDescription=Nombre maximum de lignes à itérer dans le ResultSet.
diff --git a/xdocs/images/screenshots/jdbctest/jdbc-request.png b/xdocs/images/screenshots/jdbctest/jdbc-request.png
index 226fca1..a3b4677 100644
Binary files a/xdocs/images/screenshots/jdbctest/jdbc-request.png and b/xdocs/images/screenshots/jdbctest/jdbc-request.png differ
diff --git a/xdocs/usermanual/component_reference.xml b/xdocs/usermanual/component_reference.xml
index 49f5f05..e08bce5 100644
--- a/xdocs/usermanual/component_reference.xml
+++ b/xdocs/usermanual/component_reference.xml
@@ -597,6 +597,7 @@ the additional variables for rows four, five and six will be removed.
         </property>
         <property name="Query timeout(s)" required="No">Set a timeout in seconds for query, empty value means 0 which is infinite. <code>-1</code> means don't set any query timeout
 which might be needed for use case or when certain drivers don't support timeout. Defaults to 0.</property>
+        <property name="Limit ResultSet" required="No">Limits the number of rows to iterate through the ResultSet. Empty value means <code>-1</code>, e.g. no limitation, which is also the default. This can help to reduce the amount of data to be fetched from the database via the JDBC driver, but affects all possible options of <code>Handle ResultSet</code> respectively – e.g. incomplete ResultSet and a record count ≤ the limit.</property>
         <property name="Handle ResultSet" required="No">Defines how ResultSet returned from callable statements be handled:
             <ul>
                 <li><code>Store As String</code> (default) - All variables on Variable Names list are stored as strings, will not iterate through a <code>ResultSet</code> when present on the list. <code>CLOB</code>s will be converted to Strings. <code>BLOB</code>s will be converted to Strings as if they were an UTF-8 encoded byte-array. Both <code>CLOB</code>s and <code>BLOB</code>s will be cut off after <code>jdbcsampler.max_retain_result_size</code> bytes.</li>