Skip to content

Instantly share code, notes, and snippets.

@byshen
Created August 12, 2020 01:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save byshen/6b14fe2c588a6f4265d43adf16044974 to your computer and use it in GitHub Desktop.
Save byshen/6b14fe2c588a6f4265d43adf16044974 to your computer and use it in GitHub Desktop.
Enhance log messages for aclCheckLocal() related error messages
diff --git a/src/common/errmsg.h b/src/common/errmsg.h
index 2fa52f6..d3afbc4 100755
--- a/src/common/errmsg.h
+++ b/src/common/errmsg.h
@@ -51,7 +51,7 @@
# define HANDSHAKE_ERROR "Bad handshake"
# define ACCESS_DENIED_ERROR "Access to database denied"
# define NO_DB_ERROR "No Database Selected"
-# define PERM_DENIED_ERROR "Permission denied"
+# define PERM_DENIED_ERROR "Permission denied: the operation is only permitted to Admin_User on localhost."
# define UNKNOWN_COM_ERROR "Unknown command"
# define BAD_DIR_ERROR "Can't open directory \"%s\" (%s)"
# define BAD_TABLE_ERROR "Unknown table \"%s\""
@@ -140,7 +140,7 @@
# define HANDSHAKE_ERROR "Bad handshake"
# define ACCESS_DENIED_ERROR "Access to database denied"
# define NO_DB_ERROR "No Database Selected"
-# define PERM_DENIED_ERROR "Permission denied"
+# define PERM_DENIED_ERROR "Permission denied: the operation is only permitted to Admin_User on localhost."
# define UNKNOWN_COM_ERROR "Unknown command"
# define BAD_DIR_ERROR "Can't open directory \"%s\""
# define BAD_TABLE_ERROR "Unknown table \"%s\""
diff --git a/src/msqld/includes/errmsg.h b/src/msqld/includes/errmsg.h
index c2cf646..a981def 100755
--- a/src/msqld/includes/errmsg.h
+++ b/src/msqld/includes/errmsg.h
@@ -51,7 +51,7 @@
# define HANDSHAKE_ERROR "Bad handshake"
# define ACCESS_DENIED_ERROR "Access to database denied"
# define NO_DB_ERROR "No Database Selected"
-# define PERM_DENIED_ERROR "Permission denied"
+# define PERM_DENIED_ERROR "Permission denied: the operation is only permitted to Admin_User on localhost."
# define UNKNOWN_COM_ERROR "Unknown command"
# define BAD_DIR_ERROR "Can't open directory \"%s\" (%s)"
# define BAD_TABLE_ERROR "Unknown table \"%s\""
@@ -148,7 +148,7 @@
# define HANDSHAKE_ERROR "Bad handshake"
# define ACCESS_DENIED_ERROR "Access to database denied"
# define NO_DB_ERROR "No Database Selected"
-# define PERM_DENIED_ERROR "Permission denied"
+# define PERM_DENIED_ERROR "Permission denied: the operation is only permitted to Admin_User on localhost."
# define UNKNOWN_COM_ERROR "Unknown command"
# define BAD_DIR_ERROR "Can't open directory \"%s\""
# define BAD_TABLE_ERROR "Unknown table \"%s\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment