mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 13:11:32 +00:00
Fixed pt-stalk mysql version comparisson
This commit is contained in:
@@ -907,8 +907,7 @@ collect() {
|
||||
log "Loop start: $(date +'TS %s.%N %F %T')"
|
||||
local start_time=$(date +'%s')
|
||||
local curr_time=$start_time
|
||||
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/')
|
||||
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/')
|
||||
|
||||
if [ $ps_instrumentation_enabled != "yes" ]; then
|
||||
log "Performance Schema instrumentation is disabled"
|
||||
@@ -956,7 +955,7 @@ collect() {
|
||||
(echo $ts; transactions) >>"$d/$p-transactions" &
|
||||
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"
|
||||
fi
|
||||
|
||||
|
@@ -1,10 +1,13 @@
|
||||
/* 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 */
|
||||
|
||||
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', 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%';
|
||||
UPDATE performance_schema.setup_consumers SET ENABLED='YES' WHERE NAME LIKE '%events_transactions%';
|
||||
UPDATE performance_schema.setup_instruments SET ENABLED='YES' WHERE NAME = 'wait/lock/metadata/sql/mdl';
|
||||
FLUSH TABLES;
|
||||
|
||||
CREATE SCHEMA IF NOT EXISTS test;
|
||||
|
||||
|
Reference in New Issue
Block a user