Bug #93277 NON_PERSIST flags doesn't work without READ_ONLY
Submitted: 21 Nov 2018 15:11 Modified: 3 Jan 11:49
Reporter: Przemysław Skibiński (OCA) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:8.0.13 OS:Any
Assigned to: CPU Architecture:Any

[21 Nov 2018 15:11] Przemysław Skibiński
Description:
I found that `NON_PERSIST` doesn't work without `READ_ONLY`.
`Sys_keyring_operations` is `NON_PERSIST GLOBAL_VAR` and the following should return error:
`SET @@persist_only.keyring_operations = "Shoudn't work";`  
But there is no error.

How to repeat:
SET @@persist_only.keyring_operations= "Shoudn't work";

Suggested fix:
set_var::resolve should also detect "non persistent". Currently there is only:

  if (var->is_readonly()) {
    if (type != OPT_PERSIST_ONLY) {
      my_error(ER_INCORRECT_GLOBAL_LOCAL_VAR, MYF(0), var->name.str,
               "read only");
      DBUG_RETURN(-1);
    }
    if (type == OPT_PERSIST_ONLY && var->is_non_persistent()) {
      my_error(ER_INCORRECT_GLOBAL_LOCAL_VAR, MYF(0), var->name.str,
               "non persistent read only");
      DBUG_RETURN(-1);
    }
  }
[22 Nov 2018 5:55] Umesh Shastry
Hello Przemysław,

Thank you for the report and feedback!

regards,
Umesh
[3 Jan 11:49] Erlend Dahl
No longer repeatable on 8.0.15.