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

Confusing error message when granting execute privilege

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.6.1.0
    • Component/s: SQL
    • Labels:
      None

      Description

      When the wrong keyword is used in a grant execute privilege statement, the error message
      leads one the believe the identifier is neither a procedure or a function, when in deed it is one of the two.

      > create function bc(i int) returns int language java parameter style java external name 'java.lang.Integer.bitCount' no sql;
      > grant execute on procedure bc to foo;
      ERROR 42Y03: 'BC' is not recognized as a function or procedure.

      > grant execute on function bc to foo;
      (works)

      The reason is that the error message is generic. It would be better to have an error message for each case.

        Attachments

        1. GrantRevokeTest.log
          9 kB
          Knut Anders Hatlen
        2. DERBY-3610-update2.patch
          5 kB
          Hiranya Jayathilaka
        3. DERBY-3610-update1.patch
          5 kB
          Hiranya Jayathilaka
        4. DERBY-3610.patch
          5 kB
          Hiranya Jayathilaka

          Issue Links

            Activity

              People

              • Assignee:
                hiranya Hiranya Jayathilaka
                Reporter:
                dagw Dag H. Wanvik
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: