presto-jdbc/src/main/java/io/prestosql/jdbc/PrestoConnection.java/PrestoConnection/setAutoCommit
class PrestoConnection:    @Override
    public void setAutoCommit(boolean autoCommit)
            throws SQLException
    {
        checkOpen();
        boolean wasAutoCommit = this.autoCommit.getAndSet(autoCommit);
        if (autoCommit && !wasAutoCommit) {
            commit();
        }
    }