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

Confusing error message when granting execute privilege

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 10.6.1.0
    • SQL
    • 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. DERBY-3610-update2.patch
          5 kB
          Hiranya Kasub Jayathilaka
        2. GrantRevokeTest.log
          9 kB
          Knut Anders Hatlen
        3. DERBY-3610-update1.patch
          5 kB
          Hiranya Kasub Jayathilaka
        4. DERBY-3610.patch
          5 kB
          Hiranya Kasub Jayathilaka

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: