周梦康 发表于 2019-03-09 593 次浏览

看到 mysql 源码目录里有一个dbug目录,搜索相关关键字发现这个软件是 https://sourceforge.net/projects/dbug/

参看官方手册上如是说

在客户端调试,可以使用如下命令

mysql --debug=d:t:O,/tmp/client.trace

实际测试了下

[root@bogon ~]# mysql -uroot -p123456 test --debug=d:t:O,/tmp/client.trace
...
mysql> select aid,sum(pv) as num from article_rank force index(idx_aid_day_pv) where day>20181223 group by aid order by num desc LIMIT 10;
[root@bogon ~]# tail -f /tmp/client.trace
| | >mysql_next_result
| | <mysql_next_result 5035
| <add_line 2799
| >my_free
| | my: ptr: 0x2acda50
| <my_free 292
| >my_raw_malloc
| | my: size: 40  my_flags: 16
| | exit: ptr: 0x2acda50
| <my_raw_malloc 219
| >find_command
| | enter: name: 'select aid,sum(pv) as num from article_rank force index(idx_aid_day_pv) where day>20181223 group by aid order by num desc LIMIT 10;'
| <find_command 2477
| >add_line
....

http://www.cnblogs.com/UnGeek/archive/2013/04/14/3020617.html
https://dev.mysql.com/doc/refman/5.7/en/debugging-client.html

评论列表