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

PASSWORD EXPIRE in multi-user CREATE or ALTER works inconsistently with other user options

    XMLWordPrintable

Details

    Description

      When PASSWORD EXPIRE ... option is provided for the last user in multi-user CREATE or ALTER, it applies to all users in that query:

      CREATE OR REPLACE USER u1 IDENTIFIED BY 'foo', u2 PASSWORD EXPIRE;
       
      +---------------------------------------------------------------------------------------------------------+
      | CREATE USER for u1@%                                                                                    |
      +---------------------------------------------------------------------------------------------------------+
      | CREATE USER 'u1'@'%' IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' PASSWORD EXPIRE |
      +---------------------------------------------------------------------------------------------------------+
      +--------------------------------------+
      | CREATE USER for u2@%                 |
      +--------------------------------------+
      | CREATE USER 'u2'@'%' PASSWORD EXPIRE |
      +--------------------------------------+
      

      When it's provided for a non-last user, it causes a parser error:

      CREATE OR REPLACE USER u1 PASSWORD EXPIRE, u2 IDENTIFIED BY 'foo';
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' u2 IDENTIFIED BY 'foo'' at line 1
      

      Other (older) options work per user, so it appears to be inconsistent.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.