db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta A. Satoor (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (DERBY-2964) ASSERT FAILED type of inserted column[0] = org.apache.derby.iapi.types.SQLVarchar type of template column[0] = org.apache.derby.iapi.types.CollatorSQLVarchar when inserting row into table that has been modified with unique constraint
Date Wed, 01 Aug 2007 06:16:53 GMT

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

Mamta A. Satoor resolved DERBY-2964.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.4.0.0
                   10.3.1.4

I will mark the issue resolved but won't close it just yet. The problem has been fixed as
part of changes that went in for DERBY-2973

> ASSERT FAILED type of inserted column[0] = org.apache.derby.iapi.types.SQLVarchar type
of template column[0] = org.apache.derby.iapi.types.CollatorSQLVarchar when inserting row
into table that has been modified with unique constraint
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2964
>                 URL: https://issues.apache.org/jira/browse/DERBY-2964
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.0.0
>            Reporter: Kathey Marsden
>            Assignee: Mamta A. Satoor
>             Fix For: 10.3.1.4, 10.4.0.0
>
>
> Below is the test case from lang/modifyColumn.sql
> ij> connect 'jdbc:derby:nordb;create=true;territory=no_NO;collation=TERRITORY_BASED';
> ij(CONNECTION1)> create table t1 (vc varchar(1) not null, nvc varchar(1) not null,
bv varchar(1) for bit data not null);
> alter table t1 add constraint uq unique (vc, nvc, bv);
> insert into t1 values ('p', 'p', x'01');
> insert into t1 values ('pe', 'p', x'01');
> alter table t1 alter vc set data type varchar(2);
> 0 rows inserted/updated/deleted
> ij(CONNECTION1)> 0 rows inserted/updated/deleted
> ij(CONNECTION1)> 1 row inserted/updated/deleted
> ij(CONNECTION1)> ERROR 22001: A truncation error was encountered trying to shrink
VARCHAR 'pe' to length 1.
> java.sql.SQLException: A truncation error was encountered trying to shrink VARCHAR 'pe'
to length 1.
>         at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
>         at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:202)
>         at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:391)
>         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.execute(EmbedStatement.java:528)
>         at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:330)
>         at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:522)
>         at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:364)
>         at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:262)
>         at org.apache.derby.impl.tools.ij.Main.go(Main.java:215)
>         at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:181)
>         at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:56)
>         at org.apache.derby.tools.ij.main(ij.java:71)
> Caused by: ERROR 22001: A truncation error was encountered trying to shrink VARCHAR 'pe'
to length 1.
>         at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:341)
>         at org.apache.derby.iapi.types.SQLChar.hasNonBlankChars(SQLChar.java:1324)
>         at org.apache.derby.iapi.types.SQLVarchar.normalize(SQLVarchar.java:173)
>         at org.apache.derby.iapi.types.SQLVarchar.normalize(SQLVarchar.java:150)
>         at org.apache.derby.iapi.types.DataTypeDescriptor.normalize(DataTypeDescriptor.java:505)
>         at org.apache.derby.impl.sql.execute.NormalizeResultSet.normalizeRow(NormalizeResultSet.java:330)
>         at org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore(NormalizeResultSet.java:189)
>         at org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(DMLWriteResultSet.java:125)
>         at org.apache.derby.impl.sql.execute.InsertResultSet.open(InsertResultSet.java:496)
>         at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:370)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1203)
>         ... 10 more
> ij(CONNECTION1)> 0 rows inserted/updated/deleted
> ij(CONNECTION1)> insert into t1 values ('pe', 'p', x'01');
> ERROR XJ001: Java exception: 'ASSERT FAILED type of inserted column[0] = org.apache.derby.iapi.types.SQLVarchartype
of t
> emplate column[0] = org.apache.derby.iapi.types.CollatorSQLVarchar: org.apache.derby.shared.common.sanity.AssertFailure'
> .
> java.sql.SQLException: Java exception: 'ASSERT FAILED type of inserted column[0] = org.apache.derby.iapi.types.SQLVarcha
> rtype of template column[0] = org.apache.derby.iapi.types.CollatorSQLVarchar: org.apache.derby.shared.common.sanity.Asse
> rtFailure'.
>         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.execute(EmbedStatement.java:528)
>         at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:330)
>         at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:522)
>         at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:364)
>         at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:262)
>         at org.apache.derby.impl.tools.ij.Main.go(Main.java:215)
>         at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:181)
>         at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:56)
>         at org.apache.derby.tools.ij.main(ij.java:71)
> Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED type of
inserted column[0] = org.apache.de
> rby.iapi.types.SQLVarchartype of template column[0] = 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.btree.OpenBTree.isIndexableRowConsistent(OpenBTree.java:529)
>         at org.apache.derby.impl.store.access.btree.BTreeController.doIns(BTreeController.java:385)
>         at org.apache.derby.impl.store.access.btree.BTreeController.insert(BTreeController.java:1035)
>         at org.apache.derby.impl.store.access.btree.index.B2IController.insert(B2IController.java:211)
>         at org.apache.derby.impl.sql.execute.IndexChanger.insertAndCheckDups(IndexChanger.java:455)
>         at org.apache.derby.impl.sql.execute.IndexChanger.doInsert(IndexChanger.java:398)
>         at org.apache.derby.impl.sql.execute.IndexChanger.insert(IndexChanger.java:605)
>         at org.apache.derby.impl.sql.execute.IndexSetChanger.insert(IndexSetChanger.java:268)
>         at org.apache.derby.impl.sql.execute.RowChangerImpl.insertRow(RowChangerImpl.java:453)
>         at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(InsertResultSet.java:1024)
>         at org.apache.derby.impl.sql.execute.InsertResultSet.open(InsertResultSet.java:497)
>         at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:370)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1203)
>         ... 10 more
> ij(CONNECTION1)>

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


Mime
View raw message