[MDEV-10090] Error message for CREATE USER of existing user is unhelpful Created: 2016-05-20  Updated: 2023-04-27

Status: Confirmed
Project: MariaDB Server
Component/s: Admin statements
Affects Version/s: 5.5, 10.0, 10.1, 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.4, 10.5

Type: Bug Priority: Minor
Reporter: Anders Karlsson Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: upstream


 Description   

Creating a user that already exists does not show a helpful message, it just says that it failed:

CREATE USER 'foo'@'bar.com';
CREATE USER 'foo'@'bar.com';
ERROR 1396 (HY000): Operation CREATE USER failed for 'foo'@'bar.com'

This is not helpful at all and is not in line with other CREATE statements, such as create table:

CREATE TABLE foo(bar INT);
CREATE TABLE foo(bar INT);
ERROR 1050 (42S01): Table 'foo' already exists

An error message is supposed to tell you what went wrong, if possible, not only that it went wrong, just like with the CREATE TABLE statement above, and not as in the CREATE USER statement. This is also true for RENAME USER.



 Comments   
Comment by Elena Stepanova [ 2016-05-27 ]

One of the ancient upstream issues: https://bugs.mysql.com/bug.php?id=28331

Generated at Thu Feb 08 07:39:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.