protected Map<String,String> readMySqlCharsetSystemVariables(AtomicReference<String> sql){
  Map<String,String> variables=new HashMap<>();
  try (JdbcConnection mysql=jdbc.connect()){
    logger.debug("Reading MySQL charset-related system variables before parsing DDL history.");
    String statement="SHOW VARIABLES WHERE Variable_name IN ('character_set_server','collation_server')";
    if (sql != null)     sql.set(statement);
    mysql.query(statement,null);
  }
 catch (  SQLException e) {
    throw new ConnectException("Error reading MySQL variables: " + e.getMessage(),e);
  }
  return variables;
}

protected Map < String , String > readMySqlCharsetSystemVariables ( AtomicReference < String > sql ) { Map < String , String > variables = new HashMap < > ( ) ; try ( JdbcConnection mysql = jdbc . connect ( ) ) { logger . debug ( "Reading MySQL charset-related system variables before parsing DDL history." ) ; String statement = "SHOW VARIABLES WHERE Variable_name IN ('character_set_server','collation_server')" ; if ( sql != null ) sql . set ( statement ) ; mysql . query ( statement , null ) ; } catch ( SQLException e ) { throw new ConnectException ( "Error reading MySQL variables: " + e . getMessage ( ) , e ) ; } return variables ; }
read the mysql charset - related system variables .
