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

LP:1002404 - DROP USER can't drop users with legacy upper case host name anymore

    Details

      Description

      Description:
      As DROP USER lowercases the host name part of the user name now (see MySQL bug http://bugs.mysql.com/36742) it is not possible to drop users with host names with upper case letters in them (either from pre-5.1.53 installations or due to bug #1002404)

      Such users either need to be removed by either removing them from the mysql.user table using DELETE or by first converting the host name part in mysql.user to all lower case using UPDATE and LOWER

      (See also MySQL bug http://bugs.mysql.com/61525)

      How to repeat:
      (assuming that bug #1002404 has not been fixed yet)

      on the shell do

        hostname FOOBAR

      in the mysql command line client

        SELECT User, Hostname FROM mysql.user WHERE Host = 'FOOBAR';
      
        DROP USER 'root'@'FOOBAR';
      
        SELECT User, Hostname FROM mysql.user WHERE Host = 'FOOBAR';
      

      the DROP will report "0 rows affected" and both SELECTs will return the same result, proving that no user was deleted by the DROP statement

      Suggested fix:
      Make DROP USER really case insensitive regarding to the host name part

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              hholzgra Hartmut Holzgraefe added a comment -

              Re: DROP USER can't drop users with legacy upper case host name anymore
              Alternative fix: let mysl_upgrade take care of converting all mysql.*.Host column contents to lowercase

              Show
              hholzgra Hartmut Holzgraefe added a comment - Re: DROP USER can't drop users with legacy upper case host name anymore Alternative fix: let mysl_upgrade take care of converting all mysql.*.Host column contents to lowercase
              Hide
              ratzpo Rasmus Johansson added a comment -

              Launchpad bug id: 1002404

              Show
              ratzpo Rasmus Johansson added a comment - Launchpad bug id: 1002404
              Hide
              elenst Elena Stepanova added a comment -

              The upstream bug was fixed in MySQL 5.1.73 / 5.5.35 / 5.6.15.

              Show
              elenst Elena Stepanova added a comment - The upstream bug was fixed in MySQL 5.1.73 / 5.5.35 / 5.6.15.

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  hholzgra Hartmut Holzgraefe
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: