Issue 43528 - Can't insert new field/column in Table Design BEFORE/AFTER existing one
Summary: Can't insert new field/column in Table Design BEFORE/AFTER existing one
Status: CONFIRMED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: recent-trunk
Hardware: PC All
: P3 Trivial with 3 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2005-02-25 09:54 UTC by alex.thurgood
Modified: 2013-08-07 15:45 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description alex.thurgood 2005-02-25 09:54:49 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.
Comment 1 alex.thurgood 2005-02-25 09:57:55 UTC
setting oooqa and regression keywords
Comment 2 Frank Schönheit 2005-03-04 14:08:19 UTC
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.
Comment 3 alex.thurgood 2005-03-05 09:02:33 UTC
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 
Comment 4 Frank Schönheit 2005-03-07 09:16:52 UTC
definately a new issue
(http://qa.openoffice.org/issue_handling/basic_rules.html#one_per_issue :)
Comment 5 alex.thurgood 2005-03-07 14:59:39 UTC
Hi Frank,


OK, will do


Alex
Comment 6 Ariel Constenla-Haile 2008-08-19 07:16:22 UTC
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.
Comment 7 Ariel Constenla-Haile 2008-08-19 07:24:43 UTC
Changed summary to avoid ambiguities (IMO "insert new field/column in Table
Design" is now clear)