Description:
Unlike other account management statements, ALTER USER ... PASSWORD EXPIRE cannot be prepared:
mysql> prepare stmt from 'ALTER USER \'\'@localhost PASSWORD EXPIRE';
ERROR 1295 (HY000): This command is not supported in the prepared statement prot
ocol yet
mysql> prepare stmt from 'CREATE USER test@localhost';
Query OK, 0 rows affected (0.04 sec)
Statement prepared
mysql> prepare stmt from 'DROP USER test@localhost';
Query OK, 0 rows affected (0.00 sec)
Statement prepared
mysql> prepare stmt from 'GRANT ALL ON *.* TO test@localhost';
Query OK, 0 rows affected (0.02 sec)
Statement prepared
This is very unfortunate, because it's probably the most useful of all account management statements to execute in a stored procedure, and there's no other way to dynamically set the target user/host (short of direct manipulation of mysql.user table and FLUSH PRIVILEGES).
How to repeat:
Try to prepare ALTER USER ... PASSWORD EXPIRE.
Suggested fix:
Enable prepare of ALTER USER ... PASSWORD EXPIRE.