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 "Rajesh Kartha (JIRA)" <de...@db.apache.org> on 2006/09/08 04:13:22 UTC

[jira] Created: (DERBY-1831) After a database shutdown, Network Server should invalidate all active connections and an appropriate error message should be thrown at the client while using those connections later.

After a database shutdown, Network Server should invalidate all active connections and an appropriate error message should be thrown at the client while using those connections later.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: DERBY-1831
                 URL: http://issues.apache.org/jira/browse/DERBY-1831
             Project: Derby
          Issue Type: Bug
          Components: Network Server
    Affects Versions: 10.1.3.1, 10.1.3.0, 10.1.2.1, 10.1.1.0, 10.0.2.1, 10.0.2.0
         Environment: Any
            Reporter: Rajesh Kartha


Any connections currently open during the shutdown should be invalidated. This would indicate the correct info - that there are no open connections during the 'show connections' command and the subsequent 'set connection' and sql should fail with appropriate errors. It works as expected in embedded mode, but it is more important to behave accordingly in the case of Network Server where multiple users are connected, rather than throw an obscure error of "ERROR 58009: A network protocol error was encountered and the connection ............. implementation-specific condition for which there was no architected message " 

ij version 10.2
ij> connect 'jdbc:derby://localhost:1527/testdb;create=true' as connA;
ij> drop table t;
0 rows inserted/updated/deleted
ij> create table t (id int);
0 rows inserted/updated/deleted
ij> insert into t values (1);
1 row inserted/updated/deleted
ij> insert into t values (2);
1 row inserted/updated/deleted
ij> select * from t;
ID
-----------
1
2

2 rows selected
-- 
--Connection A is still open
-- 
ij> connect 'jdbc:derby://localhost:1527/testdb' as connB;
ij(CONNB)> insert into t values (3);
1 row inserted/updated/deleted
ij(CONNB)> select * from t;
ID
-----------
1
2
3

3 rows selected
-- 
-- Should error out saying there are open connections to the database
-- 
ij(CONNB)> connect 'jdbc:derby://localhost:1527/testdb;shutdown=true';
ERROR 08006: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08006, SQLERRMC: Database 'testdb' shutdown.
ij(CONNB)> disconnect;
-- 
--Connection A is still open
-- 
ij> show connections;
CONNA - jdbc:derby://localhost:1527/testdb;create=true
No current connection
-- 
--Set connection to connection A
-- 
ij> set connection connA;
-- 
--Try a sql
-- 
ij> select * from t;
ERROR 58009: A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message
ij>

In embedded the ''shutdown=true'  closes all active connections to the database.

ij(CONNB)> connect 'jdbc:derby:testdb;shutdown=true';
ERROR 08006: Database 'testdb' shutdown.
ij(CONNB)> disconnect;
--
-- Shows no current connections after a shutdown
-- 
ij> show connections;
No current connection
ij> set connection connA;
IJ ERROR: No connection exists with the name CONNA
ij> select * from t;
IJ ERROR: Unable to establish connection
ij>

Furthermore a related issue  DERBY-1737 -  need to check for existing connections before shutdown is marked as an improvement.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1831) After a database shutdown, Network Server should invalidate all active connections and an appropriate error message should be thrown at the client while using those connections later.

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

Kathey Marsden updated DERBY-1831:
----------------------------------

    Derby Categories: [High Value Fix]

> After a database shutdown, Network Server should invalidate all active connections and an appropriate error message should be thrown at the client while using those connections later.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1831
>                 URL: https://issues.apache.org/jira/browse/DERBY-1831
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1
>         Environment: Any
>            Reporter: Rajesh Kartha
>
> Any connections currently open during the shutdown should be invalidated. This would indicate the correct info - that there are no open connections during the 'show connections' command and the subsequent 'set connection' and sql should fail with appropriate errors. It works as expected in embedded mode, but it is more important to behave accordingly in the case of Network Server where multiple users are connected, rather than throw an obscure error of "ERROR 58009: A network protocol error was encountered and the connection ............. implementation-specific condition for which there was no architected message " 
> ij version 10.2
> ij> connect 'jdbc:derby://localhost:1527/testdb;create=true' as connA;
> ij> drop table t;
> 0 rows inserted/updated/deleted
> ij> create table t (id int);
> 0 rows inserted/updated/deleted
> ij> insert into t values (1);
> 1 row inserted/updated/deleted
> ij> insert into t values (2);
> 1 row inserted/updated/deleted
> ij> select * from t;
> ID
> -----------
> 1
> 2
> 2 rows selected
> -- 
> --Connection A is still open
> -- 
> ij> connect 'jdbc:derby://localhost:1527/testdb' as connB;
> ij(CONNB)> insert into t values (3);
> 1 row inserted/updated/deleted
> ij(CONNB)> select * from t;
> ID
> -----------
> 1
> 2
> 3
> 3 rows selected
> -- 
> -- Should error out saying there are open connections to the database
> -- 
> ij(CONNB)> connect 'jdbc:derby://localhost:1527/testdb;shutdown=true';
> ERROR 08006: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08006, SQLERRMC: Database 'testdb' shutdown.
> ij(CONNB)> disconnect;
> -- 
> --Connection A is still open
> -- 
> ij> show connections;
> CONNA - jdbc:derby://localhost:1527/testdb;create=true
> No current connection
> -- 
> --Set connection to connection A
> -- 
> ij> set connection connA;
> -- 
> --Try a sql
> -- 
> ij> select * from t;
> ERROR 58009: A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message
> ij>
> In embedded the ''shutdown=true'  closes all active connections to the database.
> ij(CONNB)> connect 'jdbc:derby:testdb;shutdown=true';
> ERROR 08006: Database 'testdb' shutdown.
> ij(CONNB)> disconnect;
> --
> -- Shows no current connections after a shutdown
> -- 
> ij> show connections;
> No current connection
> ij> set connection connA;
> IJ ERROR: No connection exists with the name CONNA
> ij> select * from t;
> IJ ERROR: Unable to establish connection
> ij>
> Furthermore a related issue  DERBY-1737 -  need to check for existing connections before shutdown is marked as an improvement.

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


[jira] Updated: (DERBY-1831) After a database shutdown, Network Server should invalidate all active connections and an appropriate error message should be thrown at the client while using those connections later.

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

Knut Anders Hatlen updated DERBY-1831:
--------------------------------------

      Issue & fix info: [High Value Fix, Repro attached]  (was: [High Value Fix])
               Urgency: Normal
    Bug behavior facts: [Embedded/Client difference]

Triaged for 10.5.2.

> After a database shutdown, Network Server should invalidate all active connections and an appropriate error message should be thrown at the client while using those connections later.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1831
>                 URL: https://issues.apache.org/jira/browse/DERBY-1831
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1
>         Environment: Any
>            Reporter: Rajesh Kartha
>
> Any connections currently open during the shutdown should be invalidated. This would indicate the correct info - that there are no open connections during the 'show connections' command and the subsequent 'set connection' and sql should fail with appropriate errors. It works as expected in embedded mode, but it is more important to behave accordingly in the case of Network Server where multiple users are connected, rather than throw an obscure error of "ERROR 58009: A network protocol error was encountered and the connection ............. implementation-specific condition for which there was no architected message " 
> ij version 10.2
> ij> connect 'jdbc:derby://localhost:1527/testdb;create=true' as connA;
> ij> drop table t;
> 0 rows inserted/updated/deleted
> ij> create table t (id int);
> 0 rows inserted/updated/deleted
> ij> insert into t values (1);
> 1 row inserted/updated/deleted
> ij> insert into t values (2);
> 1 row inserted/updated/deleted
> ij> select * from t;
> ID
> -----------
> 1
> 2
> 2 rows selected
> -- 
> --Connection A is still open
> -- 
> ij> connect 'jdbc:derby://localhost:1527/testdb' as connB;
> ij(CONNB)> insert into t values (3);
> 1 row inserted/updated/deleted
> ij(CONNB)> select * from t;
> ID
> -----------
> 1
> 2
> 3
> 3 rows selected
> -- 
> -- Should error out saying there are open connections to the database
> -- 
> ij(CONNB)> connect 'jdbc:derby://localhost:1527/testdb;shutdown=true';
> ERROR 08006: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08006, SQLERRMC: Database 'testdb' shutdown.
> ij(CONNB)> disconnect;
> -- 
> --Connection A is still open
> -- 
> ij> show connections;
> CONNA - jdbc:derby://localhost:1527/testdb;create=true
> No current connection
> -- 
> --Set connection to connection A
> -- 
> ij> set connection connA;
> -- 
> --Try a sql
> -- 
> ij> select * from t;
> ERROR 58009: A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and implementation-specific condition for which there was no architected message
> ij>
> In embedded the ''shutdown=true'  closes all active connections to the database.
> ij(CONNB)> connect 'jdbc:derby:testdb;shutdown=true';
> ERROR 08006: Database 'testdb' shutdown.
> ij(CONNB)> disconnect;
> --
> -- Shows no current connections after a shutdown
> -- 
> ij> show connections;
> No current connection
> ij> set connection connA;
> IJ ERROR: No connection exists with the name CONNA
> ij> select * from t;
> IJ ERROR: Unable to establish connection
> ij>
> Furthermore a related issue  DERBY-1737 -  need to check for existing connections before shutdown is marked as an improvement.

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