Bug 40825 - JDBC Sample doesn't support PreparedStatements or CallableStatements with arguments
Summary: JDBC Sample doesn't support PreparedStatements or CallableStatements with arg...
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.2
Hardware: Other other
: P2 enhancement with 1 vote (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-27 02:56 UTC by Rubén Laguna
Modified: 2007-04-25 01:30 UTC (History)
0 users



Attachments
Support for JDBC PreparedStatements and CallableStatements with parameters (15.03 KB, patch)
2006-10-27 03:03 UTC, Rubén Laguna
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rubén Laguna 2006-10-27 02:56:57 UTC
This one is related to Bug #38682
http://issues.apache.org/bugzilla/show_bug.cgi?id=38682

Currently there is no way to benchmark the execution of JDBC PreparedStatements.
Even for CallableStatements that are a subclass of PreparedStatements are not
fully  supported now. Because no "true" parameters ( '?' in the sql statemetns)
are allowed then it's not possible to execute RPC to stored procedures in all
jdbc drivers. Lots of JDBC drivers doesn't execute a RPC call if the
CallableStatement has no parameters. i.e the following statement

call s2('id1000') 

will translate in Sybase ASE to a TDS_LANG query but the following statement

call s2(?)

will translate to TDS_RPC that is much faster and the preferred way to access
the database.
Comment 1 Rubén Laguna 2006-10-27 03:03:44 UTC
Created attachment 19044 [details]
Support for JDBC PreparedStatements and CallableStatements with parameters

Adds support for JDBC PreparedStatement. 

Two boxes in the lower part of the windows allow to enter a comma separated
list of parameter values and a comma separated list of parameter types
(VARCHAR, INTEGER, etc).
Comment 2 Rubén Laguna 2006-12-14 06:50:57 UTC
I've created a plugin with a new JDBC Sampler supporting the PreparedStatements.
Anyone interested in using it can check it out at
http://rubenlaguna.com/wp/2006/12/14/enhanced-jdbc-sampler-for-apache-jmeter/
Comment 3 Sebb 2006-12-14 07:37:32 UTC
Version 2.2.1 does not exist (yet)
Comment 4 Sebb 2007-04-14 18:55:32 UTC
Thanks for the patch, which has been applied in SVN r528906.

I changed the code to set up mapJdbcNameToInt using a static initialiser.
Comment 5 Rubén Laguna 2007-04-25 01:30:47 UTC
I posted an attachment in Bug #42018  to allow commits and rollback that
currently aren't supported in JMeter. (At least not supported in all databases,
i.e Apache Derby). 

(In reply to comment #4)
> Thanks for the patch, which has been applied in SVN r528906.
> 
> I changed the code to set up mapJdbcNameToInt using a static initialiser.
> 

Comment 6 The ASF infrastructure team 2022-09-24 20:37:38 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1817