Coming from bug 1631783, the same happens if SET GLOBAL is replaced by SHOW GLOBAL STATUS. What these two have in common is that they set lex->option_type to OPT_GLOBAL, which is then used by SET STATEMENT parsing as-is, without resetting to OPT_SESSION.
Coming from bug 1631783, the same happens if SET GLOBAL is replaced by SHOW GLOBAL STATUS. What these two have in common is that they set lex->option_type to OPT_GLOBAL, which is then used by SET STATEMENT parsing as-is, without resetting to OPT_SESSION.