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 "Kathey Marsden (JIRA)" <ji...@apache.org> on 2007/07/19 22:52:06 UTC

[jira] Created: (DERBY-2961) TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)

TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: DERBY-2961
                 URL: https://issues.apache.org/jira/browse/DERBY-2961
             Project: Derby
          Issue Type: Bug
          Components: SQL
    Affects Versions: 10.4.0.0
            Reporter: Kathey Marsden


I have not yet been able to create a stand-alone repro but the test TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)

Failed statement is:

            sqlMain = "SELECT ID, XMLSERIALIZE(V AS CLOB), " +
                    "XMLSERIALIZE(V AS CLOB) FROM T_MAIN ORDER BY 1";

2) testTypesInActionStatement(org.apache.derbyTesting.functionTests.tests.lang.TriggerTest)java.sql.SQLException: Java exception: 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob): org.apache.derby.shared.common.sanity.AssertFailure'.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
	at org.apache.derby.impl.jdbc.Util.javaException(Util.java:245)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1572)
	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1293)
	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:596)
	at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(EmbedStatement.java:153)
	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesCompareMainToAction(TriggerTest.java:769)
	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesInsertTest(TriggerTest.java:546)
	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypeTest(TriggerTest.java:445)
	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.testTypesInActionStatement(TriggerTest.java:427)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:95)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
	at junit.extensions.TestSetup.run(TestSetup.java:23)
	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
	at junit.extensions.TestSetup.run(TestSetup.java:23)
	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
	at junit.extensions.TestSetup.run(TestSetup.java:23)
	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
	at junit.extensions.TestSetup.run(TestSetup.java:23)
Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:162)
	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:147)
	at org.apache.derby.impl.store.access.sort.MergeSort.checkColumnTypes(MergeSort.java:467)
	at org.apache.derby.impl.store.access.sort.MergeInserter.insert(MergeInserter.java:98)
	at org.apache.derby.impl.sql.execute.SortResultSet.loadSorter(SortResultSet.java:317)
	at org.apache.derby.impl.sql.execute.SortResultSet.openCore(SortResultSet.java:268)
	at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(BasicNoPutResultSetImpl.java:258)
	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:370)
	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1203)
	... 45 more

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


[jira] Closed: (DERBY-2961) TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)

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

Kathey Marsden closed DERBY-2961.
---------------------------------


> TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2961
>                 URL: https://issues.apache.org/jira/browse/DERBY-2961
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.0.0
>            Reporter: Kathey Marsden
>            Assignee: Mamta A. Satoor
>             Fix For: 10.3.2.0, 10.4.0.0
>
>         Attachments: TypesInActionStatement.java
>
>
> I have not yet been able to create a stand-alone repro but the test TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> Failed statement is:
>             sqlMain = "SELECT ID, XMLSERIALIZE(V AS CLOB), " +
>                     "XMLSERIALIZE(V AS CLOB) FROM T_MAIN ORDER BY 1";
> 2) testTypesInActionStatement(org.apache.derbyTesting.functionTests.tests.lang.TriggerTest)java.sql.SQLException: Java exception: 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob): org.apache.derby.shared.common.sanity.AssertFailure'.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
> 	at org.apache.derby.impl.jdbc.Util.javaException(Util.java:245)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1572)
> 	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1293)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:596)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(EmbedStatement.java:153)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesCompareMainToAction(TriggerTest.java:769)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesInsertTest(TriggerTest.java:546)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypeTest(TriggerTest.java:445)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.testTypesInActionStatement(TriggerTest.java:427)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:95)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> 	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:162)
> 	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:147)
> 	at org.apache.derby.impl.store.access.sort.MergeSort.checkColumnTypes(MergeSort.java:467)
> 	at org.apache.derby.impl.store.access.sort.MergeInserter.insert(MergeInserter.java:98)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.loadSorter(SortResultSet.java:317)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.openCore(SortResultSet.java:268)
> 	at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(BasicNoPutResultSetImpl.java:258)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:370)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1203)
> 	... 45 more

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


[jira] Resolved: (DERBY-2961) TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)

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

Mamta A. Satoor resolved DERBY-2961.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.4.0.0
                   10.3.2.0

> TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2961
>                 URL: https://issues.apache.org/jira/browse/DERBY-2961
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.0.0
>            Reporter: Kathey Marsden
>            Assignee: Mamta A. Satoor
>             Fix For: 10.3.2.0, 10.4.0.0
>
>         Attachments: TypesInActionStatement.java
>
>
> I have not yet been able to create a stand-alone repro but the test TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> Failed statement is:
>             sqlMain = "SELECT ID, XMLSERIALIZE(V AS CLOB), " +
>                     "XMLSERIALIZE(V AS CLOB) FROM T_MAIN ORDER BY 1";
> 2) testTypesInActionStatement(org.apache.derbyTesting.functionTests.tests.lang.TriggerTest)java.sql.SQLException: Java exception: 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob): org.apache.derby.shared.common.sanity.AssertFailure'.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
> 	at org.apache.derby.impl.jdbc.Util.javaException(Util.java:245)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1572)
> 	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1293)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:596)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(EmbedStatement.java:153)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesCompareMainToAction(TriggerTest.java:769)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesInsertTest(TriggerTest.java:546)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypeTest(TriggerTest.java:445)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.testTypesInActionStatement(TriggerTest.java:427)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:95)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> 	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:162)
> 	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:147)
> 	at org.apache.derby.impl.store.access.sort.MergeSort.checkColumnTypes(MergeSort.java:467)
> 	at org.apache.derby.impl.store.access.sort.MergeInserter.insert(MergeInserter.java:98)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.loadSorter(SortResultSet.java:317)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.openCore(SortResultSet.java:268)
> 	at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(BasicNoPutResultSetImpl.java:258)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:370)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1203)
> 	... 45 more

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


[jira] Updated: (DERBY-2961) TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)

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

Kathey Marsden updated DERBY-2961:
----------------------------------

    Comment: was deleted

> TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2961
>                 URL: https://issues.apache.org/jira/browse/DERBY-2961
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.0.0
>            Reporter: Kathey Marsden
>
> I have not yet been able to create a stand-alone repro but the test TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> Failed statement is:
>             sqlMain = "SELECT ID, XMLSERIALIZE(V AS CLOB), " +
>                     "XMLSERIALIZE(V AS CLOB) FROM T_MAIN ORDER BY 1";
> 2) testTypesInActionStatement(org.apache.derbyTesting.functionTests.tests.lang.TriggerTest)java.sql.SQLException: Java exception: 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob): org.apache.derby.shared.common.sanity.AssertFailure'.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
> 	at org.apache.derby.impl.jdbc.Util.javaException(Util.java:245)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1572)
> 	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1293)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:596)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(EmbedStatement.java:153)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesCompareMainToAction(TriggerTest.java:769)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesInsertTest(TriggerTest.java:546)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypeTest(TriggerTest.java:445)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.testTypesInActionStatement(TriggerTest.java:427)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:95)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> 	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:162)
> 	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:147)
> 	at org.apache.derby.impl.store.access.sort.MergeSort.checkColumnTypes(MergeSort.java:467)
> 	at org.apache.derby.impl.store.access.sort.MergeInserter.insert(MergeInserter.java:98)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.loadSorter(SortResultSet.java:317)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.openCore(SortResultSet.java:268)
> 	at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(BasicNoPutResultSetImpl.java:258)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:370)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1203)
> 	... 45 more

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


[jira] Commented: (DERBY-2961) TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)

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

Kathey Marsden commented on DERBY-2961:
---------------------------------------

I am not sure if these two failures are the same issue or something different. If they are not resolved when this issue is fixed we can open up new issues.


testMiscExpressions(org.apache.derbyTesting.functionTests.tests.lang.GroupByExpressionTest)java.sql.SQLException: Java exception: 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLVarchar) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLVarchar): org.apache.derby.shared.common.sanity.AssertFailure'.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
	at org.apache.derby.impl.jdbc.Util.javaException(Util.java:245)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1572)
	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
	at <unknown class>.<unknown method>(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1652)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(EmbedPreparedStatement.java:275)
	at org.apache.derbyTesting.functionTests.tests.lang.GroupByExpressionTest.verifyQueryResults(GroupByExpressionTest.java:430)
	at org.apache.derbyTesting.functionTests.tests.lang.GroupByExpressionTest.testMiscExpressions(GroupByExpressionTest.java:209)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:95)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
	at junit.extensions.TestSetup.run(TestSetup.java:23)
	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
	at junit.extensions.TestSetup.run(TestSetup.java:23)
	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
	at junit.extensions.TestSetup.run(TestSetup.java:23)
	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
	at junit.extensions.TestSetup.run(TestSetup.java:23)
Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLVarchar) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLVarchar)
	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:162)
	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:147)
	at org.apache.derby.impl.store.access.sort.MergeSort.checkColumnTypes(MergeSort.java:467)
	at org.apache.derby.impl.store.access.sort.MergeInserter.insert(MergeInserter.java:98)
	at org.apache.derby.impl.sql.execute.GroupedAggregateResultSet.loadSorter(GroupedAggregateResultSet.java:308)
	at org.apache.derby.impl.sql.execute.GroupedAggregateResultSet.openCore(GroupedAggregateResultSet.java:180)
	at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(ProjectRestrictResultSet.java:168)
	at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(BasicNoPutResultSetImpl.java:258)
	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:370)
	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1203)
	... 45 more
2) testTypesInActionStatement(org.apache.derbyTesting.functionTests.tests.lang.TriggerTest)java.sql.SQLException: Java exception: 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob): org.apache.derby.shared.common.sanity.AssertFailure'.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
	at org.apache.derby.impl.jdbc.Util.javaException(Util.java:245)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1572)
	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1293)
	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:596)
	at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(EmbedStatement.java:153)
	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesCompareMainToAction(TriggerTest.java:769)
	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesInsertTest(TriggerTest.java:546)
	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypeTest(TriggerTest.java:445)
	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.testTypesInActionStatement(TriggerTest.java:427)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:95)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
	at junit.extensions.TestSetup.run(TestSetup.java:23)
	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
	at junit.extensions.TestSetup.run(TestSetup.java:23)
	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
	at junit.extensions.TestSetup.run(TestSetup.java:23)
	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
	at junit.extensions.TestSetup.run(TestSetup.java:23)
Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:162)
	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:147)
	at org.apache.derby.impl.store.access.sort.MergeSort.checkColumnTypes(MergeSort.java:467)
	at org.apache.derby.impl.store.access.sort.MergeInserter.insert(MergeInserter.java:98)
	at org.apache.derby.impl.sql.execute.SortResultSet.loadSorter(SortResultSet.java:317)
	at org.apache.derby.impl.sql.execute.SortResultSet.openCore(SortResultSet.java:268)
	at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(BasicNoPutResultSetImpl.java:258)
	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:370)
	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1203)
	... 45 more


> TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2961
>                 URL: https://issues.apache.org/jira/browse/DERBY-2961
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.0.0
>            Reporter: Kathey Marsden
>
> I have not yet been able to create a stand-alone repro but the test TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> Failed statement is:
>             sqlMain = "SELECT ID, XMLSERIALIZE(V AS CLOB), " +
>                     "XMLSERIALIZE(V AS CLOB) FROM T_MAIN ORDER BY 1";
> 2) testTypesInActionStatement(org.apache.derbyTesting.functionTests.tests.lang.TriggerTest)java.sql.SQLException: Java exception: 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob): org.apache.derby.shared.common.sanity.AssertFailure'.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
> 	at org.apache.derby.impl.jdbc.Util.javaException(Util.java:245)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1572)
> 	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1293)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:596)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(EmbedStatement.java:153)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesCompareMainToAction(TriggerTest.java:769)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesInsertTest(TriggerTest.java:546)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypeTest(TriggerTest.java:445)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.testTypesInActionStatement(TriggerTest.java:427)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:95)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> 	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:162)
> 	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:147)
> 	at org.apache.derby.impl.store.access.sort.MergeSort.checkColumnTypes(MergeSort.java:467)
> 	at org.apache.derby.impl.store.access.sort.MergeInserter.insert(MergeInserter.java:98)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.loadSorter(SortResultSet.java:317)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.openCore(SortResultSet.java:268)
> 	at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(BasicNoPutResultSetImpl.java:258)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:370)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1203)
> 	... 45 more

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


[jira] Commented: (DERBY-2961) TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)

Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521127 ] 

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

With revision 567735, fixed the problem in main. The commit comments are as follows (will merge the change into 10.3 codeline soon)

DERBY-2961
This commit fixes the ASSERT failure thrown by the SELECT statement in following query
CREATE TABLE T_MAIN1 (ID INT  GENERATED ALWAYS AS IDENTITY PRIMARY KEY, V XML);
INSERT INTO T_MAIN1(V) VALUES NULL;
SELECT ID, XMLSERIALIZE(V AS CLOB), XMLSERIALIZE(V AS CLOB) FROM T_MAIN1 ORDER BY 1;
The SELECT statement was resulting in Assert Failure because the StringDataValue generated for V AS CLOB was not taking collation type into consideration ie it was always generating collation insensitive StringDataValue. I have fixed that problem by passing the current compilation schema's collation type to SqlXmlExecutor which then will get used in determining whether for instance we should generate SQLChar vs CollatorSQLChar. This collation information is required only for character string types.

> TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2961
>                 URL: https://issues.apache.org/jira/browse/DERBY-2961
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.0.0
>            Reporter: Kathey Marsden
>            Assignee: Mamta A. Satoor
>         Attachments: TypesInActionStatement.java
>
>
> I have not yet been able to create a stand-alone repro but the test TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> Failed statement is:
>             sqlMain = "SELECT ID, XMLSERIALIZE(V AS CLOB), " +
>                     "XMLSERIALIZE(V AS CLOB) FROM T_MAIN ORDER BY 1";
> 2) testTypesInActionStatement(org.apache.derbyTesting.functionTests.tests.lang.TriggerTest)java.sql.SQLException: Java exception: 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob): org.apache.derby.shared.common.sanity.AssertFailure'.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
> 	at org.apache.derby.impl.jdbc.Util.javaException(Util.java:245)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1572)
> 	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1293)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:596)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(EmbedStatement.java:153)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesCompareMainToAction(TriggerTest.java:769)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesInsertTest(TriggerTest.java:546)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypeTest(TriggerTest.java:445)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.testTypesInActionStatement(TriggerTest.java:427)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:95)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> 	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:162)
> 	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:147)
> 	at org.apache.derby.impl.store.access.sort.MergeSort.checkColumnTypes(MergeSort.java:467)
> 	at org.apache.derby.impl.store.access.sort.MergeInserter.insert(MergeInserter.java:98)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.loadSorter(SortResultSet.java:317)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.openCore(SortResultSet.java:268)
> 	at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(BasicNoPutResultSetImpl.java:258)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:370)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1203)
> 	... 45 more

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


[jira] Commented: (DERBY-2961) TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)

Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521139 ] 

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

Merged revision 567735 from main into 10.3 codeline (revision 567741). The commit comments in main were as follows

DERBY-2961
This commit fixes the ASSERT failure thrown by the SELECT statement in following query
CREATE TABLE T_MAIN1 (ID INT  GENERATED ALWAYS AS IDENTITY PRIMARY KEY, V XML);
INSERT INTO T_MAIN1(V) VALUES NULL;
SELECT ID, XMLSERIALIZE(V AS CLOB), XMLSERIALIZE(V AS CLOB) FROM T_MAIN1 ORDER BY 1;
The SELECT statement was resulting in Assert Failure because the StringDataValue generated for V AS CLOB was not taking collation type into consideration ie it was always generating collation insensitive StringDataValue. I have fixed that problem by passing the current compilation schema's collation type to SqlXmlExecutor which then will get used in determining whether for instance we should generate SQLChar vs CollatorSQLChar. This collation information is required only for character string types.


> TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2961
>                 URL: https://issues.apache.org/jira/browse/DERBY-2961
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.0.0
>            Reporter: Kathey Marsden
>            Assignee: Mamta A. Satoor
>             Fix For: 10.3.2.0, 10.4.0.0
>
>         Attachments: TypesInActionStatement.java
>
>
> I have not yet been able to create a stand-alone repro but the test TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> Failed statement is:
>             sqlMain = "SELECT ID, XMLSERIALIZE(V AS CLOB), " +
>                     "XMLSERIALIZE(V AS CLOB) FROM T_MAIN ORDER BY 1";
> 2) testTypesInActionStatement(org.apache.derbyTesting.functionTests.tests.lang.TriggerTest)java.sql.SQLException: Java exception: 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob): org.apache.derby.shared.common.sanity.AssertFailure'.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
> 	at org.apache.derby.impl.jdbc.Util.javaException(Util.java:245)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1572)
> 	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1293)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:596)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(EmbedStatement.java:153)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesCompareMainToAction(TriggerTest.java:769)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesInsertTest(TriggerTest.java:546)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypeTest(TriggerTest.java:445)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.testTypesInActionStatement(TriggerTest.java:427)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:95)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> 	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:162)
> 	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:147)
> 	at org.apache.derby.impl.store.access.sort.MergeSort.checkColumnTypes(MergeSort.java:467)
> 	at org.apache.derby.impl.store.access.sort.MergeInserter.insert(MergeInserter.java:98)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.loadSorter(SortResultSet.java:317)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.openCore(SortResultSet.java:268)
> 	at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(BasicNoPutResultSetImpl.java:258)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:370)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1203)
> 	... 45 more

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


[jira] Updated: (DERBY-2961) TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)

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

Kathey Marsden updated DERBY-2961:
----------------------------------

    Attachment: TypesInActionStatement.java

Here is a standalone repro for this issue.



> TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2961
>                 URL: https://issues.apache.org/jira/browse/DERBY-2961
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.0.0
>            Reporter: Kathey Marsden
>         Attachments: TypesInActionStatement.java
>
>
> I have not yet been able to create a stand-alone repro but the test TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> Failed statement is:
>             sqlMain = "SELECT ID, XMLSERIALIZE(V AS CLOB), " +
>                     "XMLSERIALIZE(V AS CLOB) FROM T_MAIN ORDER BY 1";
> 2) testTypesInActionStatement(org.apache.derbyTesting.functionTests.tests.lang.TriggerTest)java.sql.SQLException: Java exception: 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob): org.apache.derby.shared.common.sanity.AssertFailure'.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
> 	at org.apache.derby.impl.jdbc.Util.javaException(Util.java:245)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1572)
> 	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1293)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:596)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(EmbedStatement.java:153)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesCompareMainToAction(TriggerTest.java:769)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesInsertTest(TriggerTest.java:546)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypeTest(TriggerTest.java:445)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.testTypesInActionStatement(TriggerTest.java:427)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:95)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> 	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:162)
> 	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:147)
> 	at org.apache.derby.impl.store.access.sort.MergeSort.checkColumnTypes(MergeSort.java:467)
> 	at org.apache.derby.impl.store.access.sort.MergeInserter.insert(MergeInserter.java:98)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.loadSorter(SortResultSet.java:317)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.openCore(SortResultSet.java:268)
> 	at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(BasicNoPutResultSetImpl.java:258)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:370)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1203)
> 	... 45 more

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


[jira] Assigned: (DERBY-2961) TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)

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

Mamta A. Satoor reassigned DERBY-2961:
--------------------------------------

    Assignee: Mamta A. Satoor

> TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2961
>                 URL: https://issues.apache.org/jira/browse/DERBY-2961
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.0.0
>            Reporter: Kathey Marsden
>            Assignee: Mamta A. Satoor
>         Attachments: TypesInActionStatement.java
>
>
> I have not yet been able to create a stand-alone repro but the test TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> Failed statement is:
>             sqlMain = "SELECT ID, XMLSERIALIZE(V AS CLOB), " +
>                     "XMLSERIALIZE(V AS CLOB) FROM T_MAIN ORDER BY 1";
> 2) testTypesInActionStatement(org.apache.derbyTesting.functionTests.tests.lang.TriggerTest)java.sql.SQLException: Java exception: 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob): org.apache.derby.shared.common.sanity.AssertFailure'.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
> 	at org.apache.derby.impl.jdbc.Util.javaException(Util.java:245)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1572)
> 	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1293)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:596)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(EmbedStatement.java:153)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesCompareMainToAction(TriggerTest.java:769)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesInsertTest(TriggerTest.java:546)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypeTest(TriggerTest.java:445)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.testTypesInActionStatement(TriggerTest.java:427)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:95)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> 	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:162)
> 	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:147)
> 	at org.apache.derby.impl.store.access.sort.MergeSort.checkColumnTypes(MergeSort.java:467)
> 	at org.apache.derby.impl.store.access.sort.MergeInserter.insert(MergeInserter.java:98)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.loadSorter(SortResultSet.java:317)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.openCore(SortResultSet.java:268)
> 	at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(BasicNoPutResultSetImpl.java:258)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:370)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1203)
> 	... 45 more

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


[jira] Commented: (DERBY-2961) TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)

Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520278 ] 

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

I spent some time on this jira entry and the reproducible sql is as follows
CREATE TABLE T_MAIN (ID INT  GENERATED ALWAYS AS IDENTITY PRIMARY KEY, V XML);
INSERT INTO T_MAIN(V) VALUES NULL;
SELECT ID, XMLSERIALIZE(V AS CLOB), XMLSERIALIZE(V AS CLOB) FROM T_MAIN ORDER BY 1

The exception is thrown for the last sql statement.

The problem arises from (V AS CLOB). At runtime, this always ends up creating a SQLClob object (org.apache.derby.iapi.types.XML:XMLSerialize:line 685) without regards to the collation type of the database. As per Rule 3 (copied below for reference) under section Collation Determination from wiki page http://wiki.apache.org/db-derby/BuiltInLanguageBasedOrderingDERBY-1478
**********
3)<character string type> (SQL spec section 6.1 <data type> Syntax Rule 3b and 16) - Rule 3b says that collation type of character string type is the character set's collation AND rule 16 says that if <character string type> is not contained in a <column definition>, then an implementation-defined character set is associated with the <character string type>. We define Derby's implementation-defined character set for such <character string type> to be current schema's character set. The collation derivation will be implicit. 
**********

I think there is a typo in the rule above, ie, rather than the current schema's character set, it should say current compilation schema's character set. Based on this rule, the resultant string type from V AS CLOB/CHAR etc should use the collation of the current compilation schema.

I will work on implementing this change. Any feedback on the approach, please let me know.

> TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2961
>                 URL: https://issues.apache.org/jira/browse/DERBY-2961
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.0.0
>            Reporter: Kathey Marsden
>            Assignee: Mamta A. Satoor
>         Attachments: TypesInActionStatement.java
>
>
> I have not yet been able to create a stand-alone repro but the test TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> Failed statement is:
>             sqlMain = "SELECT ID, XMLSERIALIZE(V AS CLOB), " +
>                     "XMLSERIALIZE(V AS CLOB) FROM T_MAIN ORDER BY 1";
> 2) testTypesInActionStatement(org.apache.derbyTesting.functionTests.tests.lang.TriggerTest)java.sql.SQLException: Java exception: 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob): org.apache.derby.shared.common.sanity.AssertFailure'.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
> 	at org.apache.derby.impl.jdbc.Util.javaException(Util.java:245)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1572)
> 	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1293)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:596)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(EmbedStatement.java:153)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesCompareMainToAction(TriggerTest.java:769)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypesInsertTest(TriggerTest.java:546)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.actionTypeTest(TriggerTest.java:445)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.testTypesInActionStatement(TriggerTest.java:427)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:95)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob)
> 	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:162)
> 	at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:147)
> 	at org.apache.derby.impl.store.access.sort.MergeSort.checkColumnTypes(MergeSort.java:467)
> 	at org.apache.derby.impl.store.access.sort.MergeInserter.insert(MergeInserter.java:98)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.loadSorter(SortResultSet.java:317)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.openCore(SortResultSet.java:268)
> 	at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(BasicNoPutResultSetImpl.java:258)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:370)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1203)
> 	... 45 more

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