Apache OpenOffice (AOO) Bugzilla – Issue 43528
Can't insert new field/column in Table Design BEFORE/AFTER existing one
Last modified: 2013-08-07 15:45:41 UTC
Mysql db accessed via MyODBC 3.51.09 Open db document ODB. Click on the Tables button. Select the table in the table tree view. RMB click and choose Edit Table. Try to insert a new field into the table, of tinyint type, between the first field (int, autoincrement) and second field (varchar), using the RMB click on the leftmost column of the edit table view, where you can also delete and set the primary key and delete the field. The new field is systematically added to the end of the field list, and will also appear at that position when the table is opened for editing of the data. This means that the command "AFTER", "FIRST", or "LAST" in the SQL ALTER TABLE syntax are either not included in the function or are dropped on execution or are ignored. Reproducible every time. This is a regression compared to 1.1.4 and I remember was a problem during the 1.1 pre-release development.
setting oooqa and regression keywords
ehm, no, this is no regression to 1.1.4, I just tried it. Also, we never used the AFTER/FIRST/LAST keywords, since they're not standard SQL. So I flag this as ENHANCEMENT, target it, and assign it.
Hi Frank, ooops, mea culpa, I've just tried it again with 1.1.4 and you're right. I was convinced that it had worked for me with 1.1.4. As it turns out, I've just had a very nasty surprise when trying this on 1.1.4, and shall probably file a bug issue for it (unless it has been corrected since then ;-)) I pick a table from a mysql db, enter the edit table mode and click on Insert a new line on the leftmost area. The field in front of which I insert the new line is shifted down and I can define my new field. So far so good. I define a field with a different column name to the subsequent field and make it varchar(3) for example. I get an error message from OOo : Error while connecting to data source [MySQL][ODBC 3.51 Driver][mysqld 4.0.20]Duplicate column name "assistant" Of course, the column "assistant" is the one I've just defined and doesn't exist elsewhere in the table. If I now close the table and say NO to saving the changes, when I open up the table again (I disconnect from the db and close OOo just to make sure everything is refreshed properly), the original field that was shunted downwards is now called "assistant" and the data present truncated to the length of the new defined field even though I didn't save the changes to the table. So now I have data loss for a change that I didn't even save :-(( new issue or not ? methinks yes. Alex
definately a new issue (http://qa.openoffice.org/issue_handling/basic_rules.html#one_per_issue :)
Hi Frank, OK, will do Alex
While answering a mail on the Spanish list (http://es.openoffice.org/servlets/ReadMsg?list=discuss_es&msgNo=21037) I've found this. I've changed some fields and the summary, and added myself to CC.
Changed summary to avoid ambiguities (IMO "insert new field/column in Table Design" is now clear)