Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4986916

Savepoints

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 8.0pe
    • core-libs
    • b01
    • sparc
    • solaris_8
    • Not verified

      SAVEPOINT setting:

      I'm uncomfortable referring to the SQL standard for this question, because
      I'm not completely sure that it is specified adequately/properly, but that
      being said, the question is: What happens when Connection.setSavepoint("foo"); is invoked outside the bounds of atransaction?

      For the simplest example,
          Connection conn = DriverManager.getConnection(...);
          conn.setAutoCommit(false); // required for Savepoint use.
          conn.setSavepoint("foo");

      All documentation I've scanned both in JDBC and the SQL standard implies a transaction has already started (e.g., the SQL standard includes phrases like "within the current SQL-transaction", and the JDBC standard says "sets a savepoint within the current transaction." But, neither says what happens when there is no current transaction, and (per the SQL standard) the SAVEPOINT statement doesn't itself start a transaction, so I can't get around the problem that way....

      ###@###.### 2004-02-02

            lancea Lance Andersen
            lancea Lance Andersen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: