config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/x/t/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : /home/usr.opt/mysql57/mysql-test/suite/x/t/connection_timeout.test

--source ../include/is_local_machine.inc

--echo Preamble
--source ../include/xplugin_preamble.inc
--sleep 1
SHOW VARIABLES LIKE 'mysqlx_connect_timeout';
show status like 'Mysqlx_conn%';

--write_file $MYSQL_TMP_DIR/mysqlx-idle-disconnect.tmp
-->peerdisc 4000 800
EOF

--write_file $MYSQL_TMP_DIR/mysqlx-idle-disconnect-no-prolong.tmp
-->newsession idle_session	-
-->measure
-->sleep 2
-->noquery_result
Mysqlx.Connection.CapabilitiesGet {
}
-->recvtype Mysqlx.Connection.Capabilities
-->query_result

# lets give maximum tolerance for disconnecting 
# this is going to be verified at endmesasure !
-->peerdisc 2000 2000

# 4000 sum of peerdisc and sleep
-->endmeasure 4000 800
EOF

--write_file $MYSQL_TMP_DIR/mysqlx-idle-no-disconnect-after-auth.tmp
-->sleep 3
-->stmtadmin ping
-->recvresult
-->sleep 3
-->stmtadmin ping
-->recvresult
EOF

--write_file $MYSQL_TMP_DIR/mysqlx-reset-session-after-auth.tmp
-->sleep 6
-->stmtadmin ping
-->recvresult
##timer should get restarted here
Mysqlx.Session.Reset {
}
-->recv
-->sleep 5
-->login root
-->stmtadmin ping
-->recvresult
#timer should get restarted here
Mysqlx.Session.Reset {
}
-->recv
-->login root
EOF

SET GLOBAL mysqlx_connect_timeout = 4;
show status like 'Mysqlx_conn%';
--echo Disconnect user on idle connection after timeout
--exec $MYSQLXTEST -u root --password='' -h127.0.0.1 --no-auth --file=$MYSQL_TMP_DIR/mysqlx-idle-disconnect.tmp 2>&1

--echo Disconnect user without session after timeout
--exec $MYSQLXTEST -u root --password='' -h127.0.0.1 --file=$MYSQL_TMP_DIR/mysqlx-idle-disconnect-no-prolong.tmp 2>&1

--echo Inactivity timer disabled after session setup (commands executed after 1s should be processed)
--exec $MYSQLXTEST -u root --password='' -h127.0.0.1 --file=$MYSQL_TMP_DIR/mysqlx-idle-no-disconnect-after-auth.tmp 2>&1

--echo Disconnect user on idle connection after new timeout
--remove_file $MYSQL_TMP_DIR/mysqlx-idle-disconnect.tmp
--write_file $MYSQL_TMP_DIR/mysqlx-idle-disconnect.tmp
-->peerdisc 2000
EOF

SET GLOBAL mysqlx_connect_timeout = 2;
show status like 'Mysqlx_conn%';
--exec $MYSQLXTEST -u root --password='' -h127.0.0.1 --no-auth --file=$MYSQL_TMP_DIR/mysqlx-idle-disconnect.tmp 2>&1

SET GLOBAL mysqlx_connect_timeout = 4;
--echo Inactivity timer restarted with Session.Reset Message
--exec $MYSQLXTEST -u root --password='' -h127.0.0.1 --file=$MYSQL_TMP_DIR/mysqlx-reset-session-after-auth.tmp 2>&1


--echo Cleanup
--sleep 1
SET GLOBAL mysqlx_connect_timeout = 300;
show status like 'Mysqlx_conn%';
UNINSTALL PLUGIN mysqlx;

--remove_file $MYSQL_TMP_DIR/mysqlx-idle-disconnect.tmp
--remove_file $MYSQL_TMP_DIR/mysqlx-idle-disconnect-no-prolong.tmp
--remove_file $MYSQL_TMP_DIR/mysqlx-idle-no-disconnect-after-auth.tmp
--remove_file $MYSQL_TMP_DIR/mysqlx-reset-session-after-auth.tmp

Man Man