Skip to content

Commit

Permalink
Update mysqld_query.py
Browse files Browse the repository at this point in the history
store the query in query[128] and printk("%s\n",query) instead of printk("%s\n",addr)
  • Loading branch information
SuperSix0 authored and yonghong-song committed Aug 16, 2019
1 parent 5ce16e4 commit 2479fbf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/tracing/mysqld_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
* see: https://dev.mysql.com/doc/refman/5.7/en/dba-dtrace-ref-query.html
*/
bpf_usdt_readarg(1, ctx, &addr);
bpf_trace_printk("%s\\n", addr);
bpf_probe_read(&query, sizeof(query), (void *)addr);
bpf_trace_printk("%s\\n", query);
return 0;
};
"""
Expand Down

0 comments on commit 2479fbf

Please sign in to comment.