Bug #37192 Workbench loses Inserts data II
Submitted: 4 Jun 2008 13:29 Modified: 10 Jul 2008 15:57
Reporter: Bernhard Wellhoefer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S1 (Critical)
Version:5.0.22 OS:Windows (XP SP2)
Assigned to: Alfredo Kojima CPU Architecture:Any

[4 Jun 2008 13:29] Bernhard Wellhoefer
Description:
Since I do not have the rights to re-open a bug (see 37008) I hereby report this issue via a new bug :(

I now have Workbench SE 5.0.22 and the bug still exists.

When I add a new column (type INT) all my Inserts data get lost.

How to repeat:
Just add Inserts data for a table and then add a new column

Suggested fix:
When adding a new Column the Inserts data can be extended with the default value or NULL.

When removing a column the Inserts data can be truncated by this column.
[4 Jun 2008 17:05] MySQL Verification Team
Thank you for the bug report. I could not repeat with a simple table using the 5.0.22SE:

INSERT INTO `table1` (`idtable1`, `col2`) VALUES (1, NULL);
INSERT INTO `table1` (`idtable1`, `col2`) VALUES (2, NULL);
INSERT INTO `table1` (`idtable1`, `col2`) VALUES (3, NULL);

values NULL were added for the new added column, could you please provide a test model file ready to add a new INT column and to verify the behavior reported.
Thanks in advance.

PS: Also I deleted the new column and the inserts were preserved.
[5 Jun 2008 7:02] Bernhard Wellhoefer
Ok I agree that it is not so easy to reproduce the issue. Here the steps to reproduce it:

1) Create a table, e.g.

CREATE  TABLE IF NOT EXISTS `broca2`.`table1` (
  `idtable1` INT NOT NULL AUTO_INCREMENT ,
  `i` INT NOT NULL ,
  `t` TEXT NOT NULL ,
  PRIMARY KEY (`idtable1`) )
ENGINE = InnoDB

2) Create for the table some Inserts

3) Go to a different table and open for this table the column editor (just to change the focus to another table)

4) Switch back to the test table from step 1

5) Add an INT column to the table from step 1

6) Now the Inserts data are lost.
[5 Jun 2008 20:42] MySQL Verification Team
Thank you for the feedback. I was able to repeat with the last 'how to repeat' instructions.
[23 Jun 2008 20:06] Johannes Taxacher
issue is fixed. note that due to recent changes in insert-editor values for newly added columns aren't inserted automatically any longer.
this fix will be in 5.0.23
[10 Jul 2008 15:57] Tony Bedford
An entry has been added to the 5.0.23 changelog:

When a new column is added to a table Inserts data gets deleted.