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