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

Error message for CREATE USER of existing user is unhelpful

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5(EOL)
    • 10.6
    • Admin statements

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            karlsson Anders Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.