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 |
Current File : //usr/opt/mysql57/mysql-test/suite/x/t/mysql_session_user.test |
################################################################################ # This test checks the server default user for the SQL session server is not # affected by the X plugin ################################################################################ --let $wait_for_tcpsocket_status = no_wait --let $wait_for_unixsocket_status = no_wait --let $dont_load_plugin=1 --source ../include/xplugin_preamble.inc --source include/force_restart.inc --echo # --echo # Assert the user exist from the start --echo # --let $assert_text= session_user should exist before X plugin install --let $assert_cond= [SELECT COUNT(*) FROM mysql.user WHERE user="mysql.session"] = 1; --source include/assert.inc --echo # --echo # Start X plugin and check all is OK --echo # --source ../include/xplugin_install_and_wait.inc --let $assert_text= session_user should exist after X plugin install --let $assert_cond= [SELECT COUNT(*) FROM mysql.user WHERE user="mysql.session"] = 1; --source include/assert.inc --echo # --echo # Delete the user --echo # let $date_to_restore=`SELECT password_last_changed from mysql.user where user='mysql.session'`; let $date_to_restore_priv=`SELECT timestamp from mysql.tables_priv where user='mysql.session'`; DROP USER "mysql.session"@"localhost"; call mtr.add_suppression("Plugin mysqlx reported: '1.1: Unsuccessful login attempt: Unable to switch context to user mysql.session'"); call mtr.add_suppression("Plugin mysqlx reported: 'Unable to switch context to user mysql.session'"); --error 1 --exec $MYSQLXTEST -uroot --password='' --sql "SELECT CURRENT_USER()" --echo # --echo # Recreate the user with an upgrade and see that X plugin works --echo # --source include/mysql_upgrade_preparation.inc --echo Run mysql_upgrade --exec $MYSQL_UPGRADE --skip-verbose --force 2>&1 --source include/mysql_upgrade_cleanup.inc --source ../include/xplugin_wait_for_interfaces.inc --let $assert_text= session_user should exist after upgrade --let $assert_cond= [SELECT COUNT(*) FROM mysql.user WHERE user="mysql.session"] = 1; --source include/assert.inc --exec $MYSQLXTEST -uroot --password='' --sql "SELECT CURRENT_USER()" --echo # --echo # Uninstall plugin and verify that user is still there --echo # UNINSTALL PLUGIN mysqlx; --let $assert_text= session_user should exist after install --let $assert_cond= [SELECT COUNT(*) FROM mysql.user WHERE user="mysql.session"] = 1; --source include/assert.inc --echo # --echo # Cleaning --echo # --source ../include/xplugin_install_and_wait.inc call mtr.add_suppression("Unable to use user mysql.session context *.*"); call mtr.add_suppression("On plugin shutdown it was not possible to reset the server read mode settings. Try to reset it manually."); --disable_query_log ONCE --eval UPDATE mysql.tables_priv SET timestamp ='$date_to_restore_priv' WHERE USER= 'mysql.session' --disable_query_log ONCE --eval UPDATE mysql.user SET password_last_changed= '$date_to_restore' WHERE USER= 'mysql.session'