Bug #25624 Sql-mode parameter in MySQL Administrator
Submitted: 15 Jan 2007 11:55 Modified: 15 Jan 2007 13:46
Reporter: hervé déprez Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Administrator Severity:S2 (Serious)
Version:1.2.5 rc OS:Windows (Windows XP pro/sp2)
Assigned to: CPU Architecture:Any

[15 Jan 2007 11:55] hervé déprez
Description:
Mysql version: MySQL 5.0.27-community-nt via TCP/IP and Mysql 5.0.24a
Mysql Administrator version: 1.2.5 rc

When you enable 'Sql Mode' option in tab 'Advanced' from 'Startup Variables', You don't get the value present in the file my.ini showed
(in my cause: sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" are the default parameters)

So When you change this value (in my case adding NO_BACKSLASH_ESCAPE), the value in the file my.ini is overwrited instead of appended (and the quotes disappears).

When trying to restart the mysql service from the Mysql Administrator, We have no error messages in the EventLog and nothing is done (the service keep in state stopped)
so this cause the mysql administrator to be unable to connect to the sql server.

When trying to start manually the Mysql server service from the console (windows console), the service start but we can't connect to the server with the Mysql Administrator:

we get an error box with this text:
"Either the server service or the configuration file could not be found. Startup variables and service section are therefore disabled"

If we open the my.ini file, we can see that many options are now commented(like datadirs/port/etc...) so the server can't start anymore.

How to repeat:
change Sql-Mode parameter (or any others) and try to restart MySql Server

Suggested fix:
This problem can be easily fixed by showing the initial value from the ini file directly when you select the SQL-Mode option, so the user can append his parameters instead of replacing it. and have problems.

If you can do the same for all other options it will be fine (all options values from my.ini doesn't show in Mysql Administrator when you check the box)

Replacing my.ini with the backup file is helpful too.
[15 Jan 2007 12:36] Sveta Smirnova
Thank you for the report.

In MySQL Administrator were introduced many bug fixes since 1.2.5 version.

Please try using current 1.2.8 MySQL Administrator and inform us about the result.
[15 Jan 2007 13:42] hervé déprez
Using Mysql Administrator 1.2.8 solve this problem.

(my.ini correctly updated, server ok)

-> you can close this bug request
[15 Jan 2007 13:46] Sveta Smirnova
Thank you for the feedback.

The bug report is closed.
[1 Mar 2007 22:24] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/20953