Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDBC Sample doesn't support PreparedStatements or CallableStatements with arguments #1817

Closed
asfimport opened this issue Oct 27, 2006 · 5 comments

Comments

@asfimport
Copy link
Collaborator

Rubén Laguna (Bug 40825):
This one is related to #1683
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.

Votes in Bugzilla: 1
OS: other

@asfimport
Copy link
Collaborator Author

Rubén Laguna (migrated from Bugzilla):
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).

Created attachment jdbc.patch: Support for JDBC PreparedStatements and CallableStatements with parameters

@asfimport
Copy link
Collaborator Author

Rubén Laguna (migrated from Bugzilla):
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/

@asfimport
Copy link
Collaborator Author

Sebb (migrated from Bugzilla):
Version 2.2.1 does not exist (yet)

@asfimport
Copy link
Collaborator Author

Sebb (migrated from Bugzilla):
Thanks for the patch, which has been applied in SVN r528906.

I changed the code to set up mapJdbcNameToInt using a static initialiser.

@asfimport
Copy link
Collaborator Author

Rubén Laguna (migrated from Bugzilla):
I posted an attachment in #1902 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant