mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 21:19:59 +00:00
Fixed pt-stalk mysql version comparisson
This commit is contained in:
@@ -907,10 +907,9 @@ collect() {
|
|||||||
log "Loop start: $(date +'TS %s.%N %F %T')"
|
log "Loop start: $(date +'TS %s.%N %F %T')"
|
||||||
local start_time=$(date +'%s')
|
local start_time=$(date +'%s')
|
||||||
local curr_time=$start_time
|
local curr_time=$start_time
|
||||||
local ps_instrumentation_enabled=$($CMD_MYSQL $EXT_ARGV -e 'SELECT ENABLED FROM performance_schema.setup_instruments WHERE NAME = "transaction";' \
|
local ps_instrumentation_enabled=$($CMD_MYSQL $EXT_ARGV -e "SELECT ENABLED FROM performance_schema.setup_instruments WHERE NAME = 'transaction';" | sed '2q;d' | sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/')
|
||||||
| sed "2q;d" | sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/')
|
|
||||||
|
|
||||||
if [ $ps_instrumentation_enabled != "yes"]; then
|
if [ $ps_instrumentation_enabled != "yes" ]; then
|
||||||
log "Performance Schema instrumentation is disabled"
|
log "Performance Schema instrumentation is disabled"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -956,7 +955,7 @@ collect() {
|
|||||||
(echo $ts; transactions) >>"$d/$p-transactions" &
|
(echo $ts; transactions) >>"$d/$p-transactions" &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ [ "${mysql_version}" '>' "5.6" ] && [ $ps_instrumentation_enabled == "yes"] ]; then
|
if [ "${mysql_version}" '>' "5.6" ] && [ $ps_instrumentation_enabled == "yes" ]; then
|
||||||
ps_locks_transactions "$d/$p-ps-locks-transactions"
|
ps_locks_transactions "$d/$p-ps-locks-transactions"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@@ -1,10 +1,13 @@
|
|||||||
/* This enables perfomance schema without a server restart */
|
/* This enables perfomance schema without a server restart */
|
||||||
UPDATE performance_schema.setup_consumers SET enabled='YES' WHERE NAME = 'events_waits_current';
|
UPDATE performance_schema.setup_consumers SET ENABLED = 'YES' WHERE NAME = 'events_waits_current';
|
||||||
|
|
||||||
/* Enable instrumentation */
|
/* Enable instrumentation */
|
||||||
UPDATE performance_schema.setup_consumers SET ENABLED='YES' WHERE NAME LIKE '%events_transactions%';
|
|
||||||
UPDATE performance_schema.setup_consumers SET ENABLED='YES' WHERE NAME LIKE '%events_transactions%';
|
UPDATE performance_schema.setup_instruments set ENABLED = 'YES', TIMED = 'YES' WHERE NAME = 'wait/lock/metadata/sql/mdl';
|
||||||
UPDATE performance_schema.setup_instruments SET ENABLED='YES' WHERE NAME = 'wait/lock/metadata/sql/mdl';
|
UPDATE performance_schema.setup_instruments SET ENABLED = 'YES', TIMED = 'YES' WHERE NAME = 'transaction';
|
||||||
|
UPDATE performance_schema.setup_consumers SET ENABLED = 'YES' WHERE NAME LIKE 'events_transactions%';
|
||||||
|
UPDATE performance_schema.setup_consumers SET ENABLED = 'YES' WHERE NAME LIKE '%events_transactions%';
|
||||||
|
FLUSH TABLES;
|
||||||
|
|
||||||
CREATE SCHEMA IF NOT EXISTS test;
|
CREATE SCHEMA IF NOT EXISTS test;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user