db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satheesh Bandaram <sathe...@Sourcery.Org>
Subject Re: [jira] Resolved: (DERBY-158) PRIMARY KEY does not imply NOT NULL
Date Wed, 09 Mar 2005 04:29:37 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
This modifies the behaviour of Derby and hence needs documentation. How
are the documentation changes tracked? Are committers expected to file
another Jira documentation item? Just wondering...<br>
<br>
Documentation like these need to be changed:
<a class="moz-txt-link-freetext" href="http://incubator.apache.org/derby/manuals/reference/sqlj32.html#HDRSII-SQLJ-13590">http://incubator.apache.org/derby/manuals/reference/sqlj32.html#HDRSII-SQLJ-13590</a><br>
<br>
Satheesh<br>
<br>
Jeremy Boynes (JIRA) wrote:<br>
<blockquote
 cite="mid2141005553.1110317218714.JavaMail.jira@ajax.apache.org"
 type="cite">
  <pre wrap="">     [ <a class="moz-txt-link-freetext" href="http://issues.apache.org/jira/browse/DERBY-158?page=history">http://issues.apache.org/jira/browse/DERBY-158?page=history</a>
]
     
Jeremy Boynes resolved DERBY-158:
---------------------------------

     Resolution: Fixed
    Fix Version: 10.1.0.0

URL: <a class="moz-txt-link-freetext" href="http://svn.apache.org/viewcvs?view=rev&rev=156570">http://svn.apache.org/viewcvs?view=rev&amp;rev=156570</a>
Log:
Fix for DERBY-158 PRIMARY KEY does not imply NOT NULL
Columns specified in a PRIMARY KEY constraint in CREATE TABLE 
are implicitly set to NOT NULL per the SQL spec. 

If a PRIMARY KEY constraint is added using ALTER TABLE then all
columns must also be NOT NULL. Similarly, columns
specified in a UNIQUE constraint must still be explictly NOT NULL.

Modified:
    incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TableElementList.java
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/nulls.out
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/primarykey.out
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/db2Compatibility.sql
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/nulls.sql
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/primarykey.sql

  </pre>
  <blockquote type="cite">
    <pre wrap="">PRIMARY KEY does not imply NOT NULL
-----------------------------------

         Key: DERBY-158
         URL: <a class="moz-txt-link-freetext" href="http://issues.apache.org/jira/browse/DERBY-158">http://issues.apache.org/jira/browse/DERBY-158</a>
     Project: Derby
        Type: Bug
  Components: SQL
    Reporter: Bernt M. Johnsen
    Assignee: Jeremy Boynes
    Priority: Minor
     Fix For: 10.1.0.0
 Attachments: derby-158-1.patch, derby-158-2.patch

PRIMARY KEY does not imply NOT NULL. Derby issues error message:
ij&gt; create table tab (i integer primary key);
ERROR 42831: 'I' cannot be a column of a primary key or unique key because it can contain
null values.
This is neither compliant with SQL-92 nor with SQL-99 (Feature E141-08, I think).
    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
</body>
</html>


Mime
View raw message