| 1 |
################################################################################ |
| 2 |
# Test case to test functionality in which a plugin/component can add its own |
| 3 |
# tables in performance schema. |
| 4 |
# |
| 5 |
# This test script: |
| 6 |
# - Tries to load plugin during server bootstrap with --early_plugin_load |
| 7 |
# option. |
| 8 |
################################################################################ |
| 9 |
|
| 10 |
--echo ######### |
| 11 |
--echo # SETUP # |
| 12 |
--echo ######### |
| 13 |
|
| 14 |
call mtr.add_suppression("\\[ERROR\\] \\[[^]]*\\] \\[[^]]*\\] Plugin pfs_example_plugin_employee reported: 'Error returned from add_tables\\(\\)'"); |
| 15 |
call mtr.add_suppression("\\[ERROR\\] \\[[^]]*\\] \\[[^]]*\\] Plugin 'pfs_example_plugin_employee' init function returned error."); |
| 16 |
|
| 17 |
let server_log= $MYSQLTEST_VARDIR/log/mysqld.1.err; |
| 18 |
# $server_log has to be processed by include/search_pattern.inc which |
| 19 |
# contains Perl code requiring that the environment variable SEARCH_FILE points |
| 20 |
# to this file. |
| 21 |
let SEARCH_FILE= $server_log; |
| 22 |
|
| 23 |
--echo # Make sure that the errors, which are returned when plugin is tried to |
| 24 |
--echo # be loaded with --early_plugin_load option, are present in server log. |
| 25 |
let SEARCH_PATTERN= Plugin pfs_example_plugin_employee reported: 'Error returned from add_tables\(\)'; |
| 26 |
--source include/search_pattern.inc |
| 27 |
|
| 28 |
let SEARCH_PATTERN= Plugin 'pfs_example_plugin_employee' init function returned error.; |
| 29 |
--source include/search_pattern.inc |
| 30 |
|
| 31 |
--echo # Install pfs_example_plugin_employee plugin after server is started. |
| 32 |
--replace_regex /\.so|\.dll/.xxx/ |
| 33 |
--eval INSTALL PLUGIN pfs_example_plugin_employee SONAME '$PFS_EXAMPLE_PLUGIN_EMPLOYEE' |
| 34 |
|
| 35 |
--echo ########### |
| 36 |
--echo # CLEANUP # |
| 37 |
--echo ########### |
| 38 |
--eval UNINSTALL PLUGIN pfs_example_plugin_employee |
| 39 |
|
| 40 |
# The message searched is present only if the server starts, restart is needed |
| 41 |
# if this case is to be tested again. |
| 42 |
--source include/force_restart.inc |