Current Path : /home/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 : //home/usr.opt/mysql57/mysql-test/suite/x/t/installxplugin.test |
## This is test file for install xplugin feature ## --source ../include/xplugin_preamble.inc call mtr.add_suppression("Plugin mysqlx reported: 'Delayed startup failed. Plugin is unable to accept connections.'"); call mtr.add_suppression("Plugin mysqlx reported: 'Invalid server state'"); call mtr.add_suppression("Plugin mysqlx reported: '.*: Internal error executing query'"); call mtr.add_suppression("Can.t open and lock privilege tables: Server shutdown in progress"); ## Test starts here --write_file $MYSQL_TMP_DIR/mysqlx-setup.tmp -->sql create user xplugin@localhost identified by 'xplugin'; create user session@localhost identified by 'session'; grant all on *.* to session@localhost; -->endsql EOF --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-uninstallxplugin.tmp -->expecterror ER_PLUGGABLE_PROTOCOL_COMMAND_NOT_SUPPORTED -->sql show variables like 'mysqlx_idle_worker_thread_timeout%'; show variables like 'mysqlx_max_allowed_packet%'; show variables like 'mysqlx_max_connections%'; show variables like 'mysqlx_min_worker_threads%'; uninstall plugin mysqlx; show variables like 'mysqlx_idle_worker_thread_timeout%'; show variables like 'mysqlx_max_allowed_packet%'; show variables like 'mysqlx_max_connections%'; show variables like 'mysqlx_min_worker_threads%'; SELECT PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_STATUS,PLUGIN_TYPE,LOAD_OPTION from information_schema.plugins where PLUGIN_NAME LIKE 'mysqlx%'; -->endsql EOF --replace_regex /\.dll/.so/ --write_file $MYSQL_TMP_DIR/mysqlx-installxplugin.tmp -->expecterror ER_PLUGGABLE_PROTOCOL_COMMAND_NOT_SUPPORTED -->sql select user(),current_user(),@@bind_address; show grants; install plugin mysqlx soname '$MYSQLXPLUGIN'; -->endsql EOF --replace_regex /\.dll/.so/ --write_file $MYSQL_TMP_DIR/mysqlx-uninstallxplugin-variables.tmp -->expecterror ER_PLUGGABLE_PROTOCOL_COMMAND_NOT_SUPPORTED -->sql show variables like 'mysqlx_idle_worker_thread_timeout%'; show variables like 'mysqlx_max_allowed_packet%'; show variables like 'mysqlx_max_connections%'; show variables like 'mysqlx_min_worker_threads%'; set @@global.mysqlx_idle_worker_thread_timeout=70; set @@global.mysqlx_max_allowed_packet=4048576; set @@global.mysqlx_max_connections=500; set @@global.mysqlx_min_worker_threads=50; show variables like 'mysqlx_idle_worker_thread_timeout%'; show variables like 'mysqlx_max_allowed_packet%'; show variables like 'mysqlx_max_connections%'; show variables like 'mysqlx_min_worker_threads%'; uninstall plugin mysqlx; -->endsql -->expecterror ER_PLUGGABLE_PROTOCOL_COMMAND_NOT_SUPPORTED -->sql install plugin mysqlx soname '$MYSQLXPLUGIN'; -->endsql EOF --write_file $MYSQL_TMP_DIR/mysqlx-xplugin-variables.tmp -->sql show variables like 'mysqlx_idle_worker_thread_timeout%'; show variables like 'mysqlx_max_allowed_packet%'; show variables like 'mysqlx_max_connections%'; show variables like 'mysqlx_min_worker_threads%'; -->endsql EOF --exec $MYSQLXTEST -u root --password='' --file=$MYSQL_TMP_DIR/mysqlx-setup.tmp 2>&1 ###try uninstaling mysqlx plugin with unprivileged user using mysqlx protocol --exec $MYSQLXTEST -u xplugin --password='xplugin' --file=$MYSQL_TMP_DIR/mysqlx-uninstallxplugin.tmp 2>&1 ###try connecting using mysqlx protocol when mysqlx plugin is uninstalled with old protocol uninstall plugin mysqlx; --replace_regex /ERROR.*(No connection could be made because the target machine actively refused it connecting to *| *Connection refused connecting to*) .*:[0-9]*/ERROR: Connection refused connecting to HOST:PORT/ --error 1 --exec $MYSQLXTEST -u xplugin --password='xplugin' --file=$MYSQL_TMP_DIR/mysqlx-uninstallxplugin.tmp 2>&1 --source ../include/xplugin_install_and_wait.inc ##try uninstalling mysqlx plugin using old protocol when mysqlx plugin variables are set show variables like 'mysqlx_idle_worker_thread_timeout%'; show variables like 'mysqlx_max_allowed_packet%'; show variables like 'mysqlx_max_connections%'; show variables like 'mysqlx_min_worker_threads%'; set @@global.mysqlx_idle_worker_thread_timeout=70; set @@global.mysqlx_max_allowed_packet=4048576; set @@global.mysqlx_max_connections=500; set @@global.mysqlx_min_worker_threads=50; show variables like 'mysqlx_idle_worker_thread_timeout%'; show variables like 'mysqlx_max_allowed_packet%'; show variables like 'mysqlx_max_connections%'; show variables like 'mysqlx_min_worker_threads%'; uninstall plugin mysqlx; --source ../include/xplugin_install_and_wait.inc ###try install mysqlx plugin with valid credentials when this plugin already installed --exec $MYSQLXTEST -u session --password='session' --file=$MYSQL_TMP_DIR/mysqlx-installxplugin.tmp 2>&1 ###try install mysqlx plugin with unprivileged user --exec $MYSQLXTEST -u xplugin --password='xplugin' --file=$MYSQL_TMP_DIR/mysqlx-installxplugin.tmp 2>&1 ## Suppress errors that are expected for the next few tests call mtr.add_suppression("Plugin mysqlx reported: 'Session error: Session was killed"); call mtr.add_suppression("Plugin mysqlx reported: 'Error executing CREATE USER IF NOT EXISTS mysqlxsys@localhost'"); call mtr.add_suppression("Plugin mysqlx reported: 'Authentication account could not be created, mysqlx plugin will be inaccessible.'"); ##start server without mysqlplugin loaded but with its variables and observe server log and variables uninstall plugin mysqlx; let $restart_parameters = restart: --loose-mysqlx_idle_worker_thread_timeout=70 --loose-mysqlx_max_allowed_packet=4048576 --loose-mysqlx_max_connections=500 --loose-mysqlx_min_worker_threads=50; --let $wait_for_tcpsocket_status = no_wait --let $wait_for_unixsocket_status = no_wait --source ../include/restart_mysqld_and_wait_for_xplugin.inc --replace_regex /ERROR.*(No connection could be made because the target machine actively refused it connecting to *| *Connection refused connecting to*) .*:[0-9]*/ERROR: Connection refused connecting to HOST:PORT/ --error 1 --exec $MYSQLXTEST -u root --password='' --file=$MYSQL_TMP_DIR/mysqlx-connection_current_user.tmp 2>&1 show variables like 'mysqlx_idle_worker_thread_timeout%'; show variables like 'mysqlx_max_allowed_packet%'; show variables like 'mysqlx_max_connections%'; show variables like 'mysqlx_min_worker_threads%'; --source ../include/xplugin_install_and_wait.inc show variables like 'mysqlx_idle_worker_thread_timeout%'; show variables like 'mysqlx_max_allowed_packet%'; show variables like 'mysqlx_max_connections%'; show variables like 'mysqlx_min_worker_threads%'; --replace_regex /\.dll/.so/ SELECT PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_STATUS,PLUGIN_TYPE,LOAD_OPTION from information_schema.plugins where PLUGIN_NAME LIKE 'mysqlx%'; ##uninstall mysqlx plugin with old protocol session when server started with mysqlx plugin variables with other than default values uninstall plugin mysqlx; --replace_regex /\.dll/.so/ let $restart_parameters = restart: --plugin-load=$MYSQLXPLUGIN --mysqlx_idle_worker_thread_timeout=70 --mysqlx_max_allowed_packet=4048576 --mysqlx_max_connections=500 --mysqlx_min_worker_threads=50; --source ../include/restart_mysqld_and_wait_for_xplugin.inc show variables like 'mysqlx_idle_worker_thread_timeout%'; show variables like 'mysqlx_max_allowed_packet%'; show variables like 'mysqlx_max_connections%'; show variables like 'mysqlx_min_worker_threads%'; uninstall plugin mysqlx; show variables like 'mysqlx_idle_worker_thread_timeout%'; show variables like 'mysqlx_max_allowed_packet%'; show variables like 'mysqlx_max_connections%'; show variables like 'mysqlx_min_worker_threads%'; SELECT PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_STATUS,PLUGIN_TYPE,LOAD_OPTION from information_schema.plugins where PLUGIN_NAME LIKE 'mysqlx%'; --source ../include/xplugin_install_and_wait.inc ###start server without this plugin and install plugin using mysql and restart without this plugin and connect using xprotocol uninstall plugin mysqlx; let $restart_parameters = restart: --max_connections=151; --let $wait_for_tcpsocket_status = no_wait --let $wait_for_unixsocket_status = no_wait --source ../include/restart_mysqld_and_wait_for_xplugin.inc --source ../include/xplugin_install_and_wait.inc let $restart_parameters = restart: --max_connections=151; --source ../include/restart_mysqld_and_wait_for_xplugin.inc --exec $MYSQLXTEST -u root --password='' --file=$MYSQL_TMP_DIR/mysqlx-connection_current_user.tmp 2>&1 ###start server without this plugin and install plugin using mysql and restart without this plugin and having these plugin variables and connect using xprotocol:server should be started with given mysqlxplugin variablessuccess uninstall plugin mysqlx; let $restart_parameters = restart: --max_connections=151; --let $wait_for_tcpsocket_status = no_wait --let $wait_for_unixsocket_status = no_wait --source ../include/restart_mysqld_and_wait_for_xplugin.inc --source ../include/xplugin_install_and_wait.inc let $restart_parameters = restart: --max_connections=151 --mysqlx_idle_worker_thread_timeout=70 --mysqlx_max_allowed_packet=4048576 --mysqlx_max_connections=500 --mysqlx_min_worker_threads=50; --source ../include/restart_mysqld_and_wait_for_xplugin.inc --exec $MYSQLXTEST -u root --password='' --file=$MYSQL_TMP_DIR/mysqlx-xplugin-variables.tmp 2>&1 ##start server with wrong plugin-dir and try to install plugin uninstall plugin mysqlx; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR let $restart_parameters = restart: --plugin-dir=$MYSQL_TMP_DIR/ ; --let $wait_for_tcpsocket_status = no_wait --let $wait_for_unixsocket_status = no_wait --source ../include/restart_mysqld_and_wait_for_xplugin.inc --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR --replace_regex /(Can\'t open shared library).*$/\1/ /\.dll/.so/ --error 1126 --eval INSTALL PLUGIN mysqlx soname "$MYSQLXPLUGIN" let $restart_parameters = restart: ; --let $wait_for_tcpsocket_status = no_wait --let $wait_for_unixsocket_status = no_wait --source ../include/restart_mysqld_and_wait_for_xplugin.inc --source ../include/xplugin_install_and_wait.inc ###uninstall mysqlx plugin with new protocol session when server started ###with mysqlx plugin variables with other than default values uninstall plugin mysqlx; --replace_regex /\.dll/.so/ let $restart_parameters = restart: --plugin-load=$MYSQLXPLUGIN --mysqlx_idle_worker_thread_timeout=70 --mysqlx_max_allowed_packet=4048576 --mysqlx_max_connections=500 --mysqlx_min_worker_threads=50; --source ../include/restart_mysqld_and_wait_for_xplugin.inc --exec $MYSQLXTEST -u root --password='' --file=$MYSQL_TMP_DIR/mysqlx-uninstallxplugin.tmp 2>&1 ###uninstall mysqlx plugin when xplugin variables are in use,by mysqlx protocol session --exec $MYSQLXTEST -u session --password='session' --file=$MYSQL_TMP_DIR/mysqlx-uninstallxplugin-variables.tmp 2>&1 ###try uninstaling mysqlx plugin with unprivileged user using mysqlx protocol --exec $MYSQLXTEST -u session --password='session' --file=$MYSQL_TMP_DIR/mysqlx-uninstallxplugin.tmp 2>&1 --remove_file $MYSQL_TMP_DIR/mysqlx-connection_current_user.tmp --remove_file $MYSQL_TMP_DIR/mysqlx-installxplugin.tmp --remove_file $MYSQL_TMP_DIR/mysqlx-setup.tmp --remove_file $MYSQL_TMP_DIR/mysqlx-uninstallxplugin.tmp --remove_file $MYSQL_TMP_DIR/mysqlx-uninstallxplugin-variables.tmp --remove_file $MYSQL_TMP_DIR/mysqlx-xplugin-variables.tmp ##cleanup drop user xplugin@localhost; drop user session@localhost; uninstall plugin mysqlx;