db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrei Koiro (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-6890) 'ASSERT FAILED type of inserted column[0] = org.apache.derby.iapi.types.CollatorSQLVarchartype of template column[0] = org.apache.derby.iapi.types.SQLVarchar: org.apache.derby.shared.common.sanity.AssertFailure'
Date Fri, 27 May 2016 07:20:12 GMT

     [ https://issues.apache.org/jira/browse/DERBY-6890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andrei Koiro updated DERBY-6890:
--------------------------------
    Description: 
we are trying to migrate to derby 10.12.1.1 and want to use 'GENERATED BY DEFAULT AS IDENTITY'.
Now we use  

we altered our pk columns, and added 'GENERATED BY DEFAULT AS IDENTITY'. After that when I
try to insert in my table any record, I get this exception: 

Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED type of inserted
column[0] = org.apache.derby.iapi.types.CollatorSQLVarchartype of template column[0] = org.apache.derby.iapi.types.SQLVarchar
	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.btree.OpenBTree.isIndexableRowConsistent(OpenBTree.java:519)
	at org.apache.derby.impl.store.access.btree.BTreeController.doIns(BTreeController.java:679)
	at org.apache.derby.impl.store.access.btree.BTreeController.insert(BTreeController.java:1372)
	at org.apache.derby.impl.store.access.btree.index.B2IController.insert(B2IController.java:210)
	at org.apache.derby.impl.sql.execute.IndexChanger.insertAndCheckDups(IndexChanger.java:565)
	at org.apache.derby.impl.sql.execute.IndexChanger.doInsert(IndexChanger.java:393)
	at org.apache.derby.impl.sql.execute.IndexChanger.insert(IndexChanger.java:713)
	at org.apache.derby.impl.sql.execute.IndexSetChanger.insert(IndexSetChanger.java:268)
	at org.apache.derby.impl.sql.execute.RowChangerImpl.insertRow(RowChangerImpl.java:458)
	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(InsertResultSet.java:881)
	at org.apache.derby.impl.sql.execute.InsertResultSet.open(InsertResultSet.java:452)
	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:473)
	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:352)
	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1340)
	... 30 more

I attached Test.groovy class which shows this issue. 

I found this workaround: 
we need drop indexes and create them again.







  was:
we are trying to merge to derby 10.12.1.1 and want to use 'GENERATED BY DEFAULT AS IDENTITY'.
Now we use  

we altered our pk columns, and added 'GENERATED BY DEFAULT AS IDENTITY'. After that when I
try to insert in my table any record, I get this exception: 

Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED type of inserted
column[0] = org.apache.derby.iapi.types.CollatorSQLVarchartype of template column[0] = org.apache.derby.iapi.types.SQLVarchar
	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.btree.OpenBTree.isIndexableRowConsistent(OpenBTree.java:519)
	at org.apache.derby.impl.store.access.btree.BTreeController.doIns(BTreeController.java:679)
	at org.apache.derby.impl.store.access.btree.BTreeController.insert(BTreeController.java:1372)
	at org.apache.derby.impl.store.access.btree.index.B2IController.insert(B2IController.java:210)
	at org.apache.derby.impl.sql.execute.IndexChanger.insertAndCheckDups(IndexChanger.java:565)
	at org.apache.derby.impl.sql.execute.IndexChanger.doInsert(IndexChanger.java:393)
	at org.apache.derby.impl.sql.execute.IndexChanger.insert(IndexChanger.java:713)
	at org.apache.derby.impl.sql.execute.IndexSetChanger.insert(IndexSetChanger.java:268)
	at org.apache.derby.impl.sql.execute.RowChangerImpl.insertRow(RowChangerImpl.java:458)
	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(InsertResultSet.java:881)
	at org.apache.derby.impl.sql.execute.InsertResultSet.open(InsertResultSet.java:452)
	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:473)
	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:352)
	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1340)
	... 30 more

I attached Test.groovy class which shows this issue. 

I found this workaround: 
we need drop indexes and create them again.








>  'ASSERT FAILED type of inserted column[0] = org.apache.derby.iapi.types.CollatorSQLVarchartype
of template column[0] = org.apache.derby.iapi.types.SQLVarchar: org.apache.derby.shared.common.sanity.AssertFailure'
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-6890
>                 URL: https://issues.apache.org/jira/browse/DERBY-6890
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.12.1.1
>         Environment: Mac OS X 10.11.5
> JDK: Oracle 1.8.0_92
>            Reporter: Andrei Koiro
>         Attachments: Test.groovy
>
>
> we are trying to migrate to derby 10.12.1.1 and want to use 'GENERATED BY DEFAULT AS
IDENTITY'. Now we use  
> we altered our pk columns, and added 'GENERATED BY DEFAULT AS IDENTITY'. After that when
I try to insert in my table any record, I get this exception: 
> Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED type of
inserted column[0] = org.apache.derby.iapi.types.CollatorSQLVarchartype of template column[0]
= org.apache.derby.iapi.types.SQLVarchar
> 	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.btree.OpenBTree.isIndexableRowConsistent(OpenBTree.java:519)
> 	at org.apache.derby.impl.store.access.btree.BTreeController.doIns(BTreeController.java:679)
> 	at org.apache.derby.impl.store.access.btree.BTreeController.insert(BTreeController.java:1372)
> 	at org.apache.derby.impl.store.access.btree.index.B2IController.insert(B2IController.java:210)
> 	at org.apache.derby.impl.sql.execute.IndexChanger.insertAndCheckDups(IndexChanger.java:565)
> 	at org.apache.derby.impl.sql.execute.IndexChanger.doInsert(IndexChanger.java:393)
> 	at org.apache.derby.impl.sql.execute.IndexChanger.insert(IndexChanger.java:713)
> 	at org.apache.derby.impl.sql.execute.IndexSetChanger.insert(IndexSetChanger.java:268)
> 	at org.apache.derby.impl.sql.execute.RowChangerImpl.insertRow(RowChangerImpl.java:458)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(InsertResultSet.java:881)
> 	at org.apache.derby.impl.sql.execute.InsertResultSet.open(InsertResultSet.java:452)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:473)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:352)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1340)
> 	... 30 more
> I attached Test.groovy class which shows this issue. 
> I found this workaround: 
> we need drop indexes and create them again.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message