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 2016/08/30 11:34:29 UTC
[Bug 60066] New: JDBC Sampler: Provide Support for CLOB
https://bz.apache.org/bugzilla/show_bug.cgi?id=60066
Bug ID: 60066
Summary: JDBC Sampler: Provide Support for CLOB
Product: JMeter
Version: 3.0
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Main
Assignee: issues@jmeter.apache.org
Reporter: apache_bugzilla@zwiers.ca
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 60066] JDBC Sampler: Provide Support for CLOB
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60066
--- Comment #3 from Felix Schumacher <fe...@internetallee.de> ---
Do you think it would be helpful, to use the resultSetHandler variable to
decide, whether we want the clob as an object, or a string representation?
And would it be a good idea, to specify an upper limit for the string
representation that is lower than Integer.MAX_VALUE?
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 60066] JDBC Sampler: Provide Support for CLOB
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60066
--- Comment #4 from Jacob Zwiers <ap...@zwiers.ca> ---
Not sure if those questions were for me or for more general discussion... but
I'll take a stab.
re/ resultSetHandler I'll leave it to you. I'm generally a user of JMeter and
this is only my second time looking into the code in any detail. I'm sure there
are preferences and/or conventions that I'm not aware or and therefore don't
feel qualified to comment here.
re/ Integer.MAX_VALUE That's only used if the CLOB itself provides a length
(type long) which is larger than the Integer.MAX_VALUE which the CharBuffer
accepts. Otherwise, the upper limit is the declared .length() of the CLOB.
Maybe that's what you're asking... after you get to 2GB of text you've probably
got other issues. A lower threshold would likely be advisable. Either way, a
warning if data is truncated.
As other comments indicate, the implementation was designed to get only what I
need and to do it quickly. The code is likely problematic in other areas. For
example, the value of totalRead is incorrect and doesn't get propagated.
Provided for inspiration rather than as a claim of solid implementation.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 60066] JDBC Sampler: Provide Support for CLOB
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60066
Felix Schumacher <fe...@internetallee.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #34184|0 |1
is obsolete| |
--- Comment #5 from Felix Schumacher <fe...@internetallee.de> ---
Created attachment 34229
--> https://bz.apache.org/bugzilla/attachment.cgi?id=34229&action=edit
Handle BLOBs and CLOBs
Another patch for converting CLOBs and CLOBs.
This one limits the results stored in the sampler to the value of
jdbcsampler.max_retain_result_size (which defaults to 64k).
Could you try it out?
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 60066] JDBC Sampler: Provide Support for CLOB
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60066
--- Comment #2 from Jacob Zwiers <ap...@zwiers.ca> ---
A discussion on the mailing list
(http://jmeter.512774.n5.nabble.com/CLOB-Supported-in-JDBC-Sampler-tt5724712.html)
highlighted that a CLOB OUT / INOUT parameter does not have it's content
returned by the JDBC Sampler.
The cause is that AbstractJDBCTestElement.resultSetsToString() loops through
the declared variables and (if not an instance of java.sql.ResultSet) simply
calls o.toString(). This is not sufficient to get content from a CLOB (at
least not from an Oracle DB).
The mailing list item points out that there may be nuances to different DB /
JDBC Driver implementations around CLOB.
A patch is provided and attached here with the caveat that it was simply "good
enough" to get the data I was looking for. There is no attempt to validate /
support IN CLOB parameters, integrate code style with JMeter, validate that all
Java features are provided in the JMeter supported version of Java, etc. and
and there was very little testing / validation of the code.
Provided simply as a hint to anyone stumbling across this looking for a hint or
quick implementation.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 60066] JDBC Sampler: Provide Support for CLOB
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60066
Felix Schumacher <fe...@internetallee.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #6 from Felix Schumacher <fe...@internetallee.de> ---
Date: Tue Sep 20 18:55:08 2016
New Revision: 1761614
URL: http://svn.apache.org/viewvc?rev=1761614&view=rev
Log:
Handle CLOBs and BLOBs and limit them if necessary when storing them in result
sampler.
Bugzilla Id: 60085
Modified:
jmeter/trunk/bin/jmeter.properties
jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java
jmeter/trunk/xdocs/changes.xml
jmeter/trunk/xdocs/usermanual/component_reference.xml
jmeter/trunk/xdocs/usermanual/properties_reference.xml
Date: Tue Sep 20 19:19:52 2016
New Revision: 1761624
URL: http://svn.apache.org/viewvc?rev=1761624&view=rev
Log:
Followup to r1761614. The correct bugzilla id is 60066.
Modified:
jmeter/trunk/xdocs/changes.xml
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 60066] JDBC Sampler: Provide Support for CLOB
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60066
--- Comment #1 from Jacob Zwiers <ap...@zwiers.ca> ---
Created attachment 34184
--> https://bz.apache.org/bugzilla/attachment.cgi?id=34184&action=edit
Quick hack of AbstractJDBCTestElement to support CLOB OUT
Intended for hints/guidance only.
--
You are receiving this mail because:
You are the assignee for the bug.