| 1 |
################################################################################ |
| 2 |
# Test case to test functionality in which a plugin/component can add its own |
| 3 |
# tables in performance schema. |
| 4 |
# |
| 5 |
################################################################################ |
| 6 |
|
| 7 |
--echo ################# |
| 8 |
--echo # INITIAL STATE # |
| 9 |
--echo ################# |
| 10 |
|
| 11 |
select * from INFORMATION_SCHEMA.tables |
| 12 |
where TABLE_NAME like "pfs_example_%"; |
| 13 |
|
| 14 |
--error ER_NO_SUCH_TABLE |
| 15 |
describe performance_schema.pfs_example_employee_name; |
| 16 |
|
| 17 |
--error ER_NO_SUCH_TABLE |
| 18 |
show create table performance_schema.pfs_example_employee_name; |
| 19 |
|
| 20 |
--error ER_NO_SUCH_TABLE |
| 21 |
select * from performance_schema.pfs_example_employee_name; |
| 22 |
|
| 23 |
--echo ########### |
| 24 |
--echo # INSTALL # |
| 25 |
--echo ########### |
| 26 |
--replace_regex /\.so|\.dll/.xxx/ |
| 27 |
--eval INSTALL PLUGIN pfs_example_plugin_employee SONAME '$PFS_EXAMPLE_PLUGIN_EMPLOYEE' |
| 28 |
|
| 29 |
select TABLE_SCHEMA, TABLE_NAME, ENGINE, VERSION, TABLE_COMMENT |
| 30 |
from INFORMATION_SCHEMA.tables |
| 31 |
where TABLE_NAME like "pfs_example_%" |
| 32 |
order by table_name; |
| 33 |
|
| 34 |
describe performance_schema.pfs_example_employee_name; |
| 35 |
|
| 36 |
show create table performance_schema.pfs_example_employee_name; |
| 37 |
|
| 38 |
select * from performance_schema.pfs_example_employee_name; |
| 39 |
|
| 40 |
--echo ############## |
| 41 |
--echo # UN INSTALL # |
| 42 |
--echo ############## |
| 43 |
|
| 44 |
UNINSTALL PLUGIN pfs_example_plugin_employee; |
| 45 |
|
| 46 |
select * from INFORMATION_SCHEMA.tables |
| 47 |
where TABLE_NAME like "pfs_example_%"; |
| 48 |
|
| 49 |
--error ER_NO_SUCH_TABLE |
| 50 |
describe performance_schema.pfs_example_employee_name; |
| 51 |
|
| 52 |
--error ER_NO_SUCH_TABLE |
| 53 |
show create table performance_schema.pfs_example_employee_name; |
| 54 |
|
| 55 |
--error ER_NO_SUCH_TABLE |
| 56 |
select * from performance_schema.pfs_example_employee_name; |
| 57 |
|
| 58 |
--error ER_NO_SUCH_TABLE |
| 59 |
insert into performance_schema.pfs_example_employee_name |
| 60 |
values (1, "First", "Last"); |
| 61 |
|
| 62 |
--error ER_NO_SUCH_TABLE |
| 63 |
update performance_schema.pfs_example_employee_name |
| 64 |
set employee_number = 2 where employee_number = 1; |
| 65 |
|
| 66 |
--error ER_NO_SUCH_TABLE |
| 67 |
delete from performance_schema.pfs_example_employee_name; |
| 68 |
|
| 69 |
--echo ########################################## |
| 70 |
--echo # SERVER RESTART, AFTER PLUGIN UNINSTALL # |
| 71 |
--echo ########################################## |
| 72 |
|
| 73 |
--source include/restart_mysqld.inc |
| 74 |
|
| 75 |
select * from INFORMATION_SCHEMA.tables |
| 76 |
where TABLE_NAME like "pfs_example_%"; |
| 77 |
|
| 78 |
--error ER_NO_SUCH_TABLE |
| 79 |
describe performance_schema.pfs_example_employee_name; |
| 80 |
|
| 81 |
--error ER_NO_SUCH_TABLE |
| 82 |
show create table performance_schema.pfs_example_employee_name; |
| 83 |
|
| 84 |
--error ER_NO_SUCH_TABLE |
| 85 |
select * from performance_schema.pfs_example_employee_name; |
| 86 |
|
| 87 |
--echo ########### |
| 88 |
--echo # INSTALL # |
| 89 |
--echo ########### |
| 90 |
--replace_regex /\.so|\.dll/.xxx/ |
| 91 |
--eval INSTALL PLUGIN pfs_example_plugin_employee SONAME '$PFS_EXAMPLE_PLUGIN_EMPLOYEE' |
| 92 |
|
| 93 |
select TABLE_SCHEMA, TABLE_NAME, ENGINE, VERSION, TABLE_COMMENT |
| 94 |
from INFORMATION_SCHEMA.tables |
| 95 |
where TABLE_NAME like "pfs_example_%" |
| 96 |
order by table_name; |
| 97 |
|
| 98 |
describe performance_schema.pfs_example_employee_name; |
| 99 |
|
| 100 |
show create table performance_schema.pfs_example_employee_name; |
| 101 |
|
| 102 |
select * from performance_schema.pfs_example_employee_name; |
| 103 |
|
| 104 |
--echo ############################################ |
| 105 |
--echo # SERVER RESTART, WITHOUT PLUGIN UNINSTALL # |
| 106 |
--echo ############################################ |
| 107 |
|
| 108 |
--source include/restart_mysqld.inc |
| 109 |
|
| 110 |
select TABLE_SCHEMA, TABLE_NAME, ENGINE, VERSION, TABLE_COMMENT |
| 111 |
from INFORMATION_SCHEMA.tables |
| 112 |
where TABLE_NAME like "pfs_example_%" |
| 113 |
order by table_name; |
| 114 |
|
| 115 |
describe performance_schema.pfs_example_employee_name; |
| 116 |
|
| 117 |
show create table performance_schema.pfs_example_employee_name; |
| 118 |
|
| 119 |
select * from performance_schema.pfs_example_employee_name; |
| 120 |
|
| 121 |
--echo ########### |
| 122 |
--echo # CLEANUP # |
| 123 |
--echo ########### |
| 124 |
|
| 125 |
UNINSTALL PLUGIN pfs_example_plugin_employee; |
| 126 |
|
| 127 |
select * from INFORMATION_SCHEMA.tables |
| 128 |
where TABLE_NAME like "pfs_example_%"; |
| 129 |
|
| 130 |
--error ER_NO_SUCH_TABLE |
| 131 |
describe performance_schema.pfs_example_employee_name; |
| 132 |
|
| 133 |
--error ER_NO_SUCH_TABLE |
| 134 |
show create table performance_schema.pfs_example_employee_name; |
| 135 |
|
| 136 |
--error ER_NO_SUCH_TABLE |
| 137 |
select * from performance_schema.pfs_example_employee_name; |
| 138 |
|