# tcpdump and mk-query-digest

**URL:** <https://forums.percona.com/t/tcpdump-and-mk-query-digest/1276>\
**Category:** Other MySQL® Questions\
**Created:** [October 12, 2009, 8:24am UTC](https://forums.percona.com/t/tcpdump-and-mk-query-digest/1276 "2009-10-12T08:24:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gunnar](https://avatars.discourse-cdn.com/v4/letter/g/ed655f/32.png) [@gunnar](https://forums.percona.com/u/gunnar)\
**Post date:** [October 12, 2009, 8:24am UTC](https://forums.percona.com/t/tcpdump-and-mk-query-digest/1276/1 "2009-10-12T08:24:10Z")

</div>

Hi,

First of all tank you a lot for the maatkit tools. )

I sometimes use tcpdump and mk-query-digest do create a load-snapshots. This is very useful on old 5.0 installetions.  
I use these snapshots for example to benchmark certain config parameter changes.

Could it be that MK-QUERY-DIGEST does not normally print out Init\_DB (0x02) commands? Or am I overlooking something?

The Maatkit sources are easy to read, so its was simple for me to add this output to MK-QUERY-DIGEST, so that “USE xyz” is written in the playbak sql stream.

Just to verify does it make sense to send a patch for this or is there another more elegant way for this which I’m not aware of?

Cheers

---

<div class="post-metadata">

**Author:** ![xaprb](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@xaprb](https://forums.percona.com/u/xaprb)\
**Post date:** [November 20, 2009, 6:56am UTC](https://forums.percona.com/t/tcpdump-and-mk-query-digest/1276/2 "2009-11-20T06:56:06Z")

</div>

Hi Gunnar,

It sounds like a bug. Can you bring this up on the maatkit mailing list and/or submit an issue report with a test case?
