Jason Winnebeck wrote:
> Couldn't you just revert to the old client-side
> behavior when the server protocol doesn't support
> it? An extremely brief view of the code via
> various stack traces I've seen from connections
> hints strongly that you have an abstract type of
> PS then you have concrete definitions like
> ServerPreparedStatement. Couldn't you just have
> code that says return ServerPS when supported,
> else return a ClientPS (or whatever the class is
> called)?
>
Jason,
Already pushed into the codeline for 3.1.7 (from the CHANGES file):
"By default, the driver now scans SQL you are preparing via all variants
of Connection.prepareStatement() to determine if it is a supported
type of statement to prepare on the server side, and if it is not
supported by the server, it instead prepares it as a client-side emulated
prepared statement (BUG#4718). You can disable this by passing
'emulateUnsupportedPstmts=false' in your JDBC URL."
This is in the nightly builds available at
http://downloads.mysql.com/snapshots.php#connector-j if you want to test it before official release.
-Mark
Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html