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

Partially successful multi-user DROP breaks filtered replication

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Confirmed (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.5, 10.1, 10.2, 10.3, 10.3.22, 10.4, 10.0
    • Fix Version/s: 5.5, 10.1, 10.2, 10.3, 10.4, 10.0
    • Component/s: Replication
    • Labels:
      None
    • Environment:

      Description

      ## Master creates a user and it exists:
       
      MariaDB [(none)]> select user, host from mysql.user where user not in ('repl','root') order by user, host;
      Empty set (0.000 sec)
       
      MariaDB [(none)]> create user mgtest@'192.168.100.%';
      Query OK, 0 rows affected (0.001 sec)
       
      MariaDB [(none)]> select user, host from mysql.user where user not in ('repl','root') order by user, host;
      +--------+---------------+
      | user   | host          |
      +--------+---------------+
      | mgtest | 192.168.100.% |
      +--------+---------------+
      1 row in set (0.000 sec)
      

      ## User does not exist on replica due to replication filtering:
       
      MariaDB [(none)]> select user, host from mysql.user where user not in ('repl','root') order by user, host;
      Empty set (0.000 sec)
       
      MariaDB [(none)]> pager grep Seconds
      PAGER set to 'grep Seconds'
      MariaDB [(none)]> show slave status\G
               Seconds_Behind_Master: 0
      1 row in set (0.000 sec)
      

      ## Master drops valid user along with nonexistent user:
       
      MariaDB [(none)]> drop user mgtest@'192.168.100.%', mgtest;
      ERROR 1396 (HY000): Operation DROP USER failed for 'mgtest'@'%'
      MariaDB [(none)]> select user, host from mysql.user where user not in ('repl','root') order by user, host;
      Empty set (0.001 sec)
      

      ## Replica is broken:
       
      Last_SQL_Error: Query caused different errors on master and slave.     Error on master: message (format)='Operation %s failed for %.256s' error code=1396 ; Error on slave: actual message='no error', error code=0. Default database: ''. Query: 'drop user mgtest@'192.168.100.%', mgtest'
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Elkin Andrei Elkin
              Reporter:
              mg MG
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: