Bug #54036 Inserts tab has no visible purpose
Submitted: 27 May 2010 15:26 Modified: 16 Nov 2011 2:33
Reporter: Jeremy Tinley Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S4 (Feature request)
Version:5.2.21.OSS RC OS:Windows (Windows 7)
Assigned to: CPU Architecture:Any

[27 May 2010 15:26] Jeremy Tinley
Description:
The Inserts tab, under a Schema has no visible purpose. There is no mechanism to get the data out of the inserts presently.

How to repeat:
Create a new schema.
Create a new table in the schema:

CREATE  TABLE IF NOT EXISTS `mydata`.`test` (
  `test_id` INT NOT NULL ,
  `data` VARCHAR(45) NULL ,
  PRIMARY KEY (`test_id`) )
ENGINE = InnoDB

Edit the test table, go to Inserts tab and add data:
NULL, test

--

How does the data get turned into insert statements from here?

There is a button in the Inserts tab, "Export recordset to external file", however clicking does no action.

If you right click the table name, you can use "Copy insert to Clipboard" but this puts empty data in the VALUES () fields.

Suggested fix:
Add a "Copy Insert Statements to Clipboard" function to generate the statements for insert.
[27 May 2010 16:23] Valeriy Kravchuk
Please, use File > Export > Forward Engineer SQL CREATE Script menu item and check "Create INSERT Statements for Tables" checkbox to see INSERTs generated. So, tab has a purpose.

But I agree that button on a toolbar should either work or should be removed/grayed out.
[27 May 2010 20:44] Jeremy Tinley
Can I suggest then that there be a simpler method (Plugin > Object > Copy inserts to clipboard?

Then rename the existing "Plugin > Object > Copy Insert to Clipboard" to Copy Empty Insert to Clipboard" for clarity.
[28 May 2010 18:47] Johannes Taxacher
we'll take that as a feature request then, thanks for the idea.
maybe we can call it "copy insert template ..." and "copy default inserts ..."
btw, this can be done using the python/lua scripting as well
[12 Jul 2010 22:24] Jeremy Tinley
Downgrading from S2->S4 as this is now a feature request.
[16 Nov 2011 2:33] Philip Olson
Fixed as of 5.2.36:

+        Added the <guimenu>Copy Inserts to Clipboard</guimenu> option to
+        the <guimenu>Plugins</guimenu>, <guimenu>Objects</guimenu> menu.