Mysql在5.0.37以后开始支持Query Profiler,但我的版本5.0.83好像还是不行,可能是与OS有关(猜测)
# uname -a
SunOS slave0 5.10 Generic_127128-11 i86pc i386 i86pc
mysql> set profiling=1;
ERROR 1193 (HY000): Unknown system variable ‘profiling’
Mysql在fix这Bug #28288(http://bugs.mysql.com/bug.php?id=28288)之前,版本5.1.18-BK, 6.0.1-BK,都不能使用Query Profiler。
下面看一不同版本情况
Linux:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 14129
Server version: 5.0.77-log Source distributionType ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
root@(none) 02:57:48>set profiling =1;
Query OK, 0 rows affected (0.00 sec)Linux:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.34-ndb-7.0.6-cluster-gpl MySQL Cluster Server (GPL)Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> set profiling=1;
Query OK, 0 rows affected (0.00 sec)
在这两个版本之间版本5.0.83不行,只是5.0.83安装在solaris上
找了台linux机器,装了5.0.83
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.83-community MySQL Community Edition (GPL)Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> set profiling=1;
Query OK, 0 rows affected (0.00 sec)
可以的,没有问题!!!
这个应该是Bug了,估计没有solaris平台上测试。
不是系统的关系,这个好像是安装的问题,在编译时有时候此选项没打开
I appreciate the work that you have put in, in this page. Really good, also I wish to quote a few lines from this article in my site, I will give a link back to this article. Again.. it is really a good work.
Thanks
Ajithkumar