Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 80311 invoked from network); 27 Jan 2008 21:05:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Jan 2008 21:05:34 -0000 Received: (qmail 59406 invoked by uid 500); 27 Jan 2008 21:05:24 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 59059 invoked by uid 500); 27 Jan 2008 21:05:24 -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 59048 invoked by uid 99); 27 Jan 2008 21:05:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Jan 2008 13:05:23 -0800 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.72] (HELO web31809.mail.mud.yahoo.com) (68.142.207.72) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 27 Jan 2008 21:04:56 +0000 Received: (qmail 51449 invoked by uid 60001); 27 Jan 2008 21:05:01 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=K037Sv74rgOQ2xAUB25FQ89OJEvsp6pKHuT3unQ+AnwtBF2jLPS44wM6HSxC/liMdKMmtfVvAvVWnX/EDaSYcPBA7geNOC6wnlrceTZj4Vo+eicM4BkOh+4FQSxKvbyT2MV3Ic7ADonAY95KzFwA2f77mzHOyjJrWJRNICcfyqY=; X-YMail-OSG: UeB5VSIVM1mTsRh0Ph.__fZOn0d_V4WKVUbaTwSj240HuJdMP_L6J8XX0W1VSz9Q1mCt6BGby2FBcuHRVXuqnjo5Cc.h Received: from [64.81.244.91] by web31809.mail.mud.yahoo.com via HTTP; Sun, 27 Jan 2008 13:05:00 PST X-Mailer: YahooMailRC/818.31 YahooMailWebService/0.7.162 Date: Sun, 27 Jan 2008 13:05:00 -0800 (PST) From: Geoff hendrey Subject: ALTER COLUMN ..NOT NULL double quotes bug? To: derby-user@db.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-332762929-1201467900=:50069" Message-ID: <92279.50069.qm@web31809.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --0-332762929-1201467900=:50069 Content-Type: text/plain; charset=us-ascii Hi: I think I have isolated a bug involving the use of double quotes to define a column name. Here s the SQL to reproduce the bug, followed by the error message generated by the final SQL statement. In order to make the bug go away, eliminate all use of double quotes in the SQL statements below. Note that the identical alter statement succeeds before the insert, and fail after. I have spent a long time trying to isolate this problem, so please take a look. CREATE TABLE Table2 ( "c" VARCHAR(32672) ); alter table Table2 ALTER COLUMN "c" NULL; alter table Table2 ALTER COLUMN "c" NOT NULL; INSERT INTO Table2("c") VALUES('yo'); alter table Table2 ALTER COLUMN "c" NULL; alter table Table2 ALTER COLUMN "c" NOT NULL; Query 1 of 6 elapsed time (seconds) - Total: 0.012, SQL query: 0.012, Building output: 0 Query 2 of 6 elapsed time (seconds) - Total: 0.003, SQL query: 0.003, Building output: 0 Query 3 of 6 elapsed time (seconds) - Total: 0.003, SQL query: 0.003, Building output: 0 1 Row(s) Inserted Query 4 of 6 elapsed time (seconds) - Total: 0.009, SQL query: 0.009, Building output: 0 Query 5 of 6 elapsed time (seconds) - Total: 0.003, SQL query: 0.003, Building output: 0 Error: java.sql.SQLException: Column 'C' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE statement then 'C' is not a column in the target table., SQL State: 42X04, Error Code: -1 --0-332762929-1201467900=:50069 Content-Type: text/html; charset=us-ascii
Hi:
I think I have isolated a bug involving the use of double quotes to define a column name. Here s the SQL to reproduce the bug, followed by the error message generated by the final SQL statement. In order to make the bug go away, eliminate all use of double quotes in the SQL statements below. Note that the identical alter statement succeeds before the insert, and fail after. I have spent a long time trying to isolate this problem, so please take a look.

CREATE TABLE Table2
(
   "c" VARCHAR(32672)
);

alter table Table2 ALTER COLUMN "c" NULL;
alter table Table2 ALTER COLUMN "c" NOT NULL;
INSERT INTO Table2("c") VALUES('yo');
alter table Table2 ALTER COLUMN "c" NULL;
alter table Table2 ALTER COLUMN "c" NOT NULL;


Query 1 of 6 elapsed time (seconds) - Total: 0.012, SQL query: 0.012, Building output: 0

Query 2 of 6 elapsed time (seconds) - Total: 0.003, SQL query: 0.003, Building output: 0

Query 3 of 6 elapsed time (seconds) - Total: 0.003, SQL query: 0.003, Building output: 0
1 Row(s) Inserted
Query 4 of 6 elapsed time (seconds) - Total: 0.009, SQL query: 0.009, Building output: 0

Query 5 of 6 elapsed time (seconds) - Total: 0.003, SQL query: 0.003, Building output: 0
Error: java.sql.SQLException: Column 'C' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE  statement then 'C' is not a column in the target table., SQL State: 42X04, Error Code: -1
--0-332762929-1201467900=:50069--