Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.4
-
None
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.