1. 02 Aug, 2013 1 commit
  2. 29 Jul, 2013 2 commits
  3. 28 Jul, 2013 3 commits
  4. 25 Jul, 2013 1 commit
  5. 23 Jul, 2013 1 commit
    • Only revoke GRANT OPTION when user actually has it · 9d0fc0fd
      When revoking privileges from a user, the GRANT OPTION is always
      revoked, even if the user doesn't have it. If the user exists, this
      doesn't give an error, but if the user doesn't exist, it does:
      
      mysql> GRANT ALL ON test.* TO 'test'@'localhost';
      Query OK, 0 rows affected (0.00 sec)
      
      mysql> REVOKE GRANT OPTION ON test.* FROM 'test'@'localhost';
      Query OK, 0 rows affected (0.00 sec)
      
      mysql> REVOKE GRANT OPTION ON test.* FROM 'test'@'localhost';
      Query OK, 0 rows affected (0.00 sec)
      
      mysql> REVOKE ALL ON test.* FROM 'test'@'localhost';
      Query OK, 0 rows affected (0.00 sec)
      
      mysql> REVOKE GRANT OPTION ON test.* FROM 'test'@'localhost';
      ERROR 1141 (42000): There is no such grant defined for user 'test' on
      host 'localhost'
      
      Additionally, in MySQL 5.6 this breaks replication because of
      http://bugs.mysql.com/bug.php?id=68892.
      
      Rather than revoking the GRANT OPTION and catching the error, check if
      the user actually has it and only revoke it when he does.
      Stijn Tintel committed
  6. 22 Jul, 2013 16 commits
  7. 21 Jul, 2013 16 commits