Apache OpenOffice (AOO) Bugzilla – Issue 14870
ALTERING field names via the UI deletes all the dataHi,
Last modified: 2006-05-31 14:29:06 UTC
Hi, I've just had a very un pleasant experience with beta2. With mysql via the console you can issue ALTER statements to change, for example, the sequence of the fields in a table, the type definition, etc. When you do this, data is not corrupted if you maintain the same field definition, and even if you change it, mysql will try and adapt the values in the fields to the new definition without losing data. I thought I'd try this via the UI in the DSB. When you click on Edit Table from the menu, the table definition window shows up. You can then alter the table definitions and save your changes. I just tried changing the name of a pre-existing field, OOo duly complied, and I saved, but then when I went to look in the grid view of the data in the DSB all of my data in that column had been wiped, and nary so much as warning from OOo. I consider this to be a bad bug, and follows the behaviour that used to occur with dbase databases when you changed the field type or definition via OOo. This shouldn't really happen as mysql supports these changes. Unless of course, it is an extension to SQL92, and therefore not implemented in the ODBC driver. In the latter case, OOo should at least issue a warning. Anyone care to comment ? Alex
Hi Alex, could you please attach a sql script to create the table you wanted to alter. And then describe which column you want to change. Thx. Best regards, Ocke
correcting sub component (see http://www.openoffice.org/issues/describecomponents.cgi?component=database%20access, please), and default owner
Fine tuning of the bug. The problem only seems to occur when you change the name of the field via the UI. I've noticed that even if the new name is alphabetically before the following field OOo will place it after what was the following field in the list. It seems like the UI uses the command MODIFY and not CHANGE, thereby creating a new field. If you use the SQL command console within OOo, everything works OK, so the problem is one of the command passed via the UI. I've attached some sql scripts so that you can reproduce this.
Created attachment 6461 [details] sql command for creating the table
Created attachment 6462 [details] sql command for populating the table
Created attachment 6463 [details] sql ALTER statement to rename field and place it after another one
Created attachment 6465 [details] diff file for fix
Fixed. Patch file attached.
Wrong issue. Sorry :-)
Reopen it.
Hi Alex, if fixed the bug in our SQL alter statement, that will be fixed in the next version. I alter the table the same as your alter statement but without the after part. And the data is not wiped out anymore. May this could also be a problem with the MySQL version you use. MyODDBC 3.51.0.6 MySQL 4.x Best regards, Ocke PS: Thx, for the testing us :-)
Hi Ocke, Great news. Sorry, I forgot to give my MySql and MyODBC versions : MySQL : 4.0.1-max MyODBC : 3.51.06-1 so apart from having InnoDB support, I have essentially the same versions as you. Alex.
fs->clu: please verify in dba07
moving from UNFONFIRMED to FIXED (should have been done earlier)
CLU->MSC: rather your area
set to fixed
verified in dba07
I close this bug, because it's fixed in the OOo 1.1 RC, which will be available soon. Bye Marc
change subcomponent to 'none'