[
https://issues.apache.org/jira/browse/DERBY-3523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12577883#action_12577883
]
Anurag Shekhar commented on DERBY-3523:
---------------------------------------
I am planning to introduce similar to the following
String errorState = null;
if (getLanguageConnectionContext().getDataDictionary()
.checkVersion(DataDictionary.DD_VERSION_DERBY_10_4,
null))
{
errorState =
SQLState.LANG_MODIFY_COLUMN_EXISTING_PRIMARY_KEY;
}
else
{
//soft upgrade mode
errorState =
SQLState.LANG_MODIFY_COLUMN_EXISTING_CONSTRAINT;
}
throw StandardException.newException(errorState, name);
List of effected files
java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
java/engine/org/apache/derby/impl/sql/compile/TableElementList.java
java/engine/org/apache/derby/impl/sql/compile/ModifyColumnNode.java
java/engine/org/apache/derby/impl/sql/execute/AlterTableConstantAction.java
java/shared/org/apache/derby/shared/common/reference/SQLState.java
java/engine/org/apache/derby/loc/messages.xml
In addition to these, out files of few harness tests will also need
modifications.
> sql states (X0Y63, X0Y63, X0Y63.S) related to nulls in unique constraints are
> associated with wrong message texts
> ------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3523
> URL: https://issues.apache.org/jira/browse/DERBY-3523
> Project: Derby
> Issue Type: Bug
> Affects Versions: 10.4.0.0, 10.5.0.0
> Reporter: Anurag Shekhar
> Assignee: Anurag Shekhar
>
> There are three messages which after Derby-3330 checkin now giving wrong
> information. These are
> 42831:'{0}' cannot be a column of a primary key or unique key because it can
> contain null values.
> 42Z20:Column '{0}' cannot be made nullable. It is part of a primary key or
> unique constraint, which cannot have any null able columns.
> X0Y63.S:The command on table '{0}' failed because null data was found in the
> primary key or unique constraint/index column(s). All columns in a primary or
> unique index key must not be null.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.