polardbxengine/mysql-test/suite/x/t/connection_invalid.test

36 lines
1.0 KiB
Plaintext

## Preamble
--source include/xplugin_preamble.inc
--source include/xplugin_create_user.inc
#
## Test start here
--echo
--echo ## Test verifies invalid cross connections
--echo #
--echo # 1. Verify failure at cross connecting classic-client to x-server
--echo # 2. Verify failure at cross connecting x-client to classic-server
--echo #
--echo # Where classic server is old mysql protocol that usually resides
--echo # on tcp port 3306.
--echo #
--echo # Where x-server is the x-protocol that usually resides on tcp port
--echo # 33060.
--echo #
--echo
--echo #
--echo # 1. Verify failure at cross connecting classic-client to x-server
--error 1
--exec $MYSQL --host=127.0.0.1 -P $MASTER_X_MYPORT -ux_root --ssl-mode=DISABLED -e "SELECT USER(), CURRENT_USER()" 2>&1
--echo
--echo #
--echo # 2. Verify failure at cross connecting x-client to classic-server
--error 1
--exec $MYSQLXTEST --host=127.0.0.1 -P $MASTER_MYPORT -ux_root --no-connect-attrs --ssl-mode=DISABLED -e "SELECT USER(), CURRENT_USER()" 2>&1
#
## Cleanup
--source include/xplugin_drop_user.inc