* Try to set the ANSI quotes mode on for the session. Due to connection pooling, needs
* to be called in the same transaction as the actual queries.
*/
private void trySetAnsiQuotesForMysql() throws SQLException {
final String queryText = "SET @@session.sql_mode=ANSI_QUOTES";
JDOConnection jdoConn = pm.getDataStoreConnection();
boolean doTrace = LOG.isDebugEnabled();
try {
long start = doTrace ? System.nanoTime() : 0;
((Connection)jdoConn.getNativeConnection()).createStatement().execute(queryText);
timingTrace(doTrace, queryText, start, doTrace ? System.nanoTime() : 0);
} finally {
jdoConn.close(); // We must release the connection before we call other pm methods.
}
}