Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-5629

Variable handling with SET PERSIST does not match upstream

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: Not 5.6, Not 5.7, 8.0.15-6
    • Fix Version/s: None
    • Component/s: None
    • Environment:
      docker run --rm -it --name ps-80 -e MYSQL_ROOT_PASSWORD=my-secret-pw percona/percona-server:8.0
      

      Description

      At least for the super_read_only variable it is possible to prevent the server from starting by using SET PERSIST and an integer instead of the constant:

      Latest Docker image
      mysql> set persist_only super_read_only = ON;
      Query OK, 0 rows affected (0.00 sec)
      
      mysql> system fgrep super /var/lib/mysql/mysqld-auto.cnf
      { "Version" : 1 , "mysql_server" : { "super_read_only" : { "Value" : "ON" , "Metadata" : { "Timestamp" : 1557927407293434 , "User" : "root" , "Host" : "localhost" } } } }
      
      mysql> set persist_only super_read_only = 1;
      Query OK, 0 rows affected (0.00 sec)
      
      mysql> system fgrep super /var/lib/mysql/mysqld-auto.cnf
      { "Version" : 1 , "mysql_server" : { "super_read_only" : { "Value" : "1" , "Metadata" : { "Timestamp" : 1557927425523504 , "User" : "root" , "Host" : "localhost" } } } }
      
      mysql> select @@version, @@version_comment; 
      +-----------+---------------------------------------------------+
      | @@version | @@version_comment                                 |
      +-----------+---------------------------------------------------+
      | 8.0.15-6  | Percona Server (GPL), Release 6, Revision 63abd08 |
      +-----------+---------------------------------------------------+
      1 row in set (0.00 sec)
      

      Saving an integer causes:

      [ERROR] [MY-011268] [Server] Configuring persisted options failed: "Variable 'super_read_only' can't be set to the value of '1'".
      [ERROR] [MY-010175] [Server] Setting persistent options failed.
      

      This does not happen with the upstream version:

      mysql/mysql-server:8.0.15
      mysql> set persist super_read_only = 1;
      Query OK, 0 rows affected (0.00 sec)
      
      mysql> system fgrep super /var/lib/mysql/mysqld-auto.cnf
      { "Version" : 1 , "mysql_server" : { "super_read_only" : { "Value" : "ON" , "Metadata" : { "Timestamp" : 1557928437646323 , "User" : "root" , "Host" : "localhost" } } } }
      
      mysql> set persist super_read_only = 0;
      Query OK, 0 rows affected (0.00 sec)
      
      mysql> system fgrep super /var/lib/mysql/mysqld-auto.cnf
      { "Version" : 1 , "mysql_server" : { "super_read_only" : { "Value" : "OFF" , "Metadata" : { "Timestamp" : 1557928448764270 , "User" : "root" , "Host" : "localhost" } } } }
      
      mysql> select @@version, @@version_comment;
      +-----------+------------------------------+
      | @@version | @@version_comment            |
      +-----------+------------------------------+
      | 8.0.15    | MySQL Community Server - GPL |
      +-----------+------------------------------+
      1 row in set (0.00 sec)
      

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ceri.williams Ceri Williams
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: