Re: Why is useLocalSessionState false by default
Posted by: Mark Matthews
Date: January 07, 2015 10:46AM

Hi Florian,

It's on by default because some applications (wrongly) do things like Statement.execute("set auto_commit=0"), and that coupled with "useLocalSessionState=true" as a default would break many things. The JDBC specification *requires* that the driver returns the *true* state of the session for calls like getAutoCommit(), getTransactionIsolation(), etc. Short of parsing every single statement issued through the driver, we use a safe default. If the user knows their application doesn't issue statements that change the session states around transactions, they can toggle the configuration value to get more performance. We err on the side of correct behavior first, performance second with the default configurations of the JDBC driver.

-Mark

Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html

Options: ReplyQuote


Subject
Written By
Posted
Re: Why is useLocalSessionState false by default
January 07, 2015 10:46AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.