Bug #43416 log_slow_queries option disregarded in my.ini under Vista
Submitted: 5 Mar 2009 14:28 Modified: 6 Mar 2009 9:04
Reporter: Csete Béla Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:5.1.30, 5.1.32 OS:Windows (Vista)
Assigned to: CPU Architecture:Any

[5 Mar 2009 14:28] Csete Béla
Description:
Settings in my.ini is not taken in consideration. 

log_slow_queries = {path to writable directory}/mysql_slow_queries.log
long_query_time=0.001
log-queries-not-using-indexes

Same settings work OK with same MySQL version on Windows XP SP3 and Ubuntu.

How to repeat:
I have installed both versions of MySql Server Community Edition using windows installer. 5.1.30 came with a Setup.exe in a ZIP, 5.1.32 with an MSI.
Following the installation, I have a service with the following executable path: 

"C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld" --defaults-file="C:\Program Files\MySQL\MySQL Server 5.1\my.ini" MySQL

I added the following lines to "C:\Program Files\MySQL\MySQL Server 5.1\my.ini":

log_slow_queries = {path to writable directory}/mysql_slow_queries.log
long_query_time=0.001
log-queries-not-using-indexes

After service restart, checked with mysqladmin -uroot -p variables, got the following result (snippet):

 log_queries_not_using_indexes   | OFF                                                            |
 log_slow_queries                | OFF                                                            |
 long_query_time                 | 10.000000                                                      |

The log file is also empty. 

Done the same configuration on latest ubuntu stable release and on Windows XP SP3 using MySql Community Edition v5.1.30, the results were as expected.
[5 Mar 2009 21:38] MySQL Verification Team
Please upload entire my.ini as a file to the bug.  It looks like the option might be in the wrong section, instead of [mysqld], for example.
[6 Mar 2009 8:22] Csete Béla
my.ini configuration file

Attachment: my.ini (application/octet-stream, text), 8.71 KiB.

[6 Mar 2009 8:23] Csete Béla
Thank you for your comment.

As you can see from the uploaded my.ini, the settings are indeed in group [mysqld].
[6 Mar 2009 8:30] MySQL Verification Team
I don't see them in there....
[6 Mar 2009 9:04] Csete Béla
You are right. It is very confusing, however it is not a MySQL bug.

I edited directly the my.ini file with PSPad in the system folder. It looked like it saved it. After closing PSPad and than reopening the file with it I saw the changes. So I was confident I edited it.

Now I see saving my.ini in its original location requires admin rights, which didn't result in an error in PSPad, like it does in vanilla Notepad. 

Sorry for your time, I hate when this happens.