db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anurag Shekhar (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3523) sql states (X0Y63, X0Y63, X0Y63.S) related to nulls in unique constraints are associated with wrong message texts
Date Thu, 13 Mar 2008 11:41:46 GMT

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

Anurag Shekhar updated DERBY-3523:
----------------------------------

    Attachment: derby-3523v1.diff

This patch () adds new messages for X0Y63, X0Y63 and X0Y63.S

I have added new message ids X0Y63.1, X0Y63.1, X0Y63.S.1 and assigned 
new messages to them. I have also introduced new constraints in SQLState to point to these
message ids.

A new method in StandardException (newException (string, string, boolean, Object), 
based on 3rd parameter,  decides weather to use existing message id or the newer 
one.

Modified files

java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj

Modified existing checkVersion method to return boolean (same as DataDictionary.checkVersion).

Updated two instances where X0Y63 was thrown to use new method from StandardExcetion to use
message based on mode its running under.

java/engine/org/apache/derby/impl/sql/compile/TableElementList.java
java/engine/org/apache/derby/impl/sql/compile/ModifyColumnNode.java

Updated to choose between older and newer message using StandardExcetion.

java/engine/org/apache/derby/impl/sql/execute/AlterTableConstantAction.java

Added additional identify SQLState.LANG_NULL_DATA_IN_PRIMARY_KEY as case 
where setting not null is possible because of constraint.


java/engine/org/apache/derby/iapi/error/StandardException.java
Added a new method which accepts two message id and decides which one to use based on third
parameter (boolean).

java/engine/org/apache/derby/loc/messages.xml

added new messages and message id.

java/shared/org/apache/derby/shared/common/reference/SQLState.java
added constant for new message ids.

java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out
java/testing/org/apache/derbyTesting/functionTests/master/altertable.out
java/testing/org/apache/derbyTesting/functionTests/master/nulls.out

updated tests results to expect new message.

> 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
>         Attachments: derby-3523v1.diff
>
>
> 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.


Mime
View raw message