58 lines
2.0 KiB
Plaintext
58 lines
2.0 KiB
Plaintext
## Preamble
|
|
--source include/xplugin_preamble.inc
|
|
--source include/xplugin_create_user.inc
|
|
|
|
## TEST STARTS HERE
|
|
--write_file $MYSQL_TMP_DIR/validate_empty_message.tmp
|
|
-->import wait_until_disconnect.macro
|
|
-->hexsend 00000000
|
|
-->expecterror 5000
|
|
-->recvtype Mysqlx.Error
|
|
-->callmacro Wait_until_disconnect
|
|
EOF
|
|
|
|
--write_file $MYSQL_TMP_DIR/validate_empty_message_on_raw.tmp
|
|
-->import connection.macro
|
|
-->import wait_until_disconnect.macro
|
|
-->callmacro Verify_its_xprotocol_connection
|
|
-->hexsend 00000000
|
|
-->expecterror 5000
|
|
-->recvtype Mysqlx.Error
|
|
-->callmacro Wait_until_disconnect
|
|
EOF
|
|
|
|
|
|
--write_file $MYSQL_TMP_DIR/validate_empty_message_on_valid_session.tmp
|
|
-->macro Verify_status %VARIABLE_NAME% %EXPECTED_VALUE%
|
|
-->quiet
|
|
-->echo Verify [%VARIABLE_NAME% session variable should be have %EXPECTED_VALUE% as value]
|
|
-->stmtsql SHOW STATUS LIKE %VARIABLE_NAME%
|
|
-->recvtovar %VALUE% Value
|
|
-->assert_eq %EXPECTED_VALUE% %VALUE%
|
|
-->noquiet
|
|
-->endmacro
|
|
|
|
# Check session status variable
|
|
-->callmacro Verify_status 'Mysqlx_sessions_fatal_error' 2
|
|
EOF
|
|
|
|
# Set the timeout for connection to 300 seconds
|
|
# which is must be greater than the peerdisc/timeout
|
|
SET GLOBAL mysqlx_connect_timeout = 300;
|
|
SET GLOBAL mysqlx_wait_timeout = 300;
|
|
|
|
--exec $MYSQLXTEST -u x_root --file=$MYSQL_TMP_DIR/validate_empty_message.tmp 2>&1
|
|
--exec $MYSQLXTEST -u x_root --file=$MYSQL_TMP_DIR/validate_empty_message_on_raw.tmp --no-auth 2>&1
|
|
--exec $MYSQLXTEST -u x_root --file=$MYSQL_TMP_DIR/validate_empty_message_on_valid_session.tmp 2>&1
|
|
|
|
--let $wait_condition= SELECT variable_value = 2 FROM performance_schema.global_status WHERE variable_name LIKE 'Mysqlx_sessions_fatal_error'
|
|
--source include/wait_condition_or_abort.inc
|
|
|
|
## Cleanup
|
|
SET GLOBAL mysqlx_connect_timeout= DEFAULT;
|
|
SET GLOBAL mysqlx_wait_timeout = DEFAULT;
|
|
--remove_file $MYSQL_TMP_DIR/validate_empty_message.tmp
|
|
--remove_file $MYSQL_TMP_DIR/validate_empty_message_on_raw.tmp
|
|
--remove_file $MYSQL_TMP_DIR/validate_empty_message_on_valid_session.tmp
|
|
--source include/xplugin_drop_user.inc
|