Derby
  1. Derby
  2. DERBY-3610

Confusing error message when granting execute privilege

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial 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.

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

        Issue Links

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development