Bug #18402 Invalid function calling Workbench.generateSqlScript
Submitted: 21 Mar 2006 17:58 Modified: 26 Apr 2006 19:29
Reporter: John Yodsnukis (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Preview Severity:S2 (Serious)
Version:1.0.5beta svn revision 303 OS:Linux (Linux (Gentoo on PPC))
Assigned to: Alfredo Kojima CPU Architecture:Any

[21 Mar 2006 17:58] John Yodsnukis
Description:
When exporting a model as SQL Create Script, it fails with message:

Invalid function calling Workbench.generateSqlScript

because the function is named Workbench.generateSqlCreateScript.

How to repeat:
Open a model containing tables.  From the menu bar choose:

File | Export as | CREATE SQL Script...

When prompted, give a file name for the exported script, but you will get an error dialog box:

Error generating SQL script. See GRT console for more information.

The GRT Console (F4) contains the error text:

Invalid function calling Workbench.generateSqlScript

Suggested fix:
Index: mysql-workbench/source/linux/MWMainWindow.cc
===================================================================
--- mysql-workbench/source/linux/MWMainWindow.cc        (revision 303)
+++ mysql-workbench/source/linux/MWMainWindow.cc        (working copy)
@@ -1999,7 +1999,7 @@
     std::string path= fsel.get_filename();

     Glib::ustring data= _grt->call_string_function("Workbench",
-                                                   "generateSqlScript",
+                                                   "generateSqlCreateScript",
                                                    MGRTValue());
     if (data.empty())
     {
[21 Mar 2006 18:27] MySQL Verification Team
Thank you for the bug report. Verified on Suse 10.
[29 Mar 2006 14:21] John Yodsnukis
Thanks for the verification feedback.  Is my patch acceptable?
[26 Apr 2006 19:29] Alfredo Kojima
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Yes, your patch is fine. Thanks.