Bug 53073 - Allow to assign the OUT result of a JDBC CALLABLE to JMeter variables
Allow to assign the OUT result of a JDBC CALLABLE to JMeter variables
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
2.6
All All
: P2 enhancement (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2012-04-13 10:35 UTC by Roman Bargezi
Modified: 2012-04-24 11:36 UTC (History)
1 user (show)



Attachments
Proposed enhancement patch to Rev 1234407 of AbstractJDBCTestElement.java (1.46 KB, patch)
2012-04-13 10:37 UTC, Roman Bargezi
Details | Diff
Proposed enhancement patch to Rev 1234407 of AbstractJDBCTestElement.java (1.78 KB, patch)
2012-04-13 12:42 UTC, Roman Bargezi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Bargezi 2012-04-13 10:35:02 UTC
It currently does not seem possible to store the OUT result variables of a JDBC CALLABLE statement type in a JMeter variable the way one can store results of a SELECT. This request asks for the capability to specify a list of variable names into which the resulting OUT results are stored
Comment 1 Roman Bargezi 2012-04-13 10:37:02 UTC
Created attachment 28602 [details]
Proposed enhancement patch to Rev 1234407 of AbstractJDBCTestElement.java
Comment 2 Roman Bargezi 2012-04-13 12:42:21 UTC
Created attachment 28603 [details]
Proposed enhancement patch to Rev 1234407 of AbstractJDBCTestElement.java
Comment 3 Philippe Mouawad 2012-04-22 17:19:25 UTC
Hello,
Thanks for the patch but either I didn't fully understand its behaviour or there is something wrong in it.

Particularly in the way you use the variables from JMeterContext.
Aren't you making suppositions on the order and number of variables being equals to number of OUT parameters. I think there is some information missing, maybe there should be an additional field or the result variable should be a COMMA separated variable names. 

Regards
Comment 4 Roman Bargezi 2012-04-24 08:53:02 UTC
Hi,

the intent of the code is to store the OUT results in the variables provided to the "Variable Names" field in a similar manner as it is currently used to store results returned by a select statement but without generating new numerated versions of the variables.

The variable names should be comma separated and in the same sequence as the OUT parameters returned by the call. If there are less variable names than OUT parameters only as many results shall be stored in the thread-context variables as variable names were supplied. If more variable names than OUT parameters exist, the additional variables will be ignored. As such, I am making assumptions about the sequence and the number of variable names provided. Looking at the code that is used for storing results of a SELECT statement, this seems to be the case here as well.

I checked the code once more (and also tested it in our environment) and it seems to be doing what above description intends.
Comment 5 Philippe Mouawad 2012-04-24 11:36:16 UTC
Thanks for clarification and patch.
Patch applied.
Comment 6 Philippe Mouawad 2012-04-24 11:36:50 UTC
Date: Tue Apr 24 11:35:34 2012
New Revision: 1329645

URL: http://svn.apache.org/viewvc?rev=1329645&view=rev
Log:
Bug 53073 - Allow to assign the OUT result of a JDBC CALLABLE to JMeter variables

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