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

"flush privileges" statement not replicated

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5.35-galera
    • None
    • None
    • None

    Description

      Scenario: increasing username size limit to 80 chars (https://mariadb.com/kb/en/create-user/)

      Connect to node01 (out of 3 nodes), execute the ALTER TABLE/FLUSH PRIVILEGES.
      Check on node02 and node03: table schema is the same as on node01 (myisam replication is enabled).
      Create a user with name longer than 16 chars.

      Expected result: the user is created on all the nodes.
      Actual result: the user is created only on node01, the following error appears in node02 and node03

      140218 13:57:37 [ERROR] Slave SQL: Error 'String 'xxxxxxxx.xxxxxxxx' is too long for user name (should be no longer than 16)' on query. Default database: ''. Query: 'create user 'xxxxxxxx.xxxxxxxx'@'localhost' identified via pam', Error_code: 1470
      140218 13:57:37 [Warning] WSREP: RBR event 1 Query apply warning: 1, 747464080
      140218 13:57:37 [Warning] WSREP: Ignoring error for TO isolated action: source: d6415d69-97ba-11e3-b256-4a2b07b481ae version: 3 local: 0 state: APPLYING flags: 65 conn_id: 2166950 trx_id: -1 seqnos (l: 18071684, g: 747464080, s: 747464079, d: 747464079, ts: 280370647792084)

      Solution: execute FLUSH PRIVILEGES on all the nodes of the cluster after ALTER TABLE.

      I'm not sure that replicating FLUSH PRIVILEGES across the cluster is correct, but in that case the documentation should be updated.

      Attachments

        Activity

          People

            nirbhay_c Nirbhay Choubey (Inactive)
            giannello Giuseppe Iannello
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.