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

DROP PROCEDURE depends on SET SCHEMA

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.2.2.0
    • 10.2.2.1, 10.3.1.4
    • SQL
    • None
    • Sun Solaris;
      java version "1.4.1_06"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_06-b01)
      Java HotSpot(TM) Client VM (build 1.4.1_06-b01, mixed mode)
    • Normal

    Description

      This is possibly related to Bug https://issues.apache.org/jira/browse/DERBY-1304.

      Use ij to execute the following statements:

      CREATE SCHEMA datamgmt;
      CREATE PROCEDURE datamgmt.exit ( IN value INTEGER )
      MODIFIES SQL DATA
      PARAMETER STYLE JAVA
      LANGUAGE JAVA
      EXTERNAL NAME 'java.lang.System.exit'
      ;
      DROP PROCEDURE datamgmt.exit;
      DROP SCHEMA datamgmt RESTRICT;

      Then execute exactly the same lines once again. Then statement "DROP PROCEDURE datamgmt.exit" yields:

      ERROR 42X94: PROCEDURE 'EXIT' does not exist.

      However, if the DROP works if a default schema (SET SCHEMA) is used instead of the prefixed schemaName. That is, the following lines can be executed more than once in a row:

      CREATE SCHEMA datamgmt;
      CREATE PROCEDURE datamgmt.exit ( IN value INTEGER )
      MODIFIES SQL DATA
      PARAMETER STYLE JAVA
      LANGUAGE JAVA
      EXTERNAL NAME 'java.lang.System.exit'
      ;
      SET SCHEMA datamgmt;
      DROP PROCEDURE exit;
      DROP SCHEMA datamgmt RESTRICT;

      Therefore, SET SCHEMA can be used as a workaround, hence minor importance.

      Attachments

        1. 2202_repro.sql
          1.0 kB
          Samuel Andrew McIntyre
        2. derby2202-trunk-diff01.txt
          7 kB
          Yip Ng
        3. derby2202-trunk-stat01.txt
          0.4 kB
          Yip Ng
        4. derby2202-10.2-stat01.txt
          0.4 kB
          Yip Ng
        5. derby2202-10.2-diff01.txt
          7 kB
          Yip Ng

        Activity

          People

            yipng Yip Ng
            bodenstorfer Bernhard Bodenstorfer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: