--- ../mysql-8.0.32/share/messages_to_clients.txt 2022-12-16 23:34:44.000000000 +0800 +++ mysql-8.0.32/share/messages_to_clients.txt 2023-03-01 19:36:22.997353410 +0800 @@ -7328,7 +7328,9 @@ eng "The password provided for the replication user exceeds the maximum length of 32 characters" ER_USER_LOCK_WRONG_NAME 42000 - eng "Incorrect user-level lock name '%-.192s'." + eng "Incorrect user-level lock name '%-.192s'." +ER_USER_LOCK_OVERLONG_NAME 42000 + eng "Exceed user-level lock name limit '%-.192s'." # Should be different from ER_LOCK_DEADLOCK since it doesn't cause implicit # rollback. Should not be mapped to SQLSTATE 40001 for the same reason. --- ../mysql-8.0.32/sql/item_func.cc 2022-12-16 23:34:44.000000000 +0800 +++ mysql-8.0.32/sql/item_func.cc 2023-03-01 19:34:28.149942309 +0800 @@ -5284,7 +5284,7 @@ if (well_formed_error_pos || cannot_convert_error_pos || from_end_pos < org_name->ptr() + org_name->length()) { ErrConvString err(org_name); - my_error(ER_USER_LOCK_WRONG_NAME, MYF(0), err.ptr()); + my_error(ER_USER_LOCK_OVERLONG_NAME, MYF(0), err.ptr()); return true; }