Bug #33660 Insert Editor: print bug on multi inserts
Submitted: 3 Jan 2008 16:58 Modified: 29 Jan 2008 20:38
Reporter: moi meme Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.0.11b OS:Windows
Assigned to: Johannes Taxacher CPU Architecture:Any
Tags: inserts

[3 Jan 2008 16:58] moi meme
Description:
Insert editor on a table that already contains many inserts is buggy:
only first insert is show.

How to repeat:
Create table "table1" with one column
Create table "table2"
Edit "table1", tab "Inserts", clic on "Open Editor ..." and insert 2 rows
Edit "table2", tab "Inserts", clic on "Open Editor ...", do not insert anything and clic ok
Return on the "table1", tab "Inserts", "Open Editor ..."
Only first rows is visible !

(clic on ok and re-click "Open Editor ..." correct the bug ! )
[4 Jan 2008 11:09] MySQL Verification Team
Thank you for the bug report.
[5 Jan 2008 21:09] Ian Carpenter
When adding multi line insert the the query does not execute correctly..

the query that is generated for multi line inserts is as follows:-

INSERT INTO `project` (idproject, project_name, project_number) 
VALUES (0, 'Project 1', '1001');
INSERT INTO `project` (idproject, project_name, project_number) 
VALUES (0, 'Project 2', '1002');
INSERT INTO `project` (idproject, project_name, project_number) 
VALUES (0, 'Project 3', '1003');

Only the last line executes...

One way arround this is for the query to be constructed like:-

INSERT INTO `project` (idproject, project_name, project_number) 
VALUES (0, 'Project 1', '1001'),
(0, 'Project 2', '1002'),
(0, 'Project 3', '1003');

Ian...
[29 Jan 2008 20:38] Johannes Taxacher
fixed in 5.0.12 SVN Rev 2468