Bug #72757 mysql workbench migration select the schemata can't show databases schema
Submitted: 27 May 2014 3:37 Modified: 19 Jun 2014 1:31
Reporter: thank.xie xie Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S5 (Performance)
Version:mysql 5.5 workbench 6.08 OS:Linux
Assigned to: CPU Architecture:Any
Tags: migration

[27 May 2014 3:37] thank.xie xie
Description:

When I use the workbench migration structural migration in schemata selection this step can not display all the name of the schemata,
My schema format is 'goods_v1.2', but I use 'goods' is displayed

Starting...
Connect to source DBMS...
- Connecting...
Connect to source DBMS done
Reverse engineer selected schemata....
Reverse engineering 2 from def
- Preparing...
Traceback (most recent call last):
  File "/usr/lib/mysql-workbench/modules/db_mysql_re_grt.py", line 218, in reverseEngineer
    table_names = getAllTableNames(connection, catalog_name, schema_name)
  File "/usr/lib/mysql-workbench/modules/db_mysql_re_grt.py", line 120, in getAllTableNames
    result = execute_query(connection, "SHOW TABLES FROM `%s`" % escape_sql_identifier(schema_name))
  File "/usr/lib/mysql-workbench/modules/db_mysql_re_grt.py", line 43, in execute_query
    return get_connection(connection_object).executeQuery(query)
  File "/usr/share/mysql-workbench/libraries/workbench/db_utils.py", line 241, in executeQuery
    raise QueryError("Error executing '%s'\n%s"%(query, error), code, error)
workbench.db_utils.QueryError: Error executing 'SHOW TABLES FROM `2`'
Unknown database '2'.
SQL Error: 1049

Traceback (most recent call last):
  File "/usr/share/mysql-workbench/libraries/workbench/wizard_progress_page_widget.py", line 192, in thread_work
    self.func()
  File "/usr/lib/mysql-workbench/modules/migration_schema_selection.py", line 160, in task_reveng
    self.main.plan.migrationSource.reverseEngineer()
  File "/usr/lib/mysql-workbench/modules/migration.py", line 353, in reverseEngineer
    self.state.sourceCatalog = self._rev_eng_module.reverseEngineer(self.connection, self.selectedCatalogName, self.selectedSchemataNames, self.state.applicationData)
SystemError: QueryError("Error executing 'SHOW TABLES FROM `2`'
Unknown database '2'.
SQL Error: 1049"): error calling Python module function DbMySQLRE.reverseEngineer
ERROR: Reverse engineer selected schemata: QueryError("Error executing 'SHOW TABLES FROM `2`'
Unknown database '2'.
SQL Error: 1049"): error calling Python module function DbMySQLRE.reverseEngineer
Failed

How to repeat:

When I use the workbench migration structural migration in schemata selection this step can not display all the name of the schemata,
My schema format is 'goods_v1.2', but I use 'goods' is displayed

Starting...
Connect to source DBMS...
- Connecting...
Connect to source DBMS done
Reverse engineer selected schemata....
Reverse engineering 2 from def
- Preparing...
Traceback (most recent call last):
  File "/usr/lib/mysql-workbench/modules/db_mysql_re_grt.py", line 218, in reverseEngineer
    table_names = getAllTableNames(connection, catalog_name, schema_name)
  File "/usr/lib/mysql-workbench/modules/db_mysql_re_grt.py", line 120, in getAllTableNames
    result = execute_query(connection, "SHOW TABLES FROM `%s`" % escape_sql_identifier(schema_name))
  File "/usr/lib/mysql-workbench/modules/db_mysql_re_grt.py", line 43, in execute_query
    return get_connection(connection_object).executeQuery(query)
  File "/usr/share/mysql-workbench/libraries/workbench/db_utils.py", line 241, in executeQuery
    raise QueryError("Error executing '%s'\n%s"%(query, error), code, error)
workbench.db_utils.QueryError: Error executing 'SHOW TABLES FROM `2`'
Unknown database '2'.
SQL Error: 1049

Traceback (most recent call last):
  File "/usr/share/mysql-workbench/libraries/workbench/wizard_progress_page_widget.py", line 192, in thread_work
    self.func()
  File "/usr/lib/mysql-workbench/modules/migration_schema_selection.py", line 160, in task_reveng
    self.main.plan.migrationSource.reverseEngineer()
  File "/usr/lib/mysql-workbench/modules/migration.py", line 353, in reverseEngineer
    self.state.sourceCatalog = self._rev_eng_module.reverseEngineer(self.connection, self.selectedCatalogName, self.selectedSchemataNames, self.state.applicationData)
SystemError: QueryError("Error executing 'SHOW TABLES FROM `2`'
Unknown database '2'.
SQL Error: 1049"): error calling Python module function DbMySQLRE.reverseEngineer
ERROR: Reverse engineer selected schemata: QueryError("Error executing 'SHOW TABLES FROM `2`'
Unknown database '2'.
SQL Error: 1049"): error calling Python module function DbMySQLRE.reverseEngineer
Failed
[27 May 2014 10:11] Milosz Bodzek
Thank you for bug report. Confirm, i can repeat.
[27 May 2014 11:40] MySQL Verification Team
Thank you for the bug report.
[29 May 2014 11:57] Milosz Bodzek
Posted by developer:
 
Fixed
[19 Jun 2014 1:31] Philip Olson
Fixed as of the upcoming MySQL Workbench 6.1.7 release, and here's the changelog entry:

The schema selection step of the migration wizard would not display the
complete names of the schemas nor complete the migration process if the
schema name contained a dot.

Thank you for the bug report.