Bug #32534 Error in Reverse engineering
Submitted: 20 Nov 2007 16:03 Modified: 23 Nov 2007 22:06
Reporter: Marcio Merlone Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S1 (Critical)
Version:5.0.9-beta OS:Windows (XP Professional)
Assigned to: Johannes Taxacher CPU Architecture:Any

[20 Nov 2007 16:03] Marcio Merlone
Description:
Unable to reverse engineering any database.

How to repeat:
Using the MySQL Native Driver, no advanced options checked, it is able to "Connect to DBMS" and "Retrieve schemata description from DBMS", "Execution completed successfully". I click "Next", choose any database from the ones my server has, click next and then the failure:

"Failed to fetch selected schemata objects."

The message log:

"Fetching table list.
OK
Fetching view list.
OK
Fetching routine list.
Lost connection to MySQL server during query".

No messages on mysql error log (mysql.err). Server runs MySQL 5.0.24a on a 5.0.22-Debian_3 Linux mercurio 2.6.18-5-686-bigmem #1 SMP Thu Aug 30 03:25:44 UTC 2007 i686 GNU/Linux box.
[20 Nov 2007 16:26] marc castrovinci
Worked fine for me. This might be a configuration problem. Is you MySQL version local to the Workbench? Does the user have permissions to get the routine schema?
[20 Nov 2007 16:26] Sergei Tkachenko
Thanks for report.
Could you check if following query performs well on your database:

select * from information_schema.routines;

There is a bug related to DBMS itself, that appears as server instance crash when executing mentioned query (http://bugs.mysql.com/bug.php?id=30891). AFAIK it's not fixed for now. If this bug is the case then the only workaround known so far is to recreate database dictionary. Otherwise please let us know.
[20 Nov 2007 16:30] Marcio Merlone
That´s it. The server is a remote machine and as far as I know the user has been grated all permissions on the server (grant all on *.*).

root@mercurio:/var/log# mysql -u mmerlone -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 65 to server version: 5.0.22-Debian_3

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> select * from information_schema.routines;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>

So, is not a Workbench bug.
[20 Nov 2007 16:39] Marcio Merlone
BTW, could you point me on how to recreate the database dictionary?
[21 Nov 2007 12:48] Sergei Tkachenko
Please run 'mysql_system_tables_fix.sql' script against your DBMS with root privileges. That script is located in 'share' subdir of your MySQL DBMS installation dir.