Derby
  1. Derby
  2. DERBY-256

ASSERTION when attempting to execute a statement after shutdown of database with network Server

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 10.1.2.1
    • Fix Version/s: None
    • Component/s: Network Server
    • Urgency:
      Normal

      Description

      java -Dij.protocol=jdbc:derby:net://localhost:1527/ -Dij.user=I -Dij.password=mine org.apache.derby.tools.ij

      – create and connect to the databases
      ij> connect 'wombat;create=true';
      ij> connect 'myDB;create=true';

      – shutdown database wombat
      – ERROR 08006 expected
      ij(CONNECTION1)> connect 'wombat;shutdown=true';
      Connection number: 3.
      ERROR 08006: wombat?(server log XXXX)?atabase 'wombat'
      shutdown.?08006.D
      com.ibm.db2.jcc.am.SqlException: wombat?(server log XXX) Database 'wombat'
      shutdown.?08006.D

      ij(CONNECTION1)> show connections;
      CONNECTION0 -
      jdbc:db2j:net://localhost:1527/wombat;create=true
      CONNECTION1* -
      jdbc:db2j:net://localhost:1527/myDB;create=true

      • = current connection
        ij(CONNECTION1)> select * from sys.systables;
        • system tables are returned
          15 rows selected

      – shutdown database myDB
      – ERROR 08006 expected
      ij(CONNECTION1)> connect 'mydb;shutdown=true';
      Connection number: 4.
      ERROR 08006: mydb?(server
      log:XXXX)Database 'mydb'
      shutdown.?08006.D
      com.ibm.db2.jcc.am.SqlException: mydb?(server
      log: XXX)Database 'mydb'
      shutdown.?08006.D

      ij(CONNECTION1)> show connections;
      CONNECTION0 -
      jdbc:db2j:net://localhost:1527/wombat;create=true
      CONNECTION1* -
      jdbc:db2j:net://localhost:1527/myDB;create=true

      • = current connections
        ij(CONNECTION1)> select * from sys.systables;
        com.ibm.db2j.protocol.BasicServices.Errors.AssertFailure:
        ASSERT FAILED connection is closed
        at
        com.ibm.db2j.protocol.BasicServices.SanityService.SanityManager.
        ASSERT(SanityManager.java:124)
        at
        com.ibm.db2j.impl.Connectivity.JDBC.Local.LocalConnection.prepar
        eCall(LocalConnection.java:887)
        at
        com.ibm.db2j.impl.Connectivity.JDBC.Local.LocalConnection.prepar
        eCall(LocalConnection.java:842)
        at
        com.ibm.db2j.drda.DRDAConnThread.parseSQLDTA_work(DRDAConnThread
        .java:3771)
        at
        com.ibm.db2j.drda.DRDAConnThread.parseSQLDTA(DRDAConnThread.java
        :3694)
        at
        com.ibm.db2j.drda.DRDAConnThread.parseEXCSQLSTTobjects(DRDAConnT
        hread.java:3576)
        at
        com.ibm.db2j.drda.DRDAConnThread.parseEXCSQLSTT(DRDAConnThread.j
        ava:3422)
        at
        com.ibm.db2j.drda.DRDAConnThread.processCommands(DRDAConnThread.
        java:848)
        at
        com.ibm.db2j.drda.DRDAConnThread.run(DRDAConnThread.java:235)
        agentThread[DRDAConnThread_4,5,main]
        ERROR 08003: DB2 SQL error: SQLCODE: -1, SQLSTATE: 08003,
        SQLERRMC: (server log:C:\mark52\test\users\test\db2j.log)?No
        current connection.?08003
        com.ibm.db2.jcc.am.SqlException: (server
        log:C:\mark52\test\users\test\db2j.log)?No current
        connection.?08003
        at
        com.ibm.db2.jcc.am.Statement.completeSqlca(Statement.java:1459)

      at
      com.ibm.db2.jcc.t4.T4StatementReply.parsePrepareError(T4Statemen
      tReply.java:594)
      at
      com.ibm.db2.jcc.t4.T4StatementReply.parsePRPSQLSTTreply(T4Statem
      entReply.java:141)
      at
      com.ibm.db2.jcc.t4.T4StatementReply.readPrepareDescribeOutput(T4
      StatementReply.java:42)
      at
      com.ibm.db2.jcc.t4.StatementReply.readPrepareDescribeOutput(Stat
      ementReply.java:31)
      at
      com.ibm.db2.jcc.t4.T4Statement.readPrepareDescribeOutput_(T4Stat
      ement.java:142)
      at
      com.ibm.db2.jcc.am.Statement.readPrepareDescribeOutput(Statement
      .java:1062)
      at
      com.ibm.db2.jcc.am.Statement.flowExecute(Statement.java:1702)
      at
      com.ibm.db2.jcc.am.Statement.executeX(Statement.java:666)
      at
      com.ibm.db2.jcc.am.Statement.execute(Statement.java:650)
      at
      com.ibm.db2j.tools.ijImpl.ij.executeImmediate(ij.java:261)
      at
      com.ibm.db2j.tools.ijImpl.utilMain.doCatch(utilMain.java:427)
      at
      com.ibm.db2j.tools.ijImpl.utilMain.go(utilMain.java:306)
      at com.ibm.db2j.tools.ijImpl.Main.go(Main.java:202)
      at
      com.ibm.db2j.tools.ijImpl.Main.mainCore(Main.java:168)
      at com.ibm.db2j.tools.ijImpl40.Main.main(Main.java:49)
      at com.ibm.db2j.tools.ij.main(ij.java:51)
      ij(CONNECTION1)>
      com.ibm.db2j.protocol.BasicServices.Errors.AssertFailure:
      ASSERT FAILED connection is closed
      at
      com.ibm.db2j.protocol.BasicServices.SanityService.SanityManager.
      ASSERT(SanityManager.java:124)
      at
      com.ibm.db2j.impl.Connectivity.JDBC.Local.LocalConnection.prepar
      eCall(LocalConnection.java:887)
      at
      com.ibm.db2j.impl.Connectivity.JDBC.Local.LocalConnection.prepar
      eCall(LocalConnection.java:842)
      at
      com.ibm.db2j.drda.DRDAConnThread.parseSQLDTA_work(DRDAConnThread
      .java:3771)
      at
      com.ibm.db2j.drda.DRDAConnThread.parseSQLDTA(DRDAConnThread.java
      :3694)
      at
      com.ibm.db2j.drda.DRDAConnThread.parseEXCSQLSTTobjects(DRDAConnT
      hread.java:3576)
      at
      com.ibm.db2j.drda.DRDAConnThread.parseEXCSQLSTT(DRDAConnThread.j
      ava:3422)
      at
      com.ibm.db2j.drda.DRDAConnThread.processCommands(DRDAConnThread.
      java:848)
      at
      com.ibm.db2j.drda.DRDAConnThread.run(DRDAConnThread.java:235)

      1. repro.sql
        0.4 kB
        Kathey Marsden

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Kathey Marsden
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development