Bug #87674 Table 'user' was not locked with LOCK TABLES on FLUSH PRIVILEGES

Submitted: 6 Sep 2017 4:39 Modified: 6 Sep 2017 5:47
Reporter: Roel Van de Paar Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Security: Privileges Severity:S1 (Critical)
Version:5.7.17, 5.6.37, 5.7.19 OS:Any
Assigned to: CPU Architecture:Any

[6 Sep 2017 4:39] Roel Van de Paar
Description:
Using the testcase in  'How to repeat', we get;
...
5.7.17>CREATE TABLE t1(c1 CHAR (1));
Query OK, 0 rows affected (0.09 sec)

5.7.17>FLUSH TABLES t1 FOR EXPORT;
Query OK, 0 rows affected (0.05 sec)

5.7.17>FLUSH PRIVILEGES;
ERROR 1100 (HY000): Table 'user' was not locked with LOCK TABLES

How to repeat:
DROP DATABASE test;CREATE DATABASE test;USE test;
CREATE TABLE t1(c1 CHAR (1));
FLUSH TABLES t1 FOR EXPORT;
FLUSH PRIVILEGES;

Suggested fix:
Related: https://dev.mysql.com/doc/refman/5.7/en/flush.html#flush-tables-for-export-with-list
[6 Sep 2017 5:47] MySQL Verification Team
Hi Roel,

Thank you for the report.

Thanks,
Umesh

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.060 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.