db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4187) Convert altertable.sql to JUnit
Date Wed, 24 Jun 2009 03:15:09 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723414#action_12723414

Bryan Pendleton commented on DERBY-4187:

Hi Eranda, thanks for all the hard work on this test. I think it's starting to look really

Regarding the points you raised above, here's my opinion:
1) I think it would be a good idea to improve the verification of the contents of
the system catalogs for the column and the constraint, as you suggest. You
could have a look at the DatabaseMetadata API; I think it should have most of
what you need:

2) The comment is incorrect here. ALTER TABLE DROP COLUMN does not
care whether or not there are granted privileges on the column, and the presence
of RESTRICT or CASCADE does not matter in this case. The Derby development
team discussed this back in 2006 and when I did the DERBY-1909 work, I should
have put a better comment in the test. Here's a pointer to the 2006 discussion:

So I think you should change the comment in the test program to something like:

  // ALTER TABLE DROP COLUMN automatically drops any granted privilege,
  // regardless of whether RESTRICT or CASCADE was specified. Verify that
  // the privileges are dropped correctly and that the bitmap is updated:

3) I think the test is fine here. I think the confusing part is that this part of the
test is verifying behavior of both lower-case and upper-case column names. If
a column or table name is not enclosed in quotation marks, then it is
automatically converted to upper case, so in fact the column C3 *does* exist,
even though the CREATE TABLE statement specified the column name c3
in lower case; it was automatically converted to upper case, and so this part
of the test appears to be working correctly to me.

I think that once we clean up these last few issues, we should be ready to
perform a final review and commit of this patch. Thanks again for all the hard work!

> 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:
>            Reporter: Eranda Sooriyabandara
>            Assignee: Eranda Sooriyabandara
>            Priority: Minor
>             Fix For:
>         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.

View raw message