Comment 13 for bug 1402776

Revision history for this message
Ovais Tariq (ovais-tariq) wrote :

Here is some more bash foo in case you want to parse the schema names correctly and you know what the schema names are like:

/usr/bin/pt-query-digest --type tcpdump mysql.tcp --output slowlog | sed 's/\(^use schema_name\).*/\1 /g' | awk '{ if($0 ~ /use schema_name/) {print $1" "$2} else { print $0 } }'