diff --git a/bin/pt-mysql-summary b/bin/pt-mysql-summary index 30d5fe3a..24ffa558 100755 --- a/bin/pt-mysql-summary +++ b/bin/pt-mysql-summary @@ -2254,24 +2254,19 @@ report_jemalloc_enabled() { local JEMALLOC_LOCATION='' for PID in $(pidof mysqld); do - 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}" + 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}" 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 fi done - if [ $GENERAL_JEMALLOC_STATUS = 1 ]; 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 + if [ $GENERAL_JEMALLOC_STATUS -eq 1 ]; then + JEMALLOC_LOCATION=$(find /usr/lib64/ /usr/lib/x86_64-linux-gnu /usr/lib -name "libjemalloc.*" 2>/dev/null | head -n 1) + if [ -z "$JEMALLOC_LOCATION" ]; then echo "Jemalloc library not found" else echo "Using jemalloc from $JEMALLOC_LOCATION" diff --git a/lib/Sandbox.pm b/lib/Sandbox.pm index 474077e7..a809c60b 100644 --- a/lib/Sandbox.pm +++ b/lib/Sandbox.pm @@ -211,6 +211,7 @@ sub wipe_clean { $self->wait_for_slaves(); + $self->clear_genlogs(); return; } diff --git a/lib/bash/report_mysql_info.sh b/lib/bash/report_mysql_info.sh index 11776096..539bbd6a 100644 --- a/lib/bash/report_mysql_info.sh +++ b/lib/bash/report_mysql_info.sh @@ -1256,26 +1256,19 @@ report_jemalloc_enabled() { local JEMALLOC_LOCATION='' for PID in $(pidof mysqld); do - 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}" + 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}" 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 fi done - if [ $GENERAL_JEMALLOC_STATUS = 1 ]; then - # Check location for libjemalloc.so.1 - #for libjemall in "${SCRIPT_PWD}/lib/mysql" "/usr/lib64" "/usr/lib/x86_64-linux-gnu" "/usr/lib"; do - 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 + if [ $GENERAL_JEMALLOC_STATUS -eq 1 ]; then + JEMALLOC_LOCATION=$(find /usr/lib64/ /usr/lib/x86_64-linux-gnu /usr/lib -name "libjemalloc.*" 2>/dev/null | head -n 1) + if [ -z "$JEMALLOC_LOCATION" ]; then echo "Jemalloc library not found" else echo "Using jemalloc from $JEMALLOC_LOCATION" diff --git a/sandbox/servers/5.5/my.sandbox.cnf b/sandbox/servers/5.5/my.sandbox.cnf index 1e9cd5c8..f47ab48d 100644 --- a/sandbox/servers/5.5/my.sandbox.cnf +++ b/sandbox/servers/5.5/my.sandbox.cnf @@ -24,5 +24,5 @@ report-host = 127.0.0.1 report-port = PORT log-error = /tmp/PORT/data/mysqld.log innodb_lock_wait_timeout = 3 -#general_log -#general_log_file = genlog +general_log +general_log_file = genlog diff --git a/sandbox/servers/5.6/my.sandbox.cnf b/sandbox/servers/5.6/my.sandbox.cnf index 47e7a4e8..3ee3f791 100644 --- a/sandbox/servers/5.6/my.sandbox.cnf +++ b/sandbox/servers/5.6/my.sandbox.cnf @@ -24,6 +24,6 @@ report-host = 127.0.0.1 report-port = PORT log-error = /tmp/PORT/data/mysqld.log innodb_lock_wait_timeout = 3 -#general_log -#general_log_file = genlog +general_log +general_log_file = genlog secure-file-priv = diff --git a/sandbox/servers/5.7/my.sandbox.cnf b/sandbox/servers/5.7/my.sandbox.cnf index 1b31a348..97d4662d 100644 --- a/sandbox/servers/5.7/my.sandbox.cnf +++ b/sandbox/servers/5.7/my.sandbox.cnf @@ -24,8 +24,8 @@ report-host = 127.0.0.1 report-port = PORT log-error = /tmp/PORT/data/mysqld.log innodb_lock_wait_timeout = 3 -#general_log -#general_log_file = genlog +general_log +general_log_file = genlog #lower_case_table_names = 0 #slow-query-log = 0 #slow-query-log-file = /tmp/PORT/data/slow.log diff --git a/t/lib/MockSyncStream.t b/t/lib/MockSyncStream.t index c90f7d9d..79b7992d 100644 --- a/t/lib/MockSyncStream.t +++ b/t/lib/MockSyncStream.t @@ -173,9 +173,9 @@ SKIP: { d => $DBD::mysql::VERSION ge '4.001' ? undef : '(7)', dt => undef, ts => undef, - c => '(1)', - c2 => '(15)', - v => '(32)', + c => '(3)', + c2 => '(45)', + v => '(96)', t => undef, }, }, diff --git a/t/lib/Quoter.t b/t/lib/Quoter.t index 34e9fb52..b07c10af 100644 --- a/t/lib/Quoter.t +++ b/t/lib/Quoter.t @@ -16,6 +16,7 @@ use Quoter; use PerconaTest; use DSNParser; use Sandbox; + my $dp = new DSNParser(opts=>$dsn_opts); my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp); my $dbh = $sb->get_dbh_for('master'); @@ -173,6 +174,12 @@ SKIP: { $dbh->do('CREATE DATABASE IF NOT EXISTS serialize_test'); $dbh->do('DROP TABLE IF EXISTS serialize_test.serialize'); $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( "INSERT INTO serialize_test.serialize VALUES (?, ?, ?)" diff --git a/t/pt-mysql-summary/samples/expected_output_temp002.txt b/t/pt-mysql-summary/samples/expected_output_temp002.txt index 070af6a3..b7b7a5e2 100644 --- a/t/pt-mysql-summary/samples/expected_output_temp002.txt +++ b/t/pt-mysql-summary/samples/expected_output_temp002.txt @@ -277,5 +277,3 @@ report-port = 12345 log-error = mysqld.log innodb_lock_wait_timeout = 3 # Memory management library ################################## -Jemalloc library not found -# The End #################################################### diff --git a/t/pt-mysql-summary/samples/expected_output_temp003.txt b/t/pt-mysql-summary/samples/expected_output_temp003.txt index 0e919522..e5b20824 100644 --- a/t/pt-mysql-summary/samples/expected_output_temp003.txt +++ b/t/pt-mysql-summary/samples/expected_output_temp003.txt @@ -220,5 +220,3 @@ report-port = 12345 log-error = mysqld.log innodb_lock_wait_timeout = 3 # Memory management library ################################## -Jemalloc library not found -# The End #################################################### diff --git a/t/pt-mysql-summary/samples/expected_output_temp004.txt b/t/pt-mysql-summary/samples/expected_output_temp004.txt index 6961496d..55cd02a8 100644 --- a/t/pt-mysql-summary/samples/expected_output_temp004.txt +++ b/t/pt-mysql-summary/samples/expected_output_temp004.txt @@ -219,5 +219,3 @@ report-port = 12345 log-error = mysqld.log innodb_lock_wait_timeout = 3 # Memory management library ################################## -Jemalloc library not found -# The End #################################################### diff --git a/t/pt-mysql-summary/samples/expected_output_temp005.txt b/t/pt-mysql-summary/samples/expected_output_temp005.txt index 95cbb20f..3f48c826 100644 --- a/t/pt-mysql-summary/samples/expected_output_temp005.txt +++ b/t/pt-mysql-summary/samples/expected_output_temp005.txt @@ -292,5 +292,3 @@ report-port = 12345 log-error = mysqld.log innodb_lock_wait_timeout = 3 # Memory management library ################################## -Jemalloc library not found -# The End #################################################### diff --git a/t/pt-mysql-summary/samples/expected_output_temp006.txt b/t/pt-mysql-summary/samples/expected_output_temp006.txt index d8788b2b..10b79804 100644 --- a/t/pt-mysql-summary/samples/expected_output_temp006.txt +++ b/t/pt-mysql-summary/samples/expected_output_temp006.txt @@ -341,5 +341,3 @@ log_queries_not_using_indexes | OFF # Configuration File ######################################### Config File | Cannot autodetect or find, giving up # Memory management library ################################## -Jemalloc library not found -# The End #################################################### diff --git a/t/pt-mysql-summary/samples/expected_output_temp007.txt b/t/pt-mysql-summary/samples/expected_output_temp007.txt index 50116ee3..bd784839 100644 --- a/t/pt-mysql-summary/samples/expected_output_temp007.txt +++ b/t/pt-mysql-summary/samples/expected_output_temp007.txt @@ -295,5 +295,3 @@ log_queries_not_using_indexes | OFF # Configuration File ######################################### Config File | Cannot autodetect or find, giving up # Memory management library ################################## -Jemalloc library not found -# The End #################################################### diff --git a/t/pt-online-schema-change/basics.t b/t/pt-online-schema-change/basics.t index 7fee8cb0..b135dcc9 100644 --- a/t/pt-online-schema-change/basics.t +++ b/t/pt-online-schema-change/basics.t @@ -847,6 +847,7 @@ $sb->do_as_root("master", q/GRANT REPLICATION SLAVE ON *.* TO 'slave_user'@'%' I $sb->do_as_root("master", q/set sql_log_bin=0/); $sb->do_as_root("master", q/DROP USER 'slave_user'/); $sb->do_as_root("master", q/set sql_log_bin=1/); +$sb->wait_for_slaves(); test_alter_table( name => "--slave-user --slave-password",