| 1 |
## Preamble |
| 2 |
--source include/xplugin_preamble.inc |
| 3 |
--source include/xplugin_create_user.inc |
| 4 |
|
| 5 |
## TEST STARTS HERE |
| 6 |
--write_file $MYSQL_TMP_DIR/validate_empty_message.xpl |
| 7 |
-->import wait_until_disconnect.macro |
| 8 |
-->hexsend 00000000 |
| 9 |
-->expecterror 5000 |
| 10 |
-->recvtype Mysqlx.Error |
| 11 |
-->callmacro Wait_until_disconnect |
| 12 |
EOF |
| 13 |
|
| 14 |
--write_file $MYSQL_TMP_DIR/validate_empty_message_on_raw.xpl |
| 15 |
-->import connection.macro |
| 16 |
-->import wait_until_disconnect.macro |
| 17 |
-->callmacro Verify_its_xprotocol_connection |
| 18 |
-->hexsend 00000000 |
| 19 |
-->expecterror 5000 |
| 20 |
-->recvtype Mysqlx.Error |
| 21 |
-->callmacro Wait_until_disconnect |
| 22 |
EOF |
| 23 |
|
| 24 |
|
| 25 |
--write_file $MYSQL_TMP_DIR/validate_empty_message_on_valid_session.xpl |
| 26 |
-->macro Verify_status %VARIABLE_NAME% %EXPECTED_VALUE% |
| 27 |
-->quiet |
| 28 |
-->echo Verify [%VARIABLE_NAME% session variable should be have %EXPECTED_VALUE% as value] |
| 29 |
-->stmtsql SHOW STATUS LIKE %VARIABLE_NAME% |
| 30 |
-->recvtovar %VALUE% Value |
| 31 |
-->assert_eq %EXPECTED_VALUE% %VALUE% |
| 32 |
-->noquiet |
| 33 |
-->endmacro |
| 34 |
|
| 35 |
# Check session status variable |
| 36 |
-->callmacro Verify_status 'Mysqlx_sessions_fatal_error' 2 |
| 37 |
EOF |
| 38 |
|
| 39 |
# Set the timeout for connection to 300 seconds |
| 40 |
# which is must be greater than the peerdisc/timeout |
| 41 |
SET GLOBAL mysqlx_connect_timeout = 300; |
| 42 |
SET GLOBAL mysqlx_wait_timeout = 300; |
| 43 |
|
| 44 |
--exec $MYSQLXTEST -u x_root --file=$MYSQL_TMP_DIR/validate_empty_message.xpl 2>&1 |
| 45 |
--exec $MYSQLXTEST -u x_root --file=$MYSQL_TMP_DIR/validate_empty_message_on_raw.xpl --no-auth 2>&1 |
| 46 |
--exec $MYSQLXTEST -u x_root --file=$MYSQL_TMP_DIR/validate_empty_message_on_valid_session.xpl 2>&1 |
| 47 |
|
| 48 |
--let $wait_condition= SELECT variable_value = 2 FROM performance_schema.global_status WHERE variable_name LIKE 'Mysqlx_sessions_fatal_error' |
| 49 |
--source include/wait_condition_or_abort.inc |
| 50 |
|
| 51 |
## Cleanup |
| 52 |
SET GLOBAL mysqlx_connect_timeout= DEFAULT; |
| 53 |
SET GLOBAL mysqlx_wait_timeout = DEFAULT; |
| 54 |
--source ../include/xplugin_cleanup.inc |