Bug #76992 Connection 5.7.7-rc not supported
Submitted: 10 May 2015 11:22 Modified: 4 Mar 2016 13:00
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:6.3.1.0 build 404 OS:Any
Assigned to: CPU Architecture:Any

[10 May 2015 11:22] Daniël van Eeden
Description:
When connecting to a 5.7.7-rc I get this message:

===================================
Connection Warning (5.7.7-rc)

Incompatible/nonstandard server version or connection protocol detected ().

A connection to this database can be established but some MySQL Workbench features may not work properly since the database is not fully compatible with the supported versions of MySQL.

MySQL Workbench is developed and tested for MySQL Server versions 5.1, 5.5, 5.6 and 5.7
===================================

When I then choose 'Continue Anyway':

For 'Management' options:
===================================
Error Starting Workbench Administrator
KeyError: 'version'
===================================

For 'Performance' options:
===================================
Dashboard
This feature requires MySQL version 5.6.6 or newer
===================================

Output of VERSION(): 5.7.7-rc-debug

The issues here:
* KeyError is wrong, it should catch that and return a more useful error
* 5.6.6 or newer? Then it should work on 5.7.7!
* It should tell me what is non-standard about my server version
* It should let me use the performance options (e.g. a 'Continue Anyway' button), even w/o a supported version.

How to repeat:
On Ubuntu 14.10 connect to a debug version of 5.7.7-rc and try to use admin and performance features of WB
[10 May 2015 11:24] Daniël van Eeden
Traceback (most recent call last):
  File "/usr/lib/mysql-workbench/modules/wb_admin_grt.py", line 257, in _dock_admin_tab
    self.ctrl_be.init()
  File "/usr/lib/mysql-workbench/modules/wb_admin_control.py", line 264, in init
    self.connect_sql()
  File "/usr/lib/mysql-workbench/modules/wb_admin_control.py", line 463, in connect_sql
    self.query_server_info()
  File "/usr/lib/mysql-workbench/modules/wb_admin_control.py", line 623, in query_server_info
    self.raw_version = self.server_variables["version"]
KeyError: 'version'
[10 May 2015 11:28] Daniël van Eeden
The issue here seems to be that show_compatibility_56 is off and WB tries to read the session variables 'version', but should read the global 'version' variable instead.
[10 May 2015 11:40] Daniël van Eeden
Patch to get some functions back

Attachment: wb_57_nocompat56.patch (text/x-diff), 1.69 KiB.

[10 May 2015 11:50] Daniël van Eeden
Patch to get some functions back

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: wb_57_nocompat56.patch (text/x-diff), 1.69 KiB.

[10 May 2015 12:36] Daniël van Eeden
Updated patch

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: wb_57_nocompat56.patch (text/x-diff), 5.05 KiB.

[10 May 2015 12:37] Daniël van Eeden
The latest patch contains also the patch for Bug #76992
[10 May 2015 13:01] Daniël van Eeden
Correction for my last comment:
The latest patch contains also the patch for Bug #76992
[10 May 2015 13:01] Daniël van Eeden
And the correction for my last correction:
The latest patch contains also the patch for Bug #76993
[10 May 2015 13:49] Daniël van Eeden
Part 2 of the patch (non-python stuff)

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: wb_57_nocompat56_part2.patch (text/x-diff), 4.48 KiB.

[10 May 2015 14:18] Daniël van Eeden
Updated patch

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: wb_57_nocompat56_part2.patch (text/x-diff), 5.09 KiB.

[10 May 2015 14:22] Daniël van Eeden
There is just one exception left:

16:18:49 [ERR][wb_admin_main.py:tab_changed:204]: Unhandled exception in Admin for <wb_admin_performance_dashboard.WbAdminDashboard; proxy of <Swig Object of type 'mforms::Box *' at 0x7fd6ff160e40> >: Traceback (most recent call last):
  File "/opt/wb/lib/mysql-workbench/modules/wb_admin_main.py", line 201, in tab_changed
    panel.page_activated()
  File "/opt/wb/lib/mysql-workbench/modules/wb_admin_utils.py", line 135, in page_activated
    self.create_ui()
  File "/opt/wb/lib/mysql-workbench/modules/wb_admin_performance_dashboard.py", line 570, in create_ui
    w.init(init_calc(init_expr).handle(self.ctrl_be.server_variables, None))
  File "/opt/wb/lib/mysql-workbench/modules/wb_admin_performance_dashboard.py", line 239, in handle
    value = eval(self.expr % values)
KeyError: 'max_connections'
[11 May 2015 7:40] MySQL Verification Team
Hello Daniël,

Thank you for the report and contribution.

Thanks,
Umesh
[11 May 2015 15:16] Daniël van Eeden
My patch(es) will make workbench work with 5.7 with 5.6-compat off, but maybe the code should be improved to generate a warning/error if it can't read the version of the dbms product.
[4 Mar 2016 13:00] Mike Lischke
Obsolete because of new GA releases.