You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2014/12/07 01:51:35 UTC

[Bug 57322] New: JDBC: add methods to deal with ResultSets(cursors) returned by callable statements

https://issues.apache.org/bugzilla/show_bug.cgi?id=57322

            Bug ID: 57322
           Summary: JDBC: add methods to deal with ResultSets(cursors)
                    returned by callable statements
           Product: JMeter
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: blitzkopf@gmail.com

Created attachment 32265
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=32265&action=edit
Patch to add ResultSet returned from Callable Statements.

In Oracle it is a common practice to return queries from stored procedures as a
construct called refcursor. Refcursors are then returned as ResultSets to Java
and if you really want to do thorough load test you actually have to loop
through the whole result set. The current code does not iterate through those
ResultSet and stores the ResultSet as string so it is not possible to do any
further processing on it. If the ResultSet is stored as a Object they can
actually be iterated in JSR223 of BeanShell script. It would also be nice if
the JDBC sampler would actually just iterate through the RS by itself.

Attached is a patch for your consideration, that adds the code and
configuration options for dealing with ResultSets : Store as String, Store as
Object, and Count Records. 

Regards 
Yngvi

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 57322] JDBC: add methods to deal with ResultSets(cursors) returned by callable statements

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57322

--- Comment #3 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Date: Mon Dec 15 21:03:31 2014
New Revision: 1645749

URL: http://svn.apache.org/r1645749
Log:
Bug 57322 - JDBC: add methods to deal with ResultSets(cursors) returned by
callable statements
Add missing FR translations
Bugzilla Id: 57322

Modified:
   
jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/processor/JDBCPostProcessorResources.properties
   
jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/processor/JDBCPreProcessorResources_fr.properties
   
jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSamplerResources_fr.properties

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 57322] JDBC: add methods to deal with ResultSets(cursors) returned by callable statements

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57322

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 57322] JDBC: add methods to deal with ResultSets(cursors) returned by callable statements

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57322

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Date: Mon Dec 15 20:47:22 2014
New Revision: 1645746

URL: http://svn.apache.org/r1645746
Log:
Bug 57322 - JDBC: add methods to deal with ResultSets(cursors) returned by
callable statements
Bugzilla Id: 57322

Modified:
   
jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java
   
jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/JDBCTestElementBeanInfoSupport.java
   
jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/processor/JDBCPostProcessorResources.properties
   
jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/processor/JDBCPreProcessorResources.properties
   
jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSamplerResources.properties
    jmeter/trunk/xdocs/changes.xml
    jmeter/trunk/xdocs/usermanual/component_reference.xml

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 57322] JDBC: add methods to deal with ResultSets(cursors) returned by callable statements

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57322

--- Comment #2 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Hello,
Thanks for contribution.
I commited code with a fix to the count of rows as I think there was a bug in :
                            else if( RS_COUNT_RECORDS.equals(resultSetHandler))

270     

                                jmvars.put(name,o.toString()+"
"+((java.sql.ResultSet)o).getRow()+" rows");

It would be great to test nightly build and tell us if it works for you as you
wanted it to .

Thanks
Regards
Philippe M.
@philmdot

-- 
You are receiving this mail because:
You are the assignee for the bug.