Bug #67484 MySQL long query time is not updating
Submitted: 6 Nov 2012 11:53 Modified: 6 Nov 2012 12:34
Reporter: Anil Alpati Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version: OS:Any (5.0,5.1)
Assigned to: CPU Architecture:Any

[6 Nov 2012 11:53] Anil Alpati
Description:
Currently i have disabled long_query_time in config file. 
And 
I have setup the value of long_query_time parameter globally like below 

mysql> show global variables like '%long%';
+-----------------+-----------+
| Variable_name   | Value     |
+-----------------+-----------+
| long_query_time | 10.000000 |
+-----------------+-----------+
1 row in set (0.00 sec)

mysql> set global long_query_time=1;
Query OK, 0 rows affected (0.00 sec)

mysql> show global variables like '%long%';
+-----------------+----------+
| Variable_name   | Value    |
+-----------------+----------+
| long_query_time | 1.000000 |
+-----------------+----------+
1 row in set (0.00 sec)

mysql> \q
Bye

C:\Users\345966>net stop mysql3306
The MYSQL3306 service is stopping.
The MYSQL3306 service was stopped successfully.

mysql> show global variables like '%long%';
+-----------------+-----------+
| Variable_name   | Value     |
+-----------------+-----------+
| long_query_time | 10.000000 |
+-----------------+-----------+
1 row in set (0.00 sec)

mysql> set global long_query_time=1;
Query OK, 0 rows affected (0.00 sec)

mysql> show global variables like '%long%';
+-----------------+----------+
| Variable_name   | Value    |
+-----------------+----------+
| long_query_time | 1.000000 |
+-----------------+----------+
1 row in set (0.00 sec)

mysql> \q
Bye

C:\Users\345966>net stop mysql3306
The MYSQL3306 service is stopping.
The MYSQL3306 service was stopped successfully.

C:\Users\345966>mysql -uroot -panivar
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.32-community-log MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show global variables like '%long%';
+-----------------+-----------+
| Variable_name   | Value     |
+-----------------+-----------+
| long_query_time | 10.000000 |
+-----------------+-----------+
1 row in set (0.00 sec)

mysql>

When i restart mysql service it is getting cleared and showing up as "10". Though it is not reading from config file since i have disabled.

Currently I am using version  
mysql> \s
--------------
mysql  Ver 14.14 Distrib 5.1.32, for Win32 (ia32)

Connection id:          1
Current database:
Current user:           root@localhost
SSL:                    Not in use
Using delimiter:        ;
Server version:         5.1.32-community-log MySQL Community Server (GPL)
Protocol version:       10
Connection:             localhost via TCP/IP
Server characterset:    utf8
Db     characterset:    utf8
Client characterset:    latin1
Conn.  characterset:    latin1
TCP port:               3306
Uptime:                 1 min 50 sec

Threads: 1  Questions: 5  Slow queries: 0  Opens: 15  Flush tables: 1  Open tabl
es: 8  Queries per second avg: 0.45
--------------

How to repeat:
Same issue is applicable for windows and linux platforms.

Please reply at the earliest.

Thanks for the help!!!1
[6 Nov 2012 12:34] MySQL Verification Team
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php