Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 5997 invoked from network); 13 Jul 2008 21:43:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Jul 2008 21:43:01 -0000 Received: (qmail 19652 invoked by uid 500); 13 Jul 2008 21:43:00 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 19628 invoked by uid 500); 13 Jul 2008 21:43:00 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 19617 invoked by uid 99); 13 Jul 2008 21:42:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Jul 2008 14:42:59 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [68.142.207.66] (HELO web31803.mail.mud.yahoo.com) (68.142.207.66) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 13 Jul 2008 21:42:06 +0000 Received: (qmail 29970 invoked by uid 60001); 13 Jul 2008 21:41:25 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=6CL9gkOJfGXunSylZA9YNpFK71CDmZex9TrWRgFOiIuNo2CsTOn0tCRKDLq9u4o2876G1tiigC8qm1K0KlSkITmqNbv3b9wwD5Y45ZTLAnSoUJMFrtocwWkicFgw6nxL0BKX2ZGPG3g+U6oT/AX6El2SgsHkKswa9GfGip8kQK8=; Received: from [64.81.244.91] by web31803.mail.mud.yahoo.com via HTTP; Sun, 13 Jul 2008 14:41:25 PDT X-Mailer: YahooMailRC/1042.40 YahooMailWebService/0.7.218 Date: Sun, 13 Jul 2008 14:41:25 -0700 (PDT) From: Geoff hendrey Subject: Re: alter table behavior changed? To: Derby Discussion MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1536856915-1215985285=:28128" Message-ID: <807746.28128.qm@web31803.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --0-1536856915-1215985285=:28128 Content-Type: text/plain; charset=us-ascii Hi Brian, Unfortunately, I think I wasted your time. The problem was most likely caused by a bug in my code. Thank you for providing the code. -geoff ----- Original Message ---- From: Bryan Pendleton To: Derby Discussion Sent: Thursday, July 10, 2008 6:59:28 AM Subject: Re: alter table behavior changed? > Since there is no way to say "NULL" (NOT NULL may be specified), one > would assume that the default behavior when one omits "NOT NULL", is to > produce a column that allows NULL. But derby 10.4 is acting as if NOT > NULL is the default. Hi Geoff, I'm not seeing the behavior you're seeing. Perhaps you are doing something different than I? Here's a short script: ij> connect 'jdbc:derby:brydb;create=true'; ij> create table t (c1 int); 0 rows inserted/updated/deleted ij> describe t; COLUMN_NAME |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL& ------------------------------------------------------------------------------ C1 |INTEGER |0 |10 |10 |NULL |NULL |YES 1 row selected ij> alter table t add column c2 varchar(10); 0 rows inserted/updated/deleted ij> describe t; COLUMN_NAME |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL& ------------------------------------------------------------------------------ C1 |INTEGER |0 |10 |10 |NULL |NULL |YES C2 |VARCHAR |NULL|NULL|10 |NULL |20 |YES 2 rows selected ij> insert into t (c1) values (1); 1 row inserted/updated/deleted ij> select * from t; C1 |C2 ---------------------- 1 |NULL 1 row selected Can you post a more complete script demonstrating the problematic behavior? thanks, bryan --0-1536856915-1215985285=:28128 Content-Type: text/html; charset=us-ascii
Hi Brian,

Unfortunately, I think I wasted your time. The problem was most likely caused by a bug in my code. Thank you for providing the code.
 
-geoff



----- Original Message ----
From: Bryan Pendleton <bpendleton@amberpoint.com>
To: Derby Discussion <derby-user@db.apache.org>
Sent: Thursday, July 10, 2008 6:59:28 AM
Subject: Re: alter table behavior changed?

> Since there is no way to say "NULL" (NOT NULL may be specified), one
> would assume that the default behavior when one omits "NOT NULL", is to
> produce a column that allows NULL. But derby 10.4 is acting as if NOT
> NULL is the default.

Hi Geoff,

I'm not seeing the behavior you're seeing. Perhaps you are doing something
different than I? Here's a short script:

ij> connect 'jdbc:derby:brydb;create=true';
ij> create table t (c1 int);
0 rows inserted/updated/deleted
ij> describe t;
COLUMN_NAME        |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
------------------------------------------------------------------------------
C1                  |INTEGER  |0  |10  |10    |NULL      |NULL      |YES

1 row selected
ij> alter table t add column c2 varchar(10);
0 rows inserted/updated/deleted
ij> describe t;
COLUMN_NAME        |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
------------------------------------------------------------------------------
C1                  |INTEGER  |0  |10  |10    |NULL      |NULL      |YES
C2                  |VARCHAR  |NULL|NULL|10    |NULL      |20        |YES

2 rows selected

ij> insert into t (c1) values (1);
1 row inserted/updated/deleted
ij> select * from t;
C1        |C2
----------------------
1          |NULL

1 row selected

Can you post a more complete script demonstrating the problematic behavior?

thanks,

bryan

--0-1536856915-1215985285=:28128--