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

    XMLWordPrintable

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

      Attachments

        Activity

          People

            Unassigned Unassigned
            hholzgra Hartmut Holzgraefe
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.