Bug #99753 The Workbenchs Table Inspector causes MySQL Server instance stops working
Submitted: 1 Jun 2020 12:50 Modified: 1 Jun 2020 17:45
Reporter: Juan Leiva Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S2 (Serious)
Version:8.0.20 OS:Windows (Microsoft Windows 10 Pro)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[1 Jun 2020 12:50] Juan Leiva
Description:
----[For better reports, please attach the log file after submitting. You can find it in C:\Users\Andres\AppData\Roaming\MySQL\Workbench\log\wb.log]

I've tryied with two different instances. The MySQL server works just fine, but whenever I right click on a table to use the Table Inspector, I receive a message stating it couldn't connect to the database and the status of the instance changes to Stopped.

This is happening with an imported schema, a default schema which came along with the installation (sakila), and a custom schema I build for this purpose.

Additional note: When it gets disconected, after clicking the table inspector button, workbench start spamming warnings stating it could not connect to the database until I run the instance again.

Workaround:
If I click alter table, it get's the table columns perfectly fine. And if I rightclick the database I can still use the Schema Inspector. The problem seems to be exclusive of the Table Inspector.

How to repeat:
Create a localhost instance, using port 3306.
Create a schema, and add a table. Then add a field (ie: Id INT Primary key, not null, auto incremental). Apply changes and execute.
Find your schema in the lefthand panel navigator. Expand your schema, and then the tables list.
Now I've tryied two different things with similar outcomes:
1) Right clicking on the table, and selecting the option from the contextual menu "Table Inspector").
2) Hover the table and click the "i" button.

This causes my instance to stop, and my Workbench to prompt a warning stating
"MySQL Error"
An error occurred retrieving information about the schema.
Query: select `COLUMN_NAME`,`COLUMN_TYPE`,`COLUMN_DEFAULT`,`IS_NULLABLE`,`CHARACTER_SET_NAME`,`COLLATION_NAME`,`PRIVILEGES`,`EXTRA`,`COLUMN_COMMENT` from information_schema.columns where table_schema = '[schema_name]' and table_name = '[table_name]'
Error: Unable to connect to localhost:3306
[1 Jun 2020 13:05] Juan Leiva
This is the last part of the wb.log file.

09:46:21 [ERR][sqlide_tableman_ext.py:refresh:302]: SELECT @@datadir datadir,sd.path FROM information_schema.INNODB_TABLES st JOIN information_schema.innodb_datafiles sd USING(space) WHERE st.name = 'digicred/test'': ('Lost connection to MySQL server during query', 2013)
09:46:45 [ERR][sqlide_tableman_ext.py:show_table:750]: Cannot execute SHOW INDEX FROM `digicred`.`test`: ('Unable to connect to localhost:3306', 2003)
09:46:47 [ERR][sqlide_tableman_ext.py:show_table:821]: Cannot execute SHOW COLUMNS FROM `digicred`.`test`: ('Unable to connect to localhost:3306', 2003)
[1 Jun 2020 15:27] MySQL Verification Team
Thank you for the bug report. Which is the server version are you connecting to?.
[1 Jun 2020 15:48] Juan Leiva
My MySQL Server version is 8.0.20. As far as I know it's the latest now.
[1 Jun 2020 15:56] MySQL Verification Team
Thank you for the feedback. I wasn't able to repeat with my own table, please provide the create table statement (private if you wish).
[1 Jun 2020 17:32] Juan Leiva
Update:
I handled to overcome this issue.
Since I'm working on a dev enviroment, I was able to erase every trace of my MySQL installation.

I've deleted my schemas and instances, after creating a backup in a satellite server we have. And using the MySQL Installation remove every related product. Restarted the OS and then reinstalled all the tools I needed.

I've been looking for the origin of the issue, and couldn't find much. One of the things that popped out was the Instance configuration in the Workbench. In the Connection tab, under Advanced there is a box for "Others" which has the following content:

DbSqlEditor:LastDefaultSchema=digi
lastConnected=1591031961
serverVersion=8.0.20

Prior to the reinstalling, the server version was empty. I don't know if that might be related, but it's the only difference I see in the configuration.
[1 Jun 2020 17:42] MySQL Verification Team
Table Inspector

Attachment: 99753.png (image/png, text), 102.59 KiB.

[1 Jun 2020 17:45] MySQL Verification Team
Thank you for the feedback. I couldn't repeat, if you will find a way to repeat the issue consistently, please provide the information to repeat it.