[ 
https://issues.apache.org/jira/browse/DERBY-4677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877631#action_12877631
 ] 

Mamta A. Satoor commented on DERBY-4677:
----------------------------------------

Forgot to mention that I got one failure when I ran junit All suite. When I ran 
the replication suite by itself, I didn't see the failure again. Not sure if 
the following failure is a known intermittent failure. derbyall ran fine with 
no errors
1) 
testReplication_Local_1_Indexing(org.apache.derbyTesting.functionTests.tests.replicationTests.ReplicationRun_Local_1Indexing)junit.framework.ComparisonFailure:
 Unexpected SQL state. expected:<...0> but was:<...1>
        at 
org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:762)
        at 
org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:811)
        at 
org.apache.derbyTesting.functionTests.tests.replicationTests.ReplicationRun.failOver_direct(ReplicationRun.java:1385)
        at 
org.apache.derbyTesting.functionTests.tests.replicationTests.ReplicationRun.failOver(ReplicationRun.java:1314)
        at 
org.apache.derbyTesting.functionTests.tests.replicationTests.ReplicationRun_Local_1Indexing.testReplication_Local_1_Indexing(ReplicationRun_Local_1Indexing.java:97)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at 
org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
        at 
org.apache.derbyTesting.functionTests.tests.replicationTests.ReplicationRun.runBare(ReplicationRun.java:207)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:16)
Caused by: java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: 
XRE21, SQLERRMC: Error occurred while performing failover for database 
'C:\p4clients\svnmain\client4\trunk\systest\out142\db_master\wombat', Failover 
attempt was aborted.::SQLSTATE: XRE04Connection lost for replicated database 
'null'.
        at 
org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:96)
        at 
org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:358)
        at org.apache.derby.jdbc.ClientDriver.connect(ClientDriver.java:149)
        at java.sql.DriverManager.getConnection(DriverManager.java:317)
        at java.sql.DriverManager.getConnection(DriverManager.java:273)
        at 
org.apache.derbyTesting.functionTests.tests.replicationTests.ReplicationRun.failOver_direct(ReplicationRun.java:1372)
        ... 31 more
Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: 
-1, SQLSTATE: XRE21, SQLERRMC: Error occurred while performing failover for 
database 'C:\p4clients\svnmain\client4\trunk\systest\out142\db_master\wombat', 
Failover attempt was aborted.::SQLSTATE: XRE04Connection lost for replicated 
database 'null'.
        at 
org.apache.derby.client.am.Connection.completeSqlca(Connection.java:2118)
        at 
org.apache.derby.client.net.NetConnectionReply.parseRdbAccessFailed(NetConnectionReply.java:541)
        at 
org.apache.derby.client.net.NetConnectionReply.parseAccessRdbError(NetConnectionReply.java:434)
        at 
org.apache.derby.client.net.NetConnectionReply.parseACCRDBreply(NetConnectionReply.java:297)
        at 
org.apache.derby.client.net.NetConnectionReply.readAccessDatabase(NetConnectionReply.java:121)
        at 
org.apache.derby.client.net.NetConnection.readSecurityCheckAndAccessRdb(NetConnection.java:834)
        at 
org.apache.derby.client.net.NetConnection.flowSecurityCheckAndAccessRdb(NetConnection.java:758)
        at 
org.apache.derby.client.net.NetConnection.flowUSRIDONLconnect(NetConnection.java:591)
        at 
org.apache.derby.client.net.NetConnection.flowConnect(NetConnection.java:398)
        at 
org.apache.derby.client.net.NetConnection.<init>(NetConnection.java:218)
        at 
org.apache.derby.client.net.NetConnection40.<init>(NetConnection40.java:77)
        at 
org.apache.derby.client.net.ClientJDBCObjectFactoryImpl40.newNetConnection(ClientJDBCObjectFactoryImpl40.java:269)
        at org.apache.derby.jdbc.ClientDriver.connect(ClientDriver.java:83)
        ... 34 more


> SYSCS_COMPRESS_TABLE disables unique constraints
> ------------------------------------------------
>
>                 Key: DERBY-4677
>                 URL: https://issues.apache.org/jira/browse/DERBY-4677
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.1.3, 10.4.2.0, 10.4.2.1, 10.5.1.1, 10.5.2.0, 
> 10.5.3.0, 10.6.1.0
>         Environment: Output of sysinfo:
> ------------------ Java Information ------------------
> Java Version:    1.6.0_20
> Java Vendor:     Sun Microsystems Inc.
> Java home:       C:\Program Files (x86)\Java\jre6
> Java classpath:  .;C:\Program Files 
> (x86)\Java\jre6\lib\ext\QTJava.zip;C:\Users\BMASON\Sandbox\libs\db-derby-10.6.1.0-bin\bin\../lib/derby.jar;C:\Users\BMASON\Sandbox\libs\db-derby-10.6.1.0-bin\bin\../lib/derbynet.jar;C:\Users\BMASON\Sandbox\libs\db-derby-10.6.1.0-bin\bin\../lib/derbyclient.jar;C:\Users\BMASON\Sandbox\libs\db-derby-10.6.1.0-bin\bin\../lib/derbytools.jar
> OS name:         Windows 7
> OS architecture: x86
> OS version:      6.1
> Java user name:  bmason
> Java user home:  C:\Users\BMASON
> Java user dir:   C:\Users\BMASON\Sandbox\libs\db-derby-10.6.1.0-bin\bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0_20-b02
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [C:\Users\BMASON\Sandbox\libs\db-derby-10.6.1.0-bin\lib\derby.jar] 10.6.1.0 - 
> (938214)
> [C:\Users\BMASON\Sandbox\libs\db-derby-10.6.1.0-bin\lib\derbytools.jar] 
> 10.6.1.0 - (938214)
> [C:\Users\BMASON\Sandbox\libs\db-derby-10.6.1.0-bin\lib\derbynet.jar] 
> 10.6.1.0 - (938214)
> [C:\Users\BMASON\Sandbox\libs\db-derby-10.6.1.0-bin\lib\derbyclient.jar] 
> 10.6.1.0 - (938214)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/New Zealand [en_NZ]]
> Found support for locale: [cs]
>        version: 10.6.1.0 - (938214)
> Found support for locale: [de_DE]
>        version: 10.6.1.0 - (938214)
> Found support for locale: [es]
>        version: 10.6.1.0 - (938214)
> Found support for locale: [fr]
>        version: 10.6.1.0 - (938214)
> Found support for locale: [hu]
>        version: 10.6.1.0 - (938214)
> Found support for locale: [it]
>        version: 10.6.1.0 - (938214)
> Found support for locale: [ja_JP]
>        version: 10.6.1.0 - (938214)
> Found support for locale: [ko_KR]
>        version: 10.6.1.0 - (938214)
> Found support for locale: [pl]
>        version: 10.6.1.0 - (938214)
> Found support for locale: [pt_BR]
>        version: 10.6.1.0 - (938214)
> Found support for locale: [ru]
>        version: 10.6.1.0 - (938214)
> Found support for locale: [zh_CN]
>        version: 10.6.1.0 - (938214)
> Found support for locale: [zh_TW]
>        version: 10.6.1.0 - (938214)
> ------------------------------------------------------
>            Reporter: Brett Mason
>            Assignee: Mamta A. Satoor
>         Attachments: DERBY4677_diff_patch1.txt, DERBY4677_stat_patch1.txt
>
>
> It appears that running SYSCS_UTIL.SYSCS_COMPRESS_TABLE on a table with a 
> null-able unique constraint will disable the unique constraint. The script
> below should reproduce the problem. The expected behaviour is for the second 
> insert to fail due to the unique constraint but instead it is allowed. The 
> second insert will fail as expected if either the call to 
> SYSCS_COMPRESS_TABLE is skipped or if the column is declared NOT NULL.
> I have reproduced the problem using embedded Derby 10.5.1.1, 10.5.3.0 and 
> 10.6.1.0 using ij.
> CREATE TABLE TABLE1(NAME1 INT UNIQUE);
> CALL SYSCS_UTIL.SYSCS_COMPRESS_TABLE('APP', 'TABLE1', 1);
> INSERT INTO TABLE1(NAME1) VALUES(1);
> INSERT INTO TABLE1(NAME1) VALUES(1);
> SELECT * FROM TABLE1;
> DROP TABLE TABLE1;

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

Reply via email to