XplainStatisticsTest fails with a "no current connection" error
---------------------------------------------------------------

                 Key: DERBY-5335
                 URL: https://issues.apache.org/jira/browse/DERBY-5335
             Project: Derby
          Issue Type: Bug
          Components: SQL, Test
    Affects Versions: 10.9.0.0
         Environment: Java 6 on mac osx
            Reporter: Rick Hillegas


If I run the XplainStatisticsTest using the following command line

java -Xmx512m  junit.textui.TestRunner 
org.apache.derbyTesting.functionTests.tests.lang.XplainStatisticsTest

...it produces the following error:

There was 1 error:
1) XplainStatisticsTestjava.sql.SQLNonTransientConnectionException: No current 
connection.
        at 
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:77)
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:142)
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:158)
        at org.apache.derby.impl.jdbc.Util.noCurrentConnection(Util.java:262)
        at 
org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.notInSoftUpgradeMode(EmbedDatabaseMetaData.java:2312)
        at 
org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getPreparedQuery(EmbedDatabaseMetaData.java:3594)
        at 
org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getPreparedQuery(EmbedDatabaseMetaData.java:3622)
        at 
org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getSchemas(EmbedDatabaseMetaData.java:3436)
        at 
org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getSchemas(EmbedDatabaseMetaData.java:1790)
        at 
org.apache.derbyTesting.junit.CleanDatabaseTestSetup.removeObjects(CleanDatabaseTestSetup.java:211)
        at 
org.apache.derbyTesting.junit.CleanDatabaseTestSetup.cleanDatabase(CleanDatabaseTestSetup.java:164)
        at 
org.apache.derbyTesting.junit.CleanDatabaseTestSetup.setUp(CleanDatabaseTestSetup.java:109)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
        at junit.extensions.TestSetup.run(TestSetup.java:25)
        at 
org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
Caused by: java.sql.SQLException: No current connection.
        at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
        at 
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:122)
        at 
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:71)
        ... 18 more

FAILURES!!!
Tests run: 0,  Failures: 0,  Errors: 1

I ran the test standalone because I wanted to figure out why the following 
example fails for me. I thought that this example would work based on the 
documention in the Reference Guide topic for SYSCS_UTIL.SYSCS_SET_XPLAIN_SCHEMA:

ij> connect 'jdbc:derby:memory:db;create=true';
ij> create table admin_table( a int );
0 rows inserted/updated/deleted
ij> create index admin_index on admin_table( a );
0 rows inserted/updated/deleted
ij> call syscs_util.syscs_set_runtimestatistics(1);
0 rows inserted/updated/deleted
ij> call syscs_util.syscs_set_xplain_schema('ADMIN_STATS');
ERROR 38000: The exception 'java.sql.SQLException: Java exception: 'ASSERT 
FAILED 
lcc=org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext@7cd1a1ab 
getContextOrNull=null: org.apache.derby.shared.common.sanity.AssertFailure'.' 
was thrown while evaluating an expression.
ERROR XJ001: Java exception: 'ASSERT FAILED 
lcc=org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext@7cd1a1ab 
getContextOrNull=null: org.apache.derby.shared.common.sanity.AssertFailure'.
ij> call syscs_util.syscs_set_xplain_mode(1);
ERROR 08003: No current connection.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to