Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-639

Statements in stored procedures with holdable cursor should not be allowed to execute in xa global transaction

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.2.1.6
    • Fix Version/s: None
    • Component/s: JDBC
    • Urgency:
      Normal
    • Bug behavior facts:
      Deviation from standard

      Description

      Execution of statements with HOLD_CURSORS_OVER_COMMIT must not be allowed in a global transaction. Currently, this is allowed when the statement is inside a stored procedure.

      e.g: The following procedure should throw an error when executed inside a global transaction. However, no error is thrown when running with embedded or client drivers.

      //Java method for stored procedure with HOLD_CURSORS_OVER_COMMIT
      public static void testHoldCursorsProc(ResultSet[] rs) throws Exception

      { Connection conn = DriverManager.getConnection("jdbc:default:connection"); //HOLD_CURSORS_OVER_COMMIT Statement st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE , ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT); rs[0] = st.executeQuery("select * from testtable1"); }

        Attachments

        1. d639.sql
          1 kB
          Deepa Remesh
        2. d639.java
          0.5 kB
          Deepa Remesh

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                deepa Deepa Remesh
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: