config root man

Current Path : /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 : //usr/opt/mysql57/mysql-test/suite/x/t/connection_skip_grant_table.test

## This is test file for connection authentication using mysqlx.
##
--source ../include/xplugin_preamble.inc

call mtr.add_suppression("Plugin 'mysqlx' will be forced to shutdown");
call mtr.add_suppression("Unsuccessful login attempt: Invalid user or password");
call mtr.add_suppression("Internal account mysqlxsys@localhost can't be removed because server is running without user privileges ..skip-grant-tables. switch");

SELECT PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_STATUS,PLUGIN_TYPE,PLUGIN_TYPE_VERSION,PLUGIN_LIBRARY,PLUGIN_LIBRARY_VERSION,PLUGIN_AUTHOR,PLUGIN_DESCRIPTION,PLUGIN_LICENSE,LOAD_OPTION from information_schema.plugins where PLUGIN_NAME LIKE '%xplugin%';
create user nonblank@localhost identified by 'nonblank';

--write_file $MYSQL_TMP_DIR/mysqlx-connection_current_user.tmp
-->sql
select user(),current_user(),@@bind_address;
-->endsql
EOF

--write_file $MYSQL_TMP_DIR/mysqlx-connection_uninstallplugin.tmp
-->expecterror ER_PLUGGABLE_PROTOCOL_COMMAND_NOT_SUPPORTED
-->sql
uninstall plugin mysqlx;
-->endsql
EOF

--echo Test starts here 

--exec $MYSQLXTEST -u nonblank --password='nonblank' --file=$MYSQL_TMP_DIR/mysqlx-connection_current_user.tmp 2>&1

--echo try login with valid user when server started with skip-grant-tables and mysqlx loaded
--replace_regex /\.dll/.so/
let $restart_parameters = restart: --skip-grant-tables --plugin-load=$MYSQLXPLUGIN;
--source ../include/restart_mysqld_and_wait_for_xplugin.inc
--echo Connection should success with valid password
--exec $MYSQLXTEST -u nonblank --password='nonblank' --file=$MYSQL_TMP_DIR/mysqlx-connection_current_user.tmp 2>&1
--echo Connection should success with invalid password
--exec $MYSQLXTEST -u nonblank --password='blank' --file=$MYSQL_TMP_DIR/mysqlx-connection_current_user.tmp 2>&1
FLUSH PRIVILEGES;

--let $expected_error_msg= Invalid user or password \(code 1045\)
--source ../include/mysqlxtest_expected_error.inc
--exec $MYSQLXTEST -u nonblank --password='blank' --file=$MYSQL_TMP_DIR/mysqlx-connection_current_user.tmp 2>&1

##uninstall mysqlxplugin when server started with skip-grant-tables option and mysqlx loaded with super user
--replace_regex /\.dll/.so/
let $restart_parameters = restart: --skip-grant-tables --plugin-load=$MYSQLXPLUGIN;
--source ../include/restart_mysqld_and_wait_for_xplugin.inc
--exec $MYSQLXTEST -u root --password='' --file=$MYSQL_TMP_DIR/mysqlx-connection_uninstallplugin.tmp 2>&1

##Bug#22369479 Executing uninstall when running with skip grant table was causing a SQL error
# Error was changed to warning showing less implementation details to user
UNINSTALL PLUGIN mysqlx;

##cleanup
--remove_file $MYSQL_TMP_DIR/mysqlx-connection_uninstallplugin.tmp
--remove_file $MYSQL_TMP_DIR/mysqlx-connection_current_user.tmp
--replace_regex /\.dll/.so/
let $restart_parameters = restart: --plugin-load=$MYSQLXPLUGIN;
--source ../include/restart_mysqld_and_wait_for_xplugin.inc
drop user nonblank@localhost;
UNINSTALL PLUGIN mysqlx;

Man Man