##### Session 1

#####  Build used

 cat docs/INFO_SRC
commit: c0b73ae948b4b1362c65c99291e5c573c6891813
date: 2019-04-13 13:41:06 +0200
build-date: 2019-04-13 13:47:03 +0200
short: c0b73ae
branch: mysql-8.0.16-release

MySQL source 8.0.16

#####  Env 

cat /etc/*release
Oracle Linux Server release 7.1
NAME="Oracle Linux Server"
VERSION="7.1"
ID="ol"
VERSION_ID="7.1"
PRETTY_NAME="Oracle Linux Server 7.1"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:1"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.1
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.1
Red Hat Enterprise Linux Server release 7.1 (Maipo)
Oracle Linux Server release 7.1

#####  Start up

rm -rf 96197/
bin/mysqld --initialize-insecure --basedir=$PWD --datadir=$PWD/96197 --log-error-verbosity=3
bin/mysqld --no-defaults --basedir=$PWD --datadir=$PWD/96197 --core-file --socket=/tmp/mysql_ushastry.sock  --port=3333 --log-error=$PWD/96197/log.err --mysqlx-port=33330 --mysqlx-socket=/tmp/mysql_x_ushastry.sock --log-error-verbosity=3  --secure-file-priv=/tmp/ 2>&1 &


#####  Used Shane's trick instead of Docker one

 cat test.sh test1.sh test2.sh
#!/bin/bash

i="0"
while [ $i -lt 15000 ]
do
#myVar=`perl -e 'printf "%vd\n",pack "N",rand 256**4'`
#echo $myVar
#myVar=`printf "%d.%d.%d.%d\n" "127" "0" "0" "$((RANDOM % 256))"`
myVar=`printf "%d.%d.%d.%d\n" "127" "0" "$((RANDOM % 256))" "$((RANDOM % 256))"`
#myVar=`printf "%d.%d.%d.%d\n" "127" "0" "0" "$((RANDOM % 256))"`
#myVar=`printf "%d.%d.%d.%d\n" "127" "0" "0" "$((RANDOM % 256))"`
bin/mysql -uroot --protocol=tcp --port=3333 --bind-address=$myVar -e "select count(*) from performance_schema.hosts"
i=$[$i+1]
done
#!/bin/bash

i="0"
while [ $i -lt 15000 ]
do
myVar=`printf "%d.%d.%d.%d\n" "127" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))"`
bin/mysql -uroot --protocol=tcp --port=3333 --bind-address=$myVar -e "select count(*) from performance_schema.hosts"
i=$[$i+1]
done
#!/bin/bash

i="0"
while [ $i -lt 15000 ]
do
myVar=`printf "%d.%d.%d.%d\n" "127" "$((RANDOM % 256))" "$((RANDOM % 256))" "0"`
bin/mysql -uroot --protocol=tcp --port=3333 --bind-address=$myVar -e "select count(*) from performance_schema.hosts"
i=$[$i+1]
done

#####  Session 2

./test.sh
.
.
+----------+
| count(*) |
+----------+
|    16384 |
+----------+
^C^C -- query aborted

#####  Session 3

./test1.sh

+----------+
| count(*) |
+----------+
|    16384 |
+----------+
+----------+
| count(*) |
+----------+
|    16384 |

#####  Session 4

./test2.sh
.
.
+----------+
| count(*) |
+----------+
|    16384 |
+----------+

#####  Session 5
bin/mysql -uroot -S /tmp/mysql_ushastry.sock
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 19985
Server version: 8.0.16 MySQL Community Server - GPL

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show global status like 'Performance_schema_hosts_lost';
+-------------------------------+-------+
| Variable_name                 | Value |
+-------------------------------+-------+
| Performance_schema_hosts_lost | 1006  |
+-------------------------------+-------+
1 row in set (0.00 sec)

mysql> show global status like 'Performance_schema_hosts_lost';
+-------------------------------+-------+
| Variable_name                 | Value |
+-------------------------------+-------+
| Performance_schema_hosts_lost | 4552  |
+-------------------------------+-------+
1 row in set (0.00 sec)

mysql>
