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] Updated: (DERBY-3177) Dropping columns casues auto_increment field to be lost
Date Wed, 07 Nov 2007 19:24:51 GMT

     [ https://issues.apache.org/jira/browse/DERBY-3177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Bryan Pendleton updated DERBY-3177:

    Attachment: bug2.sql

Attached is 'bug2.sql', a modified version of migration-bug.sql
in which I have added 3 "select * from sys.syscolumns"
statements to demonstrate that the autoinc* fields of the
syscolumns record for the id column of the messages table
get damaged by the alter table drop column statement.

Running the script together with the patch for DERBY-3175
does *not* reproduce the problem, which provides some
evidence that this bug is a duplicate of DERBY-3175.

I propose to:
- include the bug2.sql test case into the DERBY-3175 patch
- mark this issue as a duplicate of DERBY-3177

Please let me know if this seems like the wrong course of action.

> Dropping columns casues auto_increment field to be lost
> -------------------------------------------------------
>                 Key: DERBY-3177
>                 URL: https://issues.apache.org/jira/browse/DERBY-3177
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions:
>         Environment: Windows XP SP2
> JVM: Hotspot JVM 1.6
> Derby: 10.3.1000004.561794
>            Reporter: Charlie Hubbard
>            Assignee: Bryan Pendleton
>         Attachments: bug2.sql, migration-bug.sql
> I have a DB that I've been updating over time, and I've run into this bug.  After running
this script Messages.ID table looses it's auto incrementing column after running the script
to completion.  If I create a virgin DB and run this script against the Message table's ID
column looses it's auto increment data type.  If you comment out the last three alter table
statements the column's auto increment feature is not lost.  You don't have to insert any
data into the database for this to happen.
> I tried creating a simpler script to expose this problem, but was unsuccessful.  I tried
something like:
> create table Messages ( 
>   Name varchar(256), 
>   KillThis varchar(256),
> );
> alter table Messages drop column KillThis;
> However, this DID NOT EXPOSE THE BUG.  So there is something else at work causing this
problem.  See the attached script to recreate the problem.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message