Merge branch '3.0' into PT-214

This commit is contained in:
Carlos Salguero
2017-12-14 11:09:06 -03:00
3 changed files with 196 additions and 182 deletions
+5
View File
@@ -83,6 +83,11 @@ cd ${HOME}/perldev/percona-toolkit
sandbox/test-env start
```
To stop the MySQL sandbox: `sandbox/test-env stop`
To enable TokuDB (only available in Percona Server 5.7+), run:
```
ENABLE_TOKUDB=1 sandbox/test-env start
```
### Running tests
```
+8 -3
View File
@@ -176,8 +176,11 @@ make_sandbox() {
if [ -x "$PERCONA_TOOLKIT_SANDBOX/bin/ps-admin" ]; then
# try to enable RocksDB. Only available on Percona Server 5.7.19+
if [ "$version" ">" "5.6" ]; then
if [ "$version" > "5.6" ]; then
$PERCONA_TOOLKIT_SANDBOX/bin/ps-admin --enable-rocksdb -u root -pmsandbox -h 127.1 -P $port
if [ -n "$ENABLE_TOKUDB" ]; then
sudo $PERCONA_TOOLKIT_SANDBOX/bin/ps-admin --enable-tokudb -u root -pmsandbox -h 127.1 -P $port
fi
fi
fi
@@ -194,6 +197,8 @@ fi
type=$1 # master, slave or master-master
port=$2 # sandbox port number, e.g. 12345
master_port=$3 # master port if slave or master-master
enable_tokudb=''
if [ "$type" != "master" ] && [ "$type" != "slave" ] && [ "$type" != "master-master" ] && [ "$type" != "cluster" ] && [ "$type" != "channels" ]; then
die "Invalid sandbox type: $type. Valid types are master, slave, and master-master."
@@ -255,8 +260,8 @@ fi
APP="${FORK:-"mysql"}"
if [ $type = "cluster" -o $APP = "pxc" ]; then
# disabled for now because used perl module is not available everywhere and in some distros it returns ipv6 address
# ip=$(perl -MNet::Address::IP::Local -le 'print Net::Address::IP::Local->public')
# disabled for now because used perl module is not available everywhere and in some distros it returns ipv6 address
# ip=$(perl -MNet::Address::IP::Local -le 'print Net::Address::IP::Local->public')
ip=$(hostname -i | cut -d" " -f2)
version=`$PERCONA_TOOLKIT_SANDBOX/$mysqld -V --query_cache_size=0 --query_cache_type=0 --bind-address $ip 2>/dev/null | awk '{print $3}' | cut -d. -f 1,2`;
else
+4
View File
@@ -267,6 +267,10 @@ opt=$1
exit_status=0
if [ -e ${PERCONA_TOOLKIT_SANDBOX}/lib/mysql/libjemalloc.so ]; then
export LD_PRELOAD=${PERCONA_TOOLKIT_SANDBOX}/lib/mysql/libjemalloc.so
fi
if [ $opt = 'checkconfig' ]; then
checkconfig 1
echo -n "Percona Toolkit test environment config is "