code: public void setCatalog(final String catalog) throws SQLException {
      if (catalog == null) {
        throw new SQLException("The catalog name may not be null", "XAE05");
      }
      try {
        stateFlag |= ConnectionState.STATE_DATABASE;
        protocol.setCatalog(catalog);
      } catch (SQLException e) {
        throw ExceptionMapper.getException(e, this, null, false);
      }
    }
docs: <p>Sets the given catalog name in order to select a subspace of this <code>Connection</code>
  object's database in which to work.</p>
  <p>If the driver does not support catalogs, it will silently ignore this request.</p>
  MariaDB treats catalogs and databases as equivalent
  
  @param catalog the name of a catalog (subspace in this <code>Connection</code> object's
  database) in which to work
  @throws SQLException if a database access error occurs or this method is called on a closed
  connection
  @see #getCatalog