You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.1 KiB

6 years ago
  1. # Tests for PERFORMANCE_SCHEMA
  2. --source include/not_embedded.inc
  3. --source include/have_perfschema.inc
  4. --disable_result_log
  5. select * from performance_schema.metadata_locks;
  6. --enable_result_log
  7. select * from performance_schema.metadata_locks
  8. where object_name='foo';
  9. --error ER_TABLEACCESS_DENIED_ERROR
  10. insert into performance_schema.metadata_locks
  11. set object_name='FOO', owner_thread_id=1;
  12. --error ER_TABLEACCESS_DENIED_ERROR
  13. update performance_schema.metadata_locks
  14. set owner_thread_id=12 where object_name='foo';
  15. --error ER_TABLEACCESS_DENIED_ERROR
  16. delete from performance_schema.metadata_locks;
  17. --error ER_TABLEACCESS_DENIED_ERROR
  18. delete from performance_schema.metadata_locks
  19. where timer_name='CYCLE';
  20. -- error ER_TABLEACCESS_DENIED_ERROR
  21. LOCK TABLES performance_schema.metadata_locks READ;
  22. UNLOCK TABLES;
  23. -- error ER_TABLEACCESS_DENIED_ERROR
  24. LOCK TABLES performance_schema.metadata_locks WRITE;
  25. UNLOCK TABLES;
  26. --echo #
  27. --echo # MDEV-25325 column_comment for performance_schema tables
  28. --echo #
  29. select column_name, column_comment
  30. from information_schema.columns
  31. where table_schema='performance_schema' and table_name='metadata_locks';