Bug #52525 Workbench let server crash with segfault
Submitted: 1 Apr 2010 12:07 Modified: 8 Apr 2010 6:33
Reporter: Susanne Ebrecht Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S1 (Critical)
Version:5.1 OS:Linux (Ubuntu 9.04 AMD64)
Assigned to: CPU Architecture:Any

[1 Apr 2010 12:07] Susanne Ebrecht
Description:
When I try to reverse engineer a schema mysql server will crash.

Error 111.

Segmentation fault on server side.

How to repeat:
$ bzr pull <mysql 5.1>

$ ./BUILD/compile-amd64-debug-max --prefix=/home/<your home>/mysql51bzr -c
$ make
$ make install

$ cd /home/<your home>/mysql51bzr
$ mkdir etc
$ cd etc
$ echo -e -n "[mysqld]\nport = 6951\nsocket = /tmp/mysql51bzr.sock\n[client]\nport = 6951\nsocket = /tmp/mysql51bzr.sock" > my.cnf

$ cd ../bin
$ ./mysql_install_db --defaults-file=/home/<your home>/mysql51bzr/etc/my.cnf

$ cd /home/<your home>/mysql51bzr/libexec

$ ./mysqld --defaults-file=/home/your home/mysql51bzr/etc/my.cnf &

$ cd ..
$ ./bin/mysql

mysql> CREATE SCHEMA workbenchcrash;
mysql> USE workbenchcrash;
mysql> CREATE TABLE tab1(i integer, j integer, primary key(i))engine=innodb;
mysql> CREATE TABLE t1(i integer, j integer, primray key(i), foreign key(j) references tab1(i))engine=innodb;

Open Workbench

Create new EER diagram

Reverse engineer

Connection will be fine ...

Now select the schema

You will get server error 111.

Looking into the shell with which you started the server you will find that server was crashed with segmentation fault.

Suggested fix:
...
[1 Apr 2010 12:20] Susanne Ebrecht
I forget to say ... server and workbench are on same machine. Simple localhost settings.
[1 Apr 2010 17:04] Michael G. Zinner
As this is a crash of the server and not Workbench, this seems to be a server bug.

Susanne, can you provide the general log so that you can get the SQL statements that crash the server? Also, what is the exact version of the server that crashes?

The server should crash from the mysql.exe command line as well. So please try to create a test case from a simple SQL script.
[6 Apr 2010 16:13] Valeriy Kravchuk
If this is a server bug now, please, indicate exact server version, 5.1.x, provide a repeatable test case (set of SQL statements to run) or, at least, error log from the server that proves we have a server problem here.
[8 Apr 2010 6:33] Susanne Ebrecht
It is not a server bug.

The problem is related to backward compatibility of connections.

All works fine after deleting .mysql/workbench and create new connection.