Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-36425

Extend read_only to also block share locks and super users

Details

    Description

      Currently the read_only option is defined the following way:
      Make all non-temporary tables read-only, with the exception for replication (slave) threads and users with the 'READ ONLY ADMIN' privilege.

      The current implementation of read_only does not block users from using
      SELECT ... LOCK IN SHARE MODE or LOCK TABLES ... READ, both of which can block
      replication threads from continuing. LOCK IN SHARE MODE is especially dangerous as it takes write locks, which will block replication threads.

      The solve this issue, we plan to extend the --read_only option to have 3 levels:
      Note that the read_only option has no effects on slave/replica threads or temporary tables.
      0 changes allowed
      1 Make all non-temporary tables read-only, with the exception for users with the 'READ ONLY ADMIN' privilege.
      2 block also LOCK TABLES and SELECT IN SHARE MOD
      3 block also users with 'READ ONLY ADMIN' privilege. This is sames as MySQL's super_read_only option.

      Attachments

        Issue Links

          Activity

            People

              elenst Elena Stepanova
              monty Michael Widenius
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.