Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-1908

SQL Extension exec stored proc breaks between 2.5.1 and 2.5.2/2.6.0


    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.6
    • Fix Version/s: None
    • Security Level: No security risk; visible to anyone (Ordinary problems in Xalan projects. Anybody can view the issue.)
    • Labels:
    • Environment:
      Operating System: All
      Platform: All
    • Bugzilla Id:


      > SQLDocument.java line 407 execute returns false for this query:
      > declare @InstKy int
      > declare @MConKy int
      > declare @Result int
      > select @InstKy= -1
      > select @MConKy= 1886524808
      > exec @Result= ICntrTyOpn 1886524808
      > , @InstKy output
      > , @MConKy output
      > , 1021
      > , 2
      > select @InstKy, @MConKy, @Result

      That is kind of what I was expecting. The API Docs say that Execute returns
      false if the execute is an Update or if the Query returns does not return a
      result set. Not returning a results set is different than a query that returns
      an empty result set. Can you explain what this SP is trying to do ?

      I took a look at the 2.5.1 code and I see a subtile difference in how the
      Query is executed. In 2.5.1 we were using executeQuery and not execute.

      Can you try the following mod:
      Orig Code:
      m_Statement = conn.createStatement();
      if (! m_Statement.execute(m_QueryParser.getSQLQuery()))

      { throw new SQLException("Error in Query"); }

      New Code:
      m_Statement = conn.createStatement();
      m_ResultSet = m_Statement.executeQuery(m_QueryParser.getSQLQuery()))

      Yes the change (executeQuery) works for all the situations I tested.
      Nearly all our stored procedures move data between a set of normalized tables of
      permanent data and another set of denormalized tables with temporary data. A
      whole bunch of overhead SQL is called as well, but no result sets are returned.
      Separate queries select the temporary data.

      Is the difference between execute and executeQuery going to break someone else's




            • Assignee:
              xing@maine.rr.com Phil Friedman
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: