| 1 |
# Tests for PERFORMANCE_SCHEMA |
| 2 |
|
| 3 |
--source ../include/start_server_common.inc |
| 4 |
|
| 5 |
# Expect instances |
| 6 |
show global variables like "performance_schema_max_table_instances"; |
| 7 |
|
| 8 |
# Expect no handles |
| 9 |
show global variables like "performance_schema_max_table_handles"; |
| 10 |
|
| 11 |
# Create an instrumented table |
| 12 |
--disable_warnings |
| 13 |
drop table if exists test.instrument_me; |
| 14 |
--enable_warnings |
| 15 |
|
| 16 |
create table test.instrument_me(a int); |
| 17 |
insert into test.instrument_me values (1), (2), (3); |
| 18 |
select * from test.instrument_me; |
| 19 |
drop table test.instrument_me; |
| 20 |
|
| 21 |
# Expect no instances lost |
| 22 |
show global variables like "performance_schema_max_table_instances"; |
| 23 |
|
| 24 |
# We lost all the handles |
| 25 |
--disable_warnings |
| 26 |
select variable_value > 0 from performance_schema.global_status |
| 27 |
where variable_name like 'PERFORMANCE_SCHEMA_TABLE_HANDLES_LOST'; |
| 28 |
--enable_warnings |
| 29 |
|