mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-14 07:06:28 +00:00
Merge branch '3.0' of percona.github.com:percona/percona-toolkit into 3.0
This commit is contained in:
@@ -2254,24 +2254,19 @@ report_jemalloc_enabled() {
|
|||||||
local JEMALLOC_LOCATION=''
|
local JEMALLOC_LOCATION=''
|
||||||
|
|
||||||
for PID in $(pidof mysqld); do
|
for PID in $(pidof mysqld); do
|
||||||
grep -qc jemalloc /proc/${PID}/environ || ldd $(which mysqld) 2>/dev/null | grep -qc jemalloc
|
grep -qc jemalloc /proc/${pid}/environ || ldd $(which mysqld) 2>/dev/null | grep -qc jemalloc
|
||||||
JEMALLOC_STATUS=$?
|
jemalloc_status=$?
|
||||||
if [ $JEMALLOC_STATUS = 1 ]; then
|
if [ $jemalloc_status = 1 ]; then
|
||||||
echo "jemalloc is not enabled in MySQL config for process with ID ${PID}"
|
echo "jemalloc is not enabled in mysql config for process with id ${pid}"
|
||||||
else
|
else
|
||||||
echo "jemalloc enabled in MySQL config for process with ID ${PID}"
|
echo "jemalloc enabled in mysql config for process with id ${pid}"
|
||||||
GENERAL_JEMALLOC_STATUS=1
|
GENERAL_JEMALLOC_STATUS=1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ $GENERAL_JEMALLOC_STATUS = 1 ]; then
|
if [ $GENERAL_JEMALLOC_STATUS -eq 1 ]; then
|
||||||
for libjemall in "/usr/lib64" "/usr/lib/x86_64-linux-gnu" "/usr/lib"; do
|
JEMALLOC_LOCATION=$(find /usr/lib64/ /usr/lib/x86_64-linux-gnu /usr/lib -name "libjemalloc.*" 2>/dev/null | head -n 1)
|
||||||
if [ -r "$libjemall/libjemalloc.so.1" ]; then
|
if [ -z "$JEMALLOC_LOCATION" ]; then
|
||||||
JEMALLOC_LOCATION="$libjemall/libjemalloc.so.1"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [ -z $JEMALLOC_LOCATION ]; then
|
|
||||||
echo "Jemalloc library not found"
|
echo "Jemalloc library not found"
|
||||||
else
|
else
|
||||||
echo "Using jemalloc from $JEMALLOC_LOCATION"
|
echo "Using jemalloc from $JEMALLOC_LOCATION"
|
||||||
|
@@ -211,6 +211,7 @@ sub wipe_clean {
|
|||||||
|
|
||||||
$self->wait_for_slaves();
|
$self->wait_for_slaves();
|
||||||
|
|
||||||
|
$self->clear_genlogs();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1256,26 +1256,19 @@ report_jemalloc_enabled() {
|
|||||||
local JEMALLOC_LOCATION=''
|
local JEMALLOC_LOCATION=''
|
||||||
|
|
||||||
for PID in $(pidof mysqld); do
|
for PID in $(pidof mysqld); do
|
||||||
grep -qc jemalloc /proc/${PID}/environ || ldd $(which mysqld) 2>/dev/null | grep -qc jemalloc
|
grep -qc jemalloc /proc/${pid}/environ || ldd $(which mysqld) 2>/dev/null | grep -qc jemalloc
|
||||||
JEMALLOC_STATUS=$?
|
jemalloc_status=$?
|
||||||
if [ $JEMALLOC_STATUS = 1 ]; then
|
if [ $jemalloc_status = 1 ]; then
|
||||||
echo "jemalloc is not enabled in MySQL config for process with ID ${PID}"
|
echo "jemalloc is not enabled in mysql config for process with id ${pid}"
|
||||||
else
|
else
|
||||||
echo "jemalloc enabled in MySQL config for process with ID ${PID}"
|
echo "jemalloc enabled in mysql config for process with id ${pid}"
|
||||||
GENERAL_JEMALLOC_STATUS=1
|
GENERAL_JEMALLOC_STATUS=1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ $GENERAL_JEMALLOC_STATUS = 1 ]; then
|
if [ $GENERAL_JEMALLOC_STATUS -eq 1 ]; then
|
||||||
# Check location for libjemalloc.so.1
|
JEMALLOC_LOCATION=$(find /usr/lib64/ /usr/lib/x86_64-linux-gnu /usr/lib -name "libjemalloc.*" 2>/dev/null | head -n 1)
|
||||||
#for libjemall in "${SCRIPT_PWD}/lib/mysql" "/usr/lib64" "/usr/lib/x86_64-linux-gnu" "/usr/lib"; do
|
if [ -z "$JEMALLOC_LOCATION" ]; then
|
||||||
for libjemall in "/usr/lib64" "/usr/lib/x86_64-linux-gnu" "/usr/lib"; do
|
|
||||||
if [ -r "$libjemall/libjemalloc.so.1" ]; then
|
|
||||||
JEMALLOC_LOCATION="$libjemall/libjemalloc.so.1"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [ -z $JEMALLOC_LOCATION ]; then
|
|
||||||
echo "Jemalloc library not found"
|
echo "Jemalloc library not found"
|
||||||
else
|
else
|
||||||
echo "Using jemalloc from $JEMALLOC_LOCATION"
|
echo "Using jemalloc from $JEMALLOC_LOCATION"
|
||||||
|
@@ -24,5 +24,5 @@ report-host = 127.0.0.1
|
|||||||
report-port = PORT
|
report-port = PORT
|
||||||
log-error = /tmp/PORT/data/mysqld.log
|
log-error = /tmp/PORT/data/mysqld.log
|
||||||
innodb_lock_wait_timeout = 3
|
innodb_lock_wait_timeout = 3
|
||||||
#general_log
|
general_log
|
||||||
#general_log_file = genlog
|
general_log_file = genlog
|
||||||
|
@@ -24,6 +24,6 @@ report-host = 127.0.0.1
|
|||||||
report-port = PORT
|
report-port = PORT
|
||||||
log-error = /tmp/PORT/data/mysqld.log
|
log-error = /tmp/PORT/data/mysqld.log
|
||||||
innodb_lock_wait_timeout = 3
|
innodb_lock_wait_timeout = 3
|
||||||
#general_log
|
general_log
|
||||||
#general_log_file = genlog
|
general_log_file = genlog
|
||||||
secure-file-priv =
|
secure-file-priv =
|
||||||
|
@@ -24,8 +24,8 @@ report-host = 127.0.0.1
|
|||||||
report-port = PORT
|
report-port = PORT
|
||||||
log-error = /tmp/PORT/data/mysqld.log
|
log-error = /tmp/PORT/data/mysqld.log
|
||||||
innodb_lock_wait_timeout = 3
|
innodb_lock_wait_timeout = 3
|
||||||
#general_log
|
general_log
|
||||||
#general_log_file = genlog
|
general_log_file = genlog
|
||||||
#lower_case_table_names = 0
|
#lower_case_table_names = 0
|
||||||
#slow-query-log = 0
|
#slow-query-log = 0
|
||||||
#slow-query-log-file = /tmp/PORT/data/slow.log
|
#slow-query-log-file = /tmp/PORT/data/slow.log
|
||||||
|
@@ -173,9 +173,9 @@ SKIP: {
|
|||||||
d => $DBD::mysql::VERSION ge '4.001' ? undef : '(7)',
|
d => $DBD::mysql::VERSION ge '4.001' ? undef : '(7)',
|
||||||
dt => undef,
|
dt => undef,
|
||||||
ts => undef,
|
ts => undef,
|
||||||
c => '(1)',
|
c => '(3)',
|
||||||
c2 => '(15)',
|
c2 => '(45)',
|
||||||
v => '(32)',
|
v => '(96)',
|
||||||
t => undef,
|
t => undef,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@@ -16,6 +16,7 @@ use Quoter;
|
|||||||
use PerconaTest;
|
use PerconaTest;
|
||||||
use DSNParser;
|
use DSNParser;
|
||||||
use Sandbox;
|
use Sandbox;
|
||||||
|
|
||||||
my $dp = new DSNParser(opts=>$dsn_opts);
|
my $dp = new DSNParser(opts=>$dsn_opts);
|
||||||
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
|
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
|
||||||
my $dbh = $sb->get_dbh_for('master');
|
my $dbh = $sb->get_dbh_for('master');
|
||||||
@@ -173,6 +174,12 @@ SKIP: {
|
|||||||
$dbh->do('CREATE DATABASE IF NOT EXISTS serialize_test');
|
$dbh->do('CREATE DATABASE IF NOT EXISTS serialize_test');
|
||||||
$dbh->do('DROP TABLE IF EXISTS serialize_test.serialize');
|
$dbh->do('DROP TABLE IF EXISTS serialize_test.serialize');
|
||||||
$dbh->do('CREATE TABLE serialize_test.serialize (id INT, textval TEXT, blobval BLOB)');
|
$dbh->do('CREATE TABLE serialize_test.serialize (id INT, textval TEXT, blobval BLOB)');
|
||||||
|
# Ensure we are using lantin1 as the default for the connection
|
||||||
|
# From the documentation:
|
||||||
|
# This statement sets the three session system variables character_set_client,
|
||||||
|
# character_set_connection, and character_set_results to the given character set.
|
||||||
|
$dbh->do("SET NAMES 'latin1'");
|
||||||
|
warn Data::Dumper::Dumper($dbh);
|
||||||
|
|
||||||
my $sth = $dbh->prepare(
|
my $sth = $dbh->prepare(
|
||||||
"INSERT INTO serialize_test.serialize VALUES (?, ?, ?)"
|
"INSERT INTO serialize_test.serialize VALUES (?, ?, ?)"
|
||||||
|
@@ -277,5 +277,3 @@ report-port = 12345
|
|||||||
log-error = mysqld.log
|
log-error = mysqld.log
|
||||||
innodb_lock_wait_timeout = 3
|
innodb_lock_wait_timeout = 3
|
||||||
# Memory management library ##################################
|
# Memory management library ##################################
|
||||||
Jemalloc library not found
|
|
||||||
# The End ####################################################
|
|
||||||
|
@@ -220,5 +220,3 @@ report-port = 12345
|
|||||||
log-error = mysqld.log
|
log-error = mysqld.log
|
||||||
innodb_lock_wait_timeout = 3
|
innodb_lock_wait_timeout = 3
|
||||||
# Memory management library ##################################
|
# Memory management library ##################################
|
||||||
Jemalloc library not found
|
|
||||||
# The End ####################################################
|
|
||||||
|
@@ -219,5 +219,3 @@ report-port = 12345
|
|||||||
log-error = mysqld.log
|
log-error = mysqld.log
|
||||||
innodb_lock_wait_timeout = 3
|
innodb_lock_wait_timeout = 3
|
||||||
# Memory management library ##################################
|
# Memory management library ##################################
|
||||||
Jemalloc library not found
|
|
||||||
# The End ####################################################
|
|
||||||
|
@@ -292,5 +292,3 @@ report-port = 12345
|
|||||||
log-error = mysqld.log
|
log-error = mysqld.log
|
||||||
innodb_lock_wait_timeout = 3
|
innodb_lock_wait_timeout = 3
|
||||||
# Memory management library ##################################
|
# Memory management library ##################################
|
||||||
Jemalloc library not found
|
|
||||||
# The End ####################################################
|
|
||||||
|
@@ -341,5 +341,3 @@ log_queries_not_using_indexes | OFF
|
|||||||
# Configuration File #########################################
|
# Configuration File #########################################
|
||||||
Config File | Cannot autodetect or find, giving up
|
Config File | Cannot autodetect or find, giving up
|
||||||
# Memory management library ##################################
|
# Memory management library ##################################
|
||||||
Jemalloc library not found
|
|
||||||
# The End ####################################################
|
|
||||||
|
@@ -295,5 +295,3 @@ log_queries_not_using_indexes | OFF
|
|||||||
# Configuration File #########################################
|
# Configuration File #########################################
|
||||||
Config File | Cannot autodetect or find, giving up
|
Config File | Cannot autodetect or find, giving up
|
||||||
# Memory management library ##################################
|
# Memory management library ##################################
|
||||||
Jemalloc library not found
|
|
||||||
# The End ####################################################
|
|
||||||
|
Reference in New Issue
Block a user