| 1 |
## Forbiddend sql commands |
| 2 |
|
| 3 |
## Preamble |
| 4 |
--source include/xplugin_preamble.inc |
| 5 |
--source include/xplugin_create_user.inc |
| 6 |
## Test starts here |
| 7 |
--write_file $MYSQL_TMP_DIR/forbidden_sql_cmd.xpl |
| 8 |
|
| 9 |
## Test data |
| 10 |
-->sql |
| 11 |
DROP SCHEMA IF EXISTS xtest; |
| 12 |
CREATE SCHEMA xtest; |
| 13 |
USE xtest; |
| 14 |
|
| 15 |
DROP PROCEDURE IF EXISTS xtest.uninstall_plugin; |
| 16 |
DROP PROCEDURE IF EXISTS xtest.install_plugin; |
| 17 |
DROP PROCEDURE IF EXISTS xtest.shutdown_server; |
| 18 |
|
| 19 |
DELIMITER // |
| 20 |
CREATE PROCEDURE xtest.uninstall_plugin() |
| 21 |
BEGIN |
| 22 |
UNINSTALL PLUGIN `mysqlx`; |
| 23 |
END |
| 24 |
// |
| 25 |
|
| 26 |
CREATE PROCEDURE xtest.install_plugin() |
| 27 |
BEGIN |
| 28 |
INSTALL PLUGIN `mysqlx` SONAME "$MYSQLXPLUGIN"; |
| 29 |
END |
| 30 |
// |
| 31 |
|
| 32 |
CREATE PROCEDURE xtest.shutdown_server() |
| 33 |
BEGIN |
| 34 |
SHUTDOWN; |
| 35 |
END |
| 36 |
// |
| 37 |
DELIMITER ; |
| 38 |
|
| 39 |
-->endsql |
| 40 |
-->expecterror 3130 |
| 41 |
-->sql |
| 42 |
UNINSTALL PLUGIN `mysqlx`; |
| 43 |
-->endsql |
| 44 |
-->expecterror 3130 |
| 45 |
-->sql |
| 46 |
INSTALL PLUGIN `mysqlx` SONAME "$MYSQLXPLUGIN"; |
| 47 |
-->endsql |
| 48 |
-->expecterror 3130 |
| 49 |
-->sql |
| 50 |
SHUTDOWN; |
| 51 |
|
| 52 |
-->endsql |
| 53 |
-->expecterror 3130 |
| 54 |
-->sql |
| 55 |
CALL xtest.uninstall_plugin(); |
| 56 |
-->endsql |
| 57 |
-->expecterror 3130 |
| 58 |
-->sql |
| 59 |
CALL xtest.install_plugin(); |
| 60 |
-->endsql |
| 61 |
-->expecterror 3130 |
| 62 |
-->sql |
| 63 |
CALL xtest.shutdown_server(); |
| 64 |
-->endsql |
| 65 |
|
| 66 |
## Cleanup |
| 67 |
-->sql |
| 68 |
DROP SCHEMA IF EXISTS xtest; |
| 69 |
-->endsql |
| 70 |
EOF |
| 71 |
|
| 72 |
--exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/forbidden_sql_cmd.xpl 2>&1 |
| 73 |
|
| 74 |
## Cleanup |
| 75 |
--source ../include/xplugin_cleanup.inc |
| 76 |
|