private MariaDbConnection(Protocol protocol,ReentrantLock lock) throws SQLException {
  this.protocol=protocol;
  options=protocol.getOptions();
  noBackslashEscapes=protocol.noBackslashEscapes();
  nullCatalogMeansCurrent=options.nullCatalogMeansCurrent;
  if (options.cacheCallableStmts) {
    callableStatementCache=CallableStatementCache.newInstance(options.callableStmtCacheSize);
  }
  this.lock=lock;
  if (options.cachePrepStmts) {
    this.clientPrepareStatementCache=ClientPrepareStatementCache.newInstance(options.prepStmtCacheSize);
  }
 else {
    clientPrepareStatementCache=null;
  }
}

private MariaDbConnection ( Protocol protocol , ReentrantLock lock ) throws SQLException { this . protocol = protocol ; options = protocol . getOptions ( ) ; noBackslashEscapes = protocol . noBackslashEscapes ( ) ; nullCatalogMeansCurrent = options . nullCatalogMeansCurrent ; if ( options . cacheCallableStmts ) { callableStatementCache = CallableStatementCache . newInstance ( options . callableStmtCacheSize ) ; } this . lock = lock ; if ( options . cachePrepStmts ) { this . clientPrepareStatementCache = ClientPrepareStatementCache . newInstance ( options . prepStmtCacheSize ) ; } else { clientPrepareStatementCache = null ; } }
creates a new connection with a given protocol and query factory .
