setEncoding(getJavaEncodingForMysqlEncoding(oldEncoding));
} catch (SQLException ex) {
throw ex;
} catch (RuntimeException ex) {
SQLException sqlEx = SQLError.createSQLException(ex.toString(), SQLError.SQL_STATE_ILLEGAL_ARGUMENT, null);
sqlEx.initCause(ex);
throw sqlEx;
}
if (getEncoding() == null) {
throw SQLError.createSQLException(