| 1 |
# Tests for PERFORMANCE_SCHEMA |
| 2 |
|
| 3 |
--source include/not_embedded.inc |
| 4 |
--source include/have_perfschema.inc |
| 5 |
|
| 6 |
--disable_result_log |
| 7 |
select * from performance_schema.events_statements_history |
| 8 |
where event_name like 'statement/%' limit 1; |
| 9 |
|
| 10 |
select * from performance_schema.events_statements_history |
| 11 |
where event_name='FOO'; |
| 12 |
|
| 13 |
select * from performance_schema.events_statements_history |
| 14 |
where event_name like 'statement/%' order by timer_wait limit 1; |
| 15 |
|
| 16 |
select * from performance_schema.events_statements_history |
| 17 |
where event_name like 'statement/%' order by timer_wait desc limit 1; |
| 18 |
--enable_result_log |
| 19 |
|
| 20 |
--error ER_TABLEACCESS_DENIED_ERROR |
| 21 |
insert into performance_schema.events_statements_history |
| 22 |
set thread_id='1', event_id=1, |
| 23 |
event_name='FOO', timer_start=1, timer_end=2, timer_wait=3; |
| 24 |
|
| 25 |
--error ER_TABLEACCESS_DENIED_ERROR |
| 26 |
update performance_schema.events_statements_history |
| 27 |
set timer_start=12; |
| 28 |
|
| 29 |
--error ER_TABLEACCESS_DENIED_ERROR |
| 30 |
update performance_schema.events_statements_history |
| 31 |
set timer_start=12 where thread_id=0; |
| 32 |
|
| 33 |
--error ER_TABLEACCESS_DENIED_ERROR |
| 34 |
delete from performance_schema.events_statements_history |
| 35 |
where thread_id=1; |
| 36 |
|
| 37 |
--error ER_TABLEACCESS_DENIED_ERROR |
| 38 |
delete from performance_schema.events_statements_history; |
| 39 |
|
| 40 |
-- error ER_TABLEACCESS_DENIED_ERROR |
| 41 |
LOCK TABLES performance_schema.events_statements_history READ; |
| 42 |
UNLOCK TABLES; |
| 43 |
|
| 44 |
-- error ER_TABLEACCESS_DENIED_ERROR |
| 45 |
LOCK TABLES performance_schema.events_statements_history WRITE; |
| 46 |
UNLOCK TABLES; |
| 47 |
|
| 48 |
--echo # |
| 49 |
--echo # MDEV-25325 column_comment for performance_schema tables |
| 50 |
--echo # |
| 51 |
select column_name, column_comment |
| 52 |
from information_schema.columns |
| 53 |
where table_schema='performance_schema' and table_name='events_statements_history'; |