Bug #66861 The task Reverse engineer selected schemata has failed executing.
Submitted: 18 Sep 2012 15:39 Modified: 30 Nov 2012 0:20
Reporter: marc hetu Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S1 (Critical)
Version:5.2.43 CE OS:Windows (server 2008 R2)
Assigned to: CPU Architecture:Any

[18 Sep 2012 15:39] marc hetu
Description:
I try to migrate data from MySQL 5.0.89 to MySQL 5.6.6 with MySQL workbench migration tool but the task Reverse engineer selected schemata always fail executing.

logs:

Starting...
Connect to source DBMS...
- Connecting...
Connecting to Mysql@192.168.0.183:3306...
Connected
Connect to source DBMS done
Reverse engineer selected schemata....
Reverse engineering utilisateurs from def
- Preparing...
Traceback (most recent call last):
  File "C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE\modules\db_mysql_re_grt.py", line 214, in reverseEngineer procedure_names = getProcedureNames(connection, catalog_name, schema_name)
  File "C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE\modules\db_mysql_re_grt.py", line 152, in getProcedureNames
  result = execute_query(connection, "SHOW PROCEDURE STATUS WHERE Db='%s'" % escape_sql_string(schema_name))
  File "C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE\modules\db_mysql_re_grt.py", line 43, in execute_query
    return get_connection(connection_object).executeQuery(query)
  File "C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE\workbench\db_utils.py", line 214, in executeQuery
    raise QueryError("Error executing '%s'\n%s"%(query, error), code)
workbench.db_utils.QueryError: Error executing 'SHOW PROCEDURE STATUS WHERE Db='utilisateurs''
Column count of mysql.proc is wrong. Expected 20, found 16. The table is probably corrupted.
SQL Error: 1547
 
Traceback (most recent call last):
  File "C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE\workbench\wizard_progress_page_widget.py", line 191, in thread_work self.func()
  File "C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE\modules\migration_schema_selection.py", line 160, in task_reveng
    self.main.plan.migrationSource.reverseEngineer()
  File "C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE\modules\migration.py", line 329, in reverseEngineer
    self.state.sourceCatalog = self._rev_eng_module.reverseEngineer(self.connection, self.selectedCatalogName, self.selectedSchemataNames, self.state.applicationData)
SystemError: QueryError("Error executing 'SHOW PROCEDURE STATUS WHERE Db='utilisateurs''
Column count of mysql.proc is wrong. Expected 20, found 16. The table is probably corrupted.
SQL Error: 1547"): error calling Python module function DbMySQLRE.reverseEngineer
ERROR: Reverse engineer selected schemata: QueryError("Error executing 'SHOW PROCEDURE STATUS WHERE Db='utilisateurs''
Column count of mysql.proc is wrong. Expected 20, found 16. The table is probably corrupted.
SQL Error: 1547"): error calling Python module function DbMySQLRE.reverseEngineer

How to repeat:
Migrate data from MySQL 5.0.89 to MySQL 5.6.6 with MySQL workbench migration tool.
[18 Sep 2012 16:06] MySQL Verification Team
Thank you for the bug report. Are you tried to check what the error message printed?

Column count of mysql.proc is wrong. Expected 20, found 16. The table is probably corrupted.
SQL Error: 1547

Thanks.
[18 Sep 2012 16:22] marc hetu
Everything work fine on MySQL server 5.0, the table are not corrupted. The migration fail because the table are not compatible between MySQL 5.0 and MySQL 5.6. The structure change and now I am stuck in MySQL 5.0.
[30 Nov 2012 0:20] Philip Olson
Fixed as of the upcoming MySQL Workbench 5.2.45, and here's the changelog entry:

Migrating from MySQL Server 5.0 to MySQL Server 5.6 could fail. The
migration tool now supports MySQL Server 4.1 and above as the source
database. MySQL Server 5.1 and above are supported as the target database.

The related documentation has also been updated to reflect this change.

Thank you for the bug report.
[15 May 2013 17:10] Ramses Bermudez
I am still having the same problem and I have the latest version installed (5.2.47)

Traceback (most recent call last):

  File "C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE\modules\db_mysql_re_grt.py", line 309, in reverseEngineer

    grt.modules.MysqlSqlFacade.parseSqlScriptString(catalog, wrap_sql(wrap_routine_sql(sql), schema_name))

  File "C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE\modules\db_mysql_re_grt.py", line 252, in wrap_routine_sql

    return "DELIMITER $$\n"+sql

TypeError: cannot concatenate 'str' and 'NoneType' objects

Traceback (most recent call last):

  File "C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE\workbench\wizard_progress_page_widget.py", line 192, in thread_work

    self.func()

  File "C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE\modules\migration_schema_selection.py", line 160, in task_reveng

    self.main.plan.migrationSource.reverseEngineer()

  File "C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE\modules\migration.py", line 332, in reverseEngineer

    self.state.sourceCatalog = self._rev_eng_module.reverseEngineer(self.connection, self.selectedCatalogName, self.selectedSchemataNames, self.state.applicationData)

SystemError: TypeError("cannot concatenate 'str' and 'NoneType' objects"): error calling Python module function DbMySQLRE.reverseEngineer

ERROR: Reverse engineer selected schemata: TypeError("cannot concatenate 'str' and 'NoneType' objects"): error calling Python module function DbMySQLRE.reverseEngineer

Failed
[16 May 2013 22:40] Nathaniel Engelsen
I was also having the same problem.  I replaced some code in "db_mysql_re_grt.py" with code from "db_mysql_grt.py" -- the same file that was modified earlier in the bug report.

On about line 48 for db_mysql_re_grt.py is the definition for the connect() function. I replaced it with the version for db_mysql_grt.py (about line 45).
[16 May 2013 23:06] Nathaniel Engelsen
Nope -- just replaced one error with another.  Nevermind!
[17 May 2013 16:17] Sergio Andres De La Cruz Rodriguez
Patched file for Bug #66861. Replace the file with the same name in your Workbench's modules dir

Attachment: db_mysql_re_grt.py (text/x-python), 17.32 KiB.

[17 Feb 2014 14:41] michael carioscio
have the same issue.  tried the fix outlined here.  did not fix the problem. any suggestions?