Bug #45324 Performance schema: can write lock
Submitted: 4 Jun 2009 8:53 Modified: 14 Jan 2010 18:06
Reporter: Jørgen Austvik Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Performance Schema Severity:S3 (Non-critical)
Version:mysql-6.0-perfschema OS:Any
Assigned to: Marc ALFF CPU Architecture:Any
Tags: regression

[4 Jun 2009 8:53] Jørgen Austvik
Description:
WL#2360: "PERFORMANCE_SCHEMA tables cannot be locked, indexed, or backed up."

WL#4818: "FSE2: Write Locks: Non SETUP_* tables can not be locked for write, while SETUP_* tables should behave as regular tables, and can be locked"

Test case:

LOCK TABLES performance_schema.MUTEX_INSTANCES READ;
UNLOCK TABLES;

--error ER_DBACCESS_DENIED_ERROR
LOCK TABLES performance_schema.MUTEX_INSTANCES WRITE;
UNLOCK TABLES;

Fails:

mysqltest: At line 36: query 'LOCK TABLES performance_schema.MUTEX_INSTANCES WRITE' succeeded - should have failed with errno 1044...

This is a regression that started this night. I suspect revno: 3158.

How to repeat:
LOCK TABLES performance_schema.MUTEX_INSTANCES WRITE;

Should fail (I think), but does not.
[4 Jun 2009 9:40] Sveta Smirnova
Thank you for the report.

Verified as described. Worked as expected some time ago.
[5 Jun 2009 17:20] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/75734

3164 Marc Alff	2009-06-05
      Bug#45324 Performance schema: can write lock
      
      Added LOCK_TABLES_ACL to the list of forbidden privilege,
      for all performance schema tables using PFS_readonly_ACL
      and PFS_truncatable_ACL.
      
      Locking SETUP_* tables (PFS_updatable_acl) is allowed.
      modified:
        mysql-test/suite/perfschema/include/privilege.inc
        mysql-test/suite/perfschema/r/privilege.result
        mysql-test/suite/perfschema/t/privilege.test
        storage/perfschema/pfs_engine_table.cc
[26 Jun 2009 9:12] Guilhem Bichot
runtime team will be better-suited for reviewing this.
[1 Dec 2009 21:40] Marc ALFF
Reviewed by Dmitry with the SQL_ACL changes
[1 Dec 2009 21:42] Marc ALFF
Queued in mysql-trunk-perfschema
[14 Jan 2010 10:04] Marc ALFF
Merged in:
- mysql-next-mr (Celosia / 5.5.99-m3)
- mysql-6.0-codebase (6.0.14)
[14 Jan 2010 18:06] Paul DuBois
Not in any released version. No changelog entry needed.