[MDEV-648] LP:1002404 - DROP USER can't drop users with legacy upper case host name anymore Created: 2012-05-21  Updated: 2014-04-14  Resolved: 2014-04-14

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.5.35, 10.0.8, 5.1.73, 5.2.15, 5.3.13

Type: Bug Priority: Minor
Reporter: Hartmut Holzgraefe Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: Launchpad, upstream

Attachments: XML File LPexportBug1002404.xml    

 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



 Comments   
Comment by Hartmut Holzgraefe [ 2012-05-22 ]

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

Comment by Rasmus Johansson (Inactive) [ 2012-05-30 ]

Launchpad bug id: 1002404

Comment by Elena Stepanova [ 2014-04-14 ]

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

Generated at Thu Feb 08 06:30:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.