Derby
  1. Derby
  2. DERBY-6033

Lift the arbitrary limit on the number of routine parameters.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.10.1.1
    • Fix Version/s: 10.10.1.1
    • Component/s: SQL
    • Labels:
      None
    • Urgency:
      Normal
    • Issue & fix info:
      Newcomer

      Description

      The number of parameters to a Derby routine is arbitrarily limited to 90. This limit is causing difficulties for users (see http://apache-database.10148.n7.nabble.com/number-of-parameters-td126108.html). It ought to be safe to lift this limit. Changes need to be made to CreateAliasNode and to the corresponding dbManagerLimits.testMostParametersInStoredProcedures() test.

      1. testMaxParams.diff
        7 kB
        Knut Anders Hatlen
      2. derby-6033-01-aa-liftLimit.diff
        6 kB
        Rick Hillegas

        Activity

        Hide
        Rick Hillegas added a comment -

        Attaching derby-6033-01-aa-liftLimit.diff. This patch removes the limit of 90 parameters per SQL routine. I am running tests now.

        Touches the following files:

        -----------

        M java/engine/org/apache/derby/iapi/reference/Limits.java
        M java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java

        Remove the limit.

        -----------

        M java/engine/org/apache/derby/loc/messages.xml
        M java/shared/org/apache/derby/shared/common/reference/SQLState.java

        Remove the corresponding error message.

        -----------

        M java/testing/org/apache/derbyTesting/functionTests/tests/lang/dbManagerLimits.java
        M java/testing/org/apache/derbyTesting/functionTests/master/dbManagerLimits.out

        Adjust the corresponding test.

        Show
        Rick Hillegas added a comment - Attaching derby-6033-01-aa-liftLimit.diff. This patch removes the limit of 90 parameters per SQL routine. I am running tests now. Touches the following files: ----------- M java/engine/org/apache/derby/iapi/reference/Limits.java M java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java Remove the limit. ----------- M java/engine/org/apache/derby/loc/messages.xml M java/shared/org/apache/derby/shared/common/reference/SQLState.java Remove the corresponding error message. ----------- M java/testing/org/apache/derbyTesting/functionTests/tests/lang/dbManagerLimits.java M java/testing/org/apache/derbyTesting/functionTests/master/dbManagerLimits.out Adjust the corresponding test.
        Hide
        Rick Hillegas added a comment -

        Tests passed cleanly for me on derby-6033-01-aa-liftLimit.diff. Committed at subversion revision 1428567.

        Show
        Rick Hillegas added a comment - Tests passed cleanly for me on derby-6033-01-aa-liftLimit.diff. Committed at subversion revision 1428567.
        Hide
        Knut Anders Hatlen added a comment -

        We should also update the table in the reference manual that lists limitations: http://db.apache.org/derby/docs/10.9/ref/rrefdbmlimits.html

        Show
        Knut Anders Hatlen added a comment - We should also update the table in the reference manual that lists limitations: http://db.apache.org/derby/docs/10.9/ref/rrefdbmlimits.html
        Hide
        Kim Haase added a comment -

        You read my mind, Knut (or vice versa) – I just filed DERBY-6034 for this.

        Show
        Kim Haase added a comment - You read my mind, Knut (or vice versa) – I just filed DERBY-6034 for this.
        Hide
        Knut Anders Hatlen added a comment -

        testMaxParams.diff adds a test case that verifies that Derby can create and execute a procedure with the maximum number of parameters allowed by the Java Virtual Machine specification (255, per http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.11 ).

        It also tests that stored procedures with more than 255 parameters fail gracefully on execution. Note that DDL with > 255 parameters will not fail, as CREATE PROCEDURE does not check whether the Java method exists. That's only checked on execution.

        Committed revision 1428775.

        Show
        Knut Anders Hatlen added a comment - testMaxParams.diff adds a test case that verifies that Derby can create and execute a procedure with the maximum number of parameters allowed by the Java Virtual Machine specification (255, per http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.11 ). It also tests that stored procedures with more than 255 parameters fail gracefully on execution. Note that DDL with > 255 parameters will not fail, as CREATE PROCEDURE does not check whether the Java method exists. That's only checked on execution. Committed revision 1428775.

          People

          • Assignee:
            Rick Hillegas
            Reporter:
            Rick Hillegas
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development