Bug #49057 Crash on "Check section" for options without values
Submitted: 24 Nov 2009 19:16 Modified: 27 Nov 2009 11:01
Reporter: Kolbe Kegel Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S1 (Critical)
Version:5.2.8 Beta OS:Linux (mysql-workbench-oss-5.2.8-1ubu804-amd64.deb)
Assigned to: Alfredo Kojima CPU Architecture:Any

[24 Nov 2009 19:16] Kolbe Kegel
Description:
Workbench crashes when I click "Check section" in the New Server Profile dialog if there are any options in the specified my.cnf file that do not have values.

How to repeat:
Create a my.cnf file that has some options without values, such as these:

[mysqld]
log-bin
core-file

Check if mysqld section exists in /tmp/my.cnf
** Message: function call error
Traceback (most recent call last):
  File "/usr/lib/mysql-workbench/modules/wb_admin_grt.py", line 292, in testInstanceSettingByName
    parser.read([config_file])
  File "/usr/lib/python2.5/ConfigParser.py", line 267, in read
    self._read(fp, filename)
  File "/usr/lib/python2.5/ConfigParser.py", line 490, in _read
    raise e
ConfigParser.ParsingError: File contains parsing errors: /tmp/my.cnf
        [line  2]: 'log-bin\n'

glibmm-ERROR **: 
unhandled exception (type std::exception) in signal handler:
what: error calling WbAdmin.testInstanceSettingByName: see output for details

Suggested fix:
Clearly, the parser should support options that do not have values.
[27 Nov 2009 8:31] Johannes Taxacher
fixed in repository. will be included in 5.2.10
[27 Nov 2009 11:01] Tony Bedford
An entry has been added to the 5.2.10 changelog:

On the MySQL Config File page of the New Server Profile wizard, clicking Check section generated an exception if there were options in the MySQL configuration file that did not have values assigned:

Check if mysqld section exists in /tmp/my.cnf
** Message: function call error
Traceback (most recent call last):
  File "/usr/lib/mysql-workbench/modules/wb_admin_grt.py", line 292, in
testInstanceSettingByName
    parser.read([config_file])
  File "/usr/lib/python2.5/ConfigParser.py", line 267, in read
    self._read(fp, filename)
  File "/usr/lib/python2.5/ConfigParser.py", line 490, in _read
    raise e
ConfigParser.ParsingError: File contains parsing errors: /tmp/my.cnf
        [line  2]: 'log-bin\n'

glibmm-ERROR **: 
unhandled exception (type std::exception) in signal handler:
what: error calling WbAdmin.testInstanceSettingByName: see output for details