84 lines
2.6 KiB
Plaintext
84 lines
2.6 KiB
Plaintext
## XPLUGIN: Test case for triggering wait timeout while using a SSL connection
|
|
|
|
--echo Preamble
|
|
--source include/not_windows.inc
|
|
--source ../include/have_performance_schema_threads.inc
|
|
--source include/xplugin_preamble.inc
|
|
|
|
###################################################################
|
|
|
|
###################################################################
|
|
|
|
--write_file $MYSQL_TMP_DIR/mysqlx-timeouting-wait.tmp
|
|
-->import assert_variable.macro
|
|
|
|
-->callmacro Assert_session_variable mysqlx_wait_timeout 5
|
|
-->callmacro Assert_global_variable mysqlx_wait_timeout 5
|
|
|
|
-->sql
|
|
SHOW SESSION VARIABLES LIKE 'mysqlx_wait_timeout';
|
|
SELECT CONNECTION_TYPE from performance_schema.threads where processlist_command='Query';
|
|
SELECT USER();
|
|
SHOW STATUS LIKE 'Mysqlx_ssl_active';
|
|
-->endsql
|
|
|
|
-->echo # Hanging 'receive' command will cause wait_timeout
|
|
-->recvtype Mysqlx.Notice.Frame
|
|
-->echo # We do no expect any message to be received here,
|
|
-->echo # verification is done by comparing with 'result' file.
|
|
-->recvuntildisc show-received
|
|
EOF
|
|
|
|
###################################################################
|
|
|
|
SET GLOBAL mysqlx_wait_timeout = 5;
|
|
SET GLOBAL mysqlx_interactive_timeout = 10;
|
|
|
|
eval CREATE USER temp_user@localhost
|
|
IDENTIFIED WITH 'mysql_native_password' BY 'auth_string';
|
|
|
|
GRANT ALL ON *.* TO temp_user@localhost;
|
|
|
|
let $wait_condition=
|
|
SELECT 1 FROM performance_schema.global_status WHERE VARIABLE_NAME
|
|
like "Mysqlx_aborted_clients" and VARIABLE_VALUE=0;
|
|
--source include/wait_condition_or_abort.inc
|
|
|
|
--echo #
|
|
--echo # Run the test without SSL
|
|
--echo #
|
|
--replace_regex /(.*IO Read error:).*(read_timeout exceeded)/\1 \2/
|
|
exec $MYSQLXTEST
|
|
--user temp_user
|
|
--password='auth_string'
|
|
--file=$MYSQL_TMP_DIR/mysqlx-timeouting-wait.tmp 2>&1;
|
|
|
|
let $wait_condition=
|
|
SELECT 1 FROM performance_schema.global_status WHERE VARIABLE_NAME
|
|
like "Mysqlx_aborted_clients" and VARIABLE_VALUE=1;
|
|
--source include/wait_condition_or_abort.inc
|
|
|
|
--echo #
|
|
--echo # Run the test with SSL
|
|
--echo #
|
|
--replace_regex /(.*IO Read error:).*(read_timeout exceeded)/\1 \2/
|
|
exec $MYSQLXTEST
|
|
--user temp_user
|
|
--password='auth_string'
|
|
--ssl-mode=REQUIRED
|
|
--file=$MYSQL_TMP_DIR/mysqlx-timeouting-wait.tmp 2>&1;
|
|
|
|
let $wait_condition=
|
|
SELECT 1 FROM performance_schema.global_status WHERE VARIABLE_NAME
|
|
like "Mysqlx_aborted_clients" and VARIABLE_VALUE=2;
|
|
--source include/wait_condition_or_abort.inc
|
|
|
|
|
|
# Cleanup
|
|
SET GLOBAL mysqlx_wait_timeout = DEFAULT;
|
|
SET GLOBAL mysqlx_interactive_timeout = DEFAULT;
|
|
|
|
--remove_file $MYSQL_TMP_DIR/mysqlx-timeouting-wait.tmp
|
|
|
|
DROP USER temp_user@localhost;
|