db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4146) Cannot insert row when a generated column references an identity column
Date Sun, 05 Apr 2009 20:49:12 GMT

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

Knut Anders Hatlen commented on DERBY-4146:
-------------------------------------------

Full stack trace:

ERROR 23502: Column 'C2'  cannot accept a NULL value.
	at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:286)
	at org.apache.derby.impl.sql.execute.NormalizeResultSet.normalizeColumn(NormalizeResultSet.java:329)
	at org.apache.derby.impl.sql.execute.NormalizeResultSet.normalizeRow(NormalizeResultSet.java:369)
	at org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore(NormalizeResultSet.java:180)
	at org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(DMLWriteResultSet.java:127)
	at org.apache.derby.impl.sql.execute.InsertResultSet.open(InsertResultSet.java:494)
	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:416)
	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:297)
	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1235)
	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:625)
	at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:555)
	at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:329)
	at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:505)
	at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:347)
	at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:245)
	at org.apache.derby.impl.tools.ij.Main.go(Main.java:210)
	at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:177)
	at org.apache.derby.impl.tools.ij.Main.main(Main.java:73)
	at org.apache.derby.tools.ij.main(ij.java:59)

> Cannot insert row when a generated column references an identity column
> -----------------------------------------------------------------------
>
>                 Key: DERBY-4146
>                 URL: https://issues.apache.org/jira/browse/DERBY-4146
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.5.1.0
>            Reporter: Knut Anders Hatlen
>
> ij> create table t (c1 int generated always as identity, c2 generated always as (c1));
> 0 rows inserted/updated/deleted
> ij> insert into t values (default, default);
> ERROR 23502: Column 'C2'  cannot accept a NULL value.
> Preferably, this should work. Alternatively, if it is not supposed to work, it should
fail when the table is created and the error message should state that a generated column
is not allowed to reference an identity column.

-- 
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