// How to repeat [root@cluster-repo mysql-advanced-5.6.20]# bin/mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 15467 Server version: 5.6.20-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial) Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> truncate performance_schema.events_statements_history_long; Query OK, 0 rows affected (0.01 sec) mysql> select sql_text from performance_schema.events_statements_history_long; +------------------------------------------------------------+ | sql_text | +------------------------------------------------------------+ | truncate performance_schema.events_statements_history_long | +------------------------------------------------------------+ 1 row in set (0.00 sec) mysql> \q Bye // Just put some random thing to mysql [root@cluster-repo mysql-advanced-5.6.20]# cat /dev/urandom|head -c 100 | bin/mysql -uroot -p --force Enter password: // Confirm that it indeed warns [root@cluster-repo mysql-advanced-5.6.20]# bin/mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 15733 Server version: 5.6.20-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial) Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> set names utf8mb4; Query OK, 0 rows affected (0.00 sec) mysql> select sql_text from performance_schema.events_statements_history_long; +------------------------------------------------------------------------+ | sql_text | +------------------------------------------------------------------------+ | truncate performance_schema.events_statements_history_long | | select sql_text from performance_schema.events_statements_history_long | | NULL | | select @@version_comment limit 1 | | | | NULL | | select @@version_comment limit 1 | | select sql_text from performance_schema.events_statements_history_long | | show warnings | | set names utf8mb | | set names utf8mb4 | +------------------------------------------------------------------------+ 11 rows in set, 1 warning (0.00 sec) mysql> show warnings; +---------+------+-----------------------------------------------------------------------------------+ | Level | Code | Message | +---------+------+-----------------------------------------------------------------------------------+ | Warning | 1366 | Incorrect string value: '\xDD\xFB*\xB5\xC2\x19...' for column 'SQL_TEXT' at row 5 | +---------+------+-----------------------------------------------------------------------------------+ 1 row in set (0.00 sec)