Bug #95017 Certain error messages were added to the wrong ranges
Submitted: 15 Apr 2019 7:31 Modified: 20 May 2019 14:07
Reporter: Tatjana Nuernberg Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:8 OS:Any
Assigned to: CPU Architecture:Any

[15 Apr 2019 7:31] Tatjana Nuernberg
Description:
In share/errmsg-utf8.txt:
Some messages that are intended for the error log are in the range reserved for messages to the client.
Some messages that are to be sent to the client are in the range reserved for messages to the error log.

How to repeat:
Review errmsg-utf8.txt with regard to the list shown below.

Suggested fix:
plugin/semisync/semisync_master_socket_listener.h
  rare #ifdef'd code-path references unknown symbol
  ER_SEMISYNC_FAILED_TO_HANDLE_SOCKET
  should be
  ER_SEMISYNC_SOCKET_FD_TOO_LARGE

ER_XA_CANT_CREATE_MDL_BACKUP
  Should be in the error log range >= 10k

ER_CANNOT_GRANT_ROLES_TO_ANONYMOUS_USER
  Should be in the client range < 10k

sql/dd/upgrade_57/table.cc
  Duplicate message into errlog range:
-    LogErr(ERROR_LEVEL, ER_IDENT_CAUSES_TOO_LONG_PATH, sizeof(path) - 1, path);
+    LogErr(ERROR_LEVEL, ER_IDENT_CAUSES_TOO_LONG_PATH_IN_UPGRADE,
+           sizeof(path) - 1, path);

sql/dd/upgrade_57/upgrade.cc:
  Duplicate message into errlog range:
-      LogErr(ERROR_LEVEL, ER_BAD_TABLE_ERROR, table->name().c_str());
+      LogErr(ERROR_LEVEL, ER_UNKNOWN_TABLE_IN_UPGRADE, table->name().c_str());

sql/rpl_log_encryption.cc:
  Duplicate message into errlog range:
-        LogErr(ERROR_LEVEL, ER_RPL_ENCRYPTION_FAILED_TO_REMOVE_KEY);
+        LogErr(ERROR_LEVEL, ER_SERVER_RPL_ENCRYPTION_FAILED_TO_REMOVE_KEY);

Tighten assert()s for messages to client.

Perhaps find a way to better guard against bad error logging statements even when they have no corresponding test case.
[20 May 2019 14:07] Paul DuBois
Posted by developer:
 
Fixed in 8.0.17.

Bug affects no released version/internal work. No changelog entry required.