mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-26 23:45:44 +00:00
Merge pull request #190 from guriandoro/pt-stalk-collect-prepared-statements-LP1642750
pt stalk collect prepared statements lp1642750 (PT-90)
This commit is contained in:
@@ -100,9 +100,7 @@ collect() {
|
||||
$CMD_MYSQLADMIN $EXT_ARGV debug
|
||||
else
|
||||
log "Could not find the MySQL error log"
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
# Get a sample of these right away, so we can get these without interaction
|
||||
# with the other commands we're about to run.
|
||||
if [ "${mysql_version}" '>' "5.1" ]; then
|
||||
@@ -252,6 +250,10 @@ collect() {
|
||||
ps_locks_transactions "$d/$p-ps-locks-transactions"
|
||||
fi
|
||||
|
||||
if [ "${mysql_version}" '>' "5.6" ]; then
|
||||
(echo $ts; ps_prepared_statements) >> "$d/$p-prepared-statements" &
|
||||
fi
|
||||
|
||||
slave_status "$d/$p-slave-status" "${mysql_version}"
|
||||
|
||||
curr_time=$(date +'%s')
|
||||
@@ -430,6 +432,13 @@ ps_locks_transactions() {
|
||||
|
||||
}
|
||||
|
||||
ps_prepared_statements() {
|
||||
$CMD_MYSQL $EXT_ARGV -e "SELECT t.processlist_id, pse.* \
|
||||
FROM performance_schema.prepared_statements_instances pse \
|
||||
JOIN performance_schema.threads t \
|
||||
ON (pse.OWNER_THREAD_ID=t.thread_id)\G"
|
||||
}
|
||||
|
||||
slave_status() {
|
||||
local outfile=$1
|
||||
local mysql_version=$2
|
||||
|
Reference in New Issue
Block a user