Skip to content

Instantly share code, notes, and snippets.

@yoku0825
Created February 24, 2021 13:51
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 yoku0825/3298e2ffdd3d1697702bda172c9fe9c0 to your computer and use it in GitHub Desktop.
Save yoku0825/3298e2ffdd3d1697702bda172c9fe9c0 to your computer and use it in GitHub Desktop.
REPLICATION SLAVE権限があったらoffline_modeでも切らないパッチ
--- sql/auth/sql_authentication.cc.orig 2020-12-10 12:01:55.000000000 +0900
+++ sql/auth/sql_authentication.cc 2021-02-24 22:46:58.821476338 +0900
@@ -2401,3 +2401,3 @@
- if (!(sctx->check_access(SUPER_ACL)) && !thd->is_error())
+ if (!(sctx->check_access(SUPER_ACL) || sctx->check_access(REPL_SLAVE_ACL)) && !thd->is_error())
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment