Bug #54887 "Copy Insert to Clipboard" is not working properly
Submitted: 29 Jun 2010 8:01 Modified: 26 Aug 2011 4:23
Reporter: Slava Ershov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.28 OS:Linux (Ubuntu 10.04)
Assigned to: Alfredo Kojima CPU Architecture:Any

[29 Jun 2010 8:01] Slava Ershov
Description:
When you try to copy the data tables (Context menu item "Copy Insert to Clipboard") get one blank date SQL INSERT with no data, such as
"INSERT INTO `subway` (`id`, `title`, `town`) VALUES ( , ,);"
The data in the tab "Inserts" editing tables are included. (Edit Table -> Inserts tab).
In the export ("Crtl-Shift-G" hotkey) everything works fine.

How to repeat:
1. Right-click on table in EER Diagram (or MySQL Model) and select "Edit Table".
2. Insert data to table ("Inserts" tab), don't forget apply changes to data!
3. Right-click on the same table in EER Diagram (or MySQL Model) and select "Copy Insert to Clipboard".
4. Paste data from the clipboard into a text editor
[29 Jun 2010 8:36] Valeriy Kravchuk
Thank you for the bug report. Verified just as described on Windows XP.
[6 Jul 2010 14:59] Alfredo Kojima
fixed
[10 Sep 2010 8:00] Jason Quinn
Also not working in version 5.2.27 (Ubuntu 10.04 64-bit).
[20 Sep 2010 15:01] Johannes Taxacher
not working on Ubuntu/Linux in 5.2.28 too

please be aware, that this feature is not supposed to put the insert-data entered on the inserts-tab of the editor to the clipboard, but just copy a draft-insert-statement for that table that can then be edited/completed.
[25 Sep 2010 0:54] J Farray
Also not working in 5.2.28 in Vista.

Also "Copy 'tableName'" and "Copy 'viewName'" functions do not work either.
[25 Sep 2010 4:31] J Farray
I should have been more specific in my comment.  I am not getting the blank draft INSERT command on the clipboard, in fact the clipboard remains unaffected at all.

If I have an empty clipboard and I select any of the mentioned functions from the context menu, I still have an empty clipboard.  The only command that works is "Copy SQL to Clipboard".
[5 Oct 2010 13:37] Johannes Taxacher
Bug #57141 has been marked as duplicate of this one
[27 Oct 2010 0:40] Alfredo Kojima
Does it work if you try Copy ... without opening a table editor?
[2 Jan 2011 0:48] Javier Ortiz
I see the same issue on version 5.2.31. If the table has inserts defined it works. It doesn't work otherwise.
[2 Mar 2011 16:40] [ name withheld ]
Same thing happens to me.  v5.3.21, Win7 x64.

When right clicking a table in the model trying to get the SQL for it, "Copy Insert to Clipboard" does not affect the clipboard.  "Copy SQL to Clipboard" works though.  Same thing when right clicking the table under Physical Schemata.
[26 Apr 2011 18:28] Alfredo Kojima
To clear it up... We're talking about the modeling part of Workbench. The Copy Insert to Clipboard command is meant to copy the INSERTs data that was entered for a given table. It is not for unconditionally generating an empty template, since there's not much use for an empty INSERT statement during modeling (as you can't execute it or anything). However, if for whatever reason that's what you were expecting, then this will be treated as a feature request for a Copy INSERT Template to Clipboard command
[17 May 2011 0:43] Alfredo Kojima
marked bug #60772 as duplicate
[26 Aug 2011 4:23] Philip Olson
This has been fixed in 5.2.35:

+        <guimenu>Copy Insert to Clipboard</guimenu> now updates the
+        &workbench; status to say "The table schema.table has no records
+        for insert statements" when no inserts are defined for the
+        table.

+        The <guimenu>Copy Insert Template to Clipboard</guimenu> option
+        was added to the Model View. For more information, see
+        <xref linkend="wb-table-eer-view-image"/>.

-          <guimenuitem>Copy Insert to Clipboard</guimenuitem>
+          <guimenuitem>Copy Insert to Clipboard</guimenuitem>: Copies
+          <literal role="stmt">INSERT</literal> statements based on the
+          model's inserts. Nothing is copied to the clipboard if the
+          table has no inserts defined.

-          <guimenuitem>Copy Insert to Clipboard</guimenuitem>
+          <guimenuitem>Copy Insert to Clipboard</guimenuitem>: Copies
+          <literal role="stmt">INSERT</literal> statements based on the
+          model's inserts. Nothing is copied to the clipboard if the
+          table has no inserts defined.