Help Center/ TaurusDB/ Troubleshooting/ SQL Issues/ Error Message Reported When select * from sys.innodb_lock_waits Is Executed
Updated on 2024-12-30 GMT+08:00

Error Message Reported When select * from sys.innodb_lock_waits Is Executed

Scenario

The output of the following statement was not as expected.

select * from sys.innodb_lock_waits

The following error message was displayed:

Execution failed. Cause: (conn=14690848) Illegal mix of collations (utf8mb4_0900_ai_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '='

Possible Causes

This error usually occurs when two tables, fields, or databases with different character set encodings are compared.

Solution

If the character set used by the client for connection is different from that used by the database, adjust the configuration of the client to let it use the same character set to connect to the database, or explicitly set the character set of the client after it is connected to the database.

You can explicitly set the character set as follows:

set collation_connection = utf8mb4_general_ci;

utf8mb4_general_ci indicates the desired character set and collation rule.

If the following information is displayed, the character set is set successfully:

Query OK, 0 rows affected (0.00 sec)