From derby-dev-return-69965-apmail-db-derby-dev-archive=db.apache.org@db.apache.org Tue Jun 23 20:11:19 2009 Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 22707 invoked from network); 23 Jun 2009 20:11:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Jun 2009 20:11:19 -0000 Received: (qmail 73632 invoked by uid 500); 23 Jun 2009 20:11:29 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 73611 invoked by uid 500); 23 Jun 2009 20:11:29 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 73603 invoked by uid 99); 23 Jun 2009 20:11:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jun 2009 20:11:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jun 2009 20:11:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5A9B3234C045 for ; Tue, 23 Jun 2009 13:11:07 -0700 (PDT) Message-ID: <692484597.1245787867357.JavaMail.jira@brutus> Date: Tue, 23 Jun 2009 13:11:07 -0700 (PDT) From: "Eranda Sooriyabandara (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-4187) Convert altertable.sql to JUnit In-Reply-To: <1320685774.1240662330332.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eranda Sooriyabandara updated DERBY-4187: ----------------------------------------- Attachment: AlterTableTest.diff Hi Bryan, I complete the comparing altertable.out and AlterTableTest and I found some places where they do not match(asserting) but I think most of them are doesn't wanted to test for alter table functionalities.Except, 1) in line 1378 and 1390 in testAlterColumn() the underlying test was not there. I think they must be there to confirm that column was renamed and constraint was there after the renaming. ij> describe renc_2; COLUMN_NAME |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL& ------------------------------------------------------------------------------ C2 |INTEGER |0 |10 |10 |NULL |NULL |NO ij> show indexes from renc_2; TABLE_NAME |COLUMN_NAME |NON_U&|TYPE|ASC&|CARDINA&|PAGES ---------------------------------------------------------------------------- RENC_2 |C2 |false |3 |A |NULL |NULL If you agree with me I can add the asserting test to the test or we can leave it as it is now. ---------------------------------------------------------------------------------- 2) in line 2019 in testDropColumn() it says that ij> -- Verify that a GRANTED privilege fails a drop column in RESTRICT mode, -- and verify that the privilege is dropped in CASCADE mode: but according to the test I found that st.executeUpdate("alter table atdc_10 drop column b restrict"); So I change the comment to // Verify that a GRANTED privilege fails a drop column in // CASCADE mode, and verify that the privilege is dropped // in RESTRICT mode: But here drop column in cascade mode is not tested. Please make a comment that I am correct or not. ------------------------------------------------------------------------------------- 3) At line 2461 and 2465 in testJira3355() st.executeUpdate("create table d3355 ( c1 varchar(10), \"c2\" " +"varchar(10), c3 varchar(10))"); According to the create table statement there is no column named "C3" in the table d3355 but it passes as follows st.executeUpdate("alter table d3355 alter column \"C3\" not null"); st.executeUpdate(" create table \"d3355_a\" ( c1 varchar(10), \"c2\" " +"varchar(10), c3 varchar(10))"); According to the create table statement there is no column named "C3" in the table "d3355_a" but it passes as follows st.executeUpdate("alter table \"d3355_a\" alter column \"C3\" not null"); This is a contradictory behavior as I think. ----------------------------------------------------------------------------------- Also I add some comment according to the altertable.out as I think its appropriate. I have gone through the full code and I didn't see any other mistakes on the test. And here I attach the patch file that I updated. Thanks Eranda > Convert altertable.sql to JUnit > ------------------------------- > > Key: DERBY-4187 > URL: https://issues.apache.org/jira/browse/DERBY-4187 > Project: Derby > Issue Type: Test > Components: Test > Affects Versions: 10.4.2.1 > Reporter: Eranda Sooriyabandara > Assignee: Eranda Sooriyabandara > Priority: Minor > Fix For: 10.5.1.2 > > Attachments: AlterTable.diff, AlterTable.java, AlterTableTest.diff, AlterTableTest.diff, AlterTableTest.diff, AlterTableTest.diff, AlterTableTest.diff, AlterTableTest.diff, AlterTableTest.diff, AlterTableTest.diff, AlterTableTest.java, AlterTableTest.java, AlterTableTest.java, reformatPatch.diff, removeFromOldSuite.diff, svn_stat.txt > > Original Estimate: 486.08h > Remaining Estimate: 486.08h > > Converting altertable.sql harness test to JUnit -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.