PT-1485 pt-mysql-summary has broken Security section in versions bigger then 5.6

This commit is contained in:
Carlos Salguero
2018-02-26 12:47:48 -03:00
parent 3fbdcfdf14
commit f5ef9d28c5
3 changed files with 10 additions and 1 deletions

View File

@@ -927,6 +927,9 @@ collect_mysql_processlist () {
collect_mysql_users () {
$CMD_MYSQL $EXT_ARGV -ss -e 'SELECT COUNT(*), SUM(user=""), SUM(password=""), SUM(password NOT LIKE "*%") FROM mysql.user' 2>/dev/null
if [ "$?" -ne 0 ]; then
$CMD_MYSQL $EXT_ARGV -ss -e 'SELECT COUNT(*), SUM(user=""), SUM(authentication_string=""), SUM(authentication_string NOT LIKE "*%") FROM mysql.user' 2>/dev/null
fi
}
collect_mysql_show_slave_hosts () {
@@ -2195,7 +2198,7 @@ report_jemalloc_enabled() {
local JEMALLOC_LOCATION=''
for PID in $(pidof mysqld); do
grep -qc jemalloc /proc/${PID}/environ || ldd $(which mysqld) | grep -qc jemalloc
grep -qc jemalloc /proc/${PID}/environ || ldd $(which mysqld) 2>/dev/null | grep -qc jemalloc
JEMALLOC_STATUS=$?
if [ $JEMALLOC_STATUS = 1 ]; then
echo "jemalloc is not enabled in MySQL config for process with ID ${PID}"