You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2010/01/22 22:30:21 UTC

[jira] Created: (DERBY-4524) Incorrect DROP FUNCTION logic in AccessTest's tearDown() method

Incorrect DROP FUNCTION logic in AccessTest's tearDown() method
---------------------------------------------------------------

                 Key: DERBY-4524
                 URL: https://issues.apache.org/jira/browse/DERBY-4524
             Project: Derby
          Issue Type: Bug
          Components: Test
    Affects Versions: 10.6.0.0
            Reporter: Knut Anders Hatlen


    public void tearDown() throws Exception {
        Statement st = createStatement();
        super.tearDown();
        try {
            st.executeUpdate("DROP FUNCTION PADSTRING");
        } catch (SQLException e) {
            // never mind.
        }
    }

The DROP FUNCTION statement always fails with "No current connection" because super.tearDown(), which is called between createStatement() and executeUpdate(), closes the connection.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DERBY-4524) Incorrect DROP FUNCTION logic in AccessTest's tearDown() method

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen closed DERBY-4524.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.6.0.0

Committed revision 902288.

> Incorrect DROP FUNCTION logic in AccessTest's tearDown() method
> ---------------------------------------------------------------
>
>                 Key: DERBY-4524
>                 URL: https://issues.apache.org/jira/browse/DERBY-4524
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.6.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.6.0.0
>
>         Attachments: removeTearDown.diff
>
>
>     public void tearDown() throws Exception {
>         Statement st = createStatement();
>         super.tearDown();
>         try {
>             st.executeUpdate("DROP FUNCTION PADSTRING");
>         } catch (SQLException e) {
>             // never mind.
>         }
>     }
> The DROP FUNCTION statement always fails with "No current connection" because super.tearDown(), which is called between createStatement() and executeUpdate(), closes the connection.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-4524) Incorrect DROP FUNCTION logic in AccessTest's tearDown() method

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-4524:
--------------------------------------

    Attachment: removeTearDown.diff

Attaching patch that removes tearDown().

> Incorrect DROP FUNCTION logic in AccessTest's tearDown() method
> ---------------------------------------------------------------
>
>                 Key: DERBY-4524
>                 URL: https://issues.apache.org/jira/browse/DERBY-4524
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.6.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>         Attachments: removeTearDown.diff
>
>
>     public void tearDown() throws Exception {
>         Statement st = createStatement();
>         super.tearDown();
>         try {
>             st.executeUpdate("DROP FUNCTION PADSTRING");
>         } catch (SQLException e) {
>             // never mind.
>         }
>     }
> The DROP FUNCTION statement always fails with "No current connection" because super.tearDown(), which is called between createStatement() and executeUpdate(), closes the connection.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4524) Incorrect DROP FUNCTION logic in AccessTest's tearDown() method

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12803900#action_12803900 ] 

Bryan Pendleton commented on DERBY-4524:
----------------------------------------

+1 to removing the tearDown and letting CleanDatabaseTestSetup handle the cleanup. Thanks for cleaning this up!


> Incorrect DROP FUNCTION logic in AccessTest's tearDown() method
> ---------------------------------------------------------------
>
>                 Key: DERBY-4524
>                 URL: https://issues.apache.org/jira/browse/DERBY-4524
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.6.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.6.0.0
>
>         Attachments: removeTearDown.diff
>
>
>     public void tearDown() throws Exception {
>         Statement st = createStatement();
>         super.tearDown();
>         try {
>             st.executeUpdate("DROP FUNCTION PADSTRING");
>         } catch (SQLException e) {
>             // never mind.
>         }
>     }
> The DROP FUNCTION statement always fails with "No current connection" because super.tearDown(), which is called between createStatement() and executeUpdate(), closes the connection.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (DERBY-4524) Incorrect DROP FUNCTION logic in AccessTest's tearDown() method

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen reassigned DERBY-4524:
-----------------------------------------

    Assignee: Knut Anders Hatlen

> Incorrect DROP FUNCTION logic in AccessTest's tearDown() method
> ---------------------------------------------------------------
>
>                 Key: DERBY-4524
>                 URL: https://issues.apache.org/jira/browse/DERBY-4524
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.6.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>
>     public void tearDown() throws Exception {
>         Statement st = createStatement();
>         super.tearDown();
>         try {
>             st.executeUpdate("DROP FUNCTION PADSTRING");
>         } catch (SQLException e) {
>             // never mind.
>         }
>     }
> The DROP FUNCTION statement always fails with "No current connection" because super.tearDown(), which is called between createStatement() and executeUpdate(), closes the connection.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4524) Incorrect DROP FUNCTION logic in AccessTest's tearDown() method

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12803886#action_12803886 ] 

Knut Anders Hatlen commented on DERBY-4524:
-------------------------------------------

The PADSTRING function is created in the decorateSQL() method of a CleanDatabaseTestSetup decorator, so it's probably wrong to attempt to drop the function after each separate test case in the first place. Since CleanDatabaseTestSetup.tearDown() will drop all functions in all user schemas, including the PADSTRING function, it's probably OK to remove this tearDown() method altogether.

> Incorrect DROP FUNCTION logic in AccessTest's tearDown() method
> ---------------------------------------------------------------
>
>                 Key: DERBY-4524
>                 URL: https://issues.apache.org/jira/browse/DERBY-4524
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.6.0.0
>            Reporter: Knut Anders Hatlen
>
>     public void tearDown() throws Exception {
>         Statement st = createStatement();
>         super.tearDown();
>         try {
>             st.executeUpdate("DROP FUNCTION PADSTRING");
>         } catch (SQLException e) {
>             // never mind.
>         }
>     }
> The DROP FUNCTION statement always fails with "No current connection" because super.tearDown(), which is called between createStatement() and executeUpdate(), closes the connection.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.