Bug #91825 The user table is renamed as "SYSTEM_USER" in DIGEST_TEXT of history tables
Submitted: 30 Jul 2018 6:16 Modified: 30 Jul 2018 6:57
Reporter: Jaime Sicam Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Performance Schema Severity:S3 (Non-critical)
Version:5.7.23, 8.0.12, 5.7.22 OS:Any
Assigned to: CPU Architecture:Any

[30 Jul 2018 6:16] Jaime Sicam
Description:
The "user" table is renamed to "SYSTEM_USER" in DIGEST_TEXT of performance_schema.events_statements_history when performing operations on the "user" table

How to repeat:
CREATE DATABASE db1;
USE db1;
CREATE TABLE user(id int not null AUTO_INCREMENT PRIMARY KEY);
CREATE TABLE user2(id int not null AUTO_INCREMENT PRIMARY KEY);

INSERT INTO user() VALUES();
UPDATE user SET id = -1;
DELETE FROM user;

INSERT INTO user2() VALUES();
UPDATE user2 SET id = -1;
DELETE FROM user2;

SELECT SQL_TEXT, DIGEST_TEXT FROM performance_schema.events_statements_history;

+----------------------------------------------------------------+--------------------------------------------------------------------------------+
| SQL_TEXT                                                       | DIGEST_TEXT                                                                    |
+----------------------------------------------------------------+--------------------------------------------------------------------------------+
| UPDATE user SET id = -1                                        | UPDATE SYSTEM_USER SET `id` = - ?                                              |
| DELETE FROM user                                               | DELETE FROM SYSTEM_USER                                                        |
| INSERT INTO user2() VALUES()                                   | INSERT INTO `user2` ( ) VALUES ( )                                             |
| UPDATE user2 SET id = -1                                       | UPDATE `user2` SET `id` = - ?                                                  |
| DELETE FROM user2                                              | DELETE FROM `user2`                                                            |
| show databases                                                 | SHOW SCHEMAS                                                                   |
| show tables                                                    | SHOW TABLES                                                                    |
| CREATE TABLE user(id int not null AUTO_INCREMENT PRIMARY KEY)  | CREATE TABLE SYSTEM_USER ( `id` INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY )  |
| CREATE TABLE user2(id int not null AUTO_INCREMENT PRIMARY KEY) | CREATE TABLE `user2` ( `id` INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY )      |
| INSERT INTO user() VALUES()                                    | INSERT INTO SYSTEM_USER ( ) VALUES ( )                                         |
+----------------------------------------------------------------+--------------------------------------------------------------------------------+
[30 Jul 2018 6:57] MySQL Verification Team
Hello Jaime,

Thank you for the report and test case.
Verified as described.

Thanks,
Umesh
[16 Jun 2020 8:44] Tsubasa Tanaka
Still affected 8.0.20, 5.7.30, 5.6.48..