db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendle...@amberpoint.com>
Subject Re: Alter Table ADD Column throws column number exception
Date Fri, 30 Mar 2007 17:29:47 GMT
> The store's metadata thinks that there are 20 columns in the table, and
> it only currently supports adding a column at the end of the table.  The
> request is to add the column at position 16, in the middle.  From 

I notice that the overall algorithm for adding a column to a table
(in AlterTableConstantAction.addNewColumnToTable) is:

  - add new column to conglomerate
  - add new column to system catalogs

I wonder if there are situations in which something goes wrong in
the second step, and we don't clean up properly, resulting in a
situation in which the conglomerate's notion of the columns becomes
out of sync with the system catalogs?

Alan, does your application routinely add columns to tables?

If so, have there been times in which something went wrong with
adding the column to the table, and the request failed and had to
be repeated?

Presumably, for this particular table, this would need to have
happened 5 times already.

Just an idea, thought I'd throw it out there to see if it gave any
further theories to pursue.

thanks,

bryan


Mime
View raw message