lava-oushudb-dt-sql-parser/test/parser/mysql/syntax/fixtures/setPassword.sql
琉易 428d851913
feat: #190 improve mysql grammer (#196)
* refactor: generic rename to mysql

* refactor: g4 with mysql syntax

* test: mysql syntax

* refactor: remove useless keywords

* refactor: remove nonReserved keywords

* refactor: lint specificFunction

---------

Co-authored-by: liuyi <liuyi@dtstack.com>
2023-11-27 15:25:40 +08:00

40 lines
1.1 KiB
SQL

-- https://dev.mysql.com/doc/refman/8.0/en/set-password.html
/* SET PASSWORD [FOR user] auth_option
[REPLACE 'current_auth_string']
[RETAIN CURRENT PASSWORD]
auth_option: {
= 'auth_string'
| TO RANDOM
} */
SET PASSWORD FOR user = 'auth_string' REPLACE 'current_auth_string' RETAIN CURRENT PASSWORD;
SET PASSWORD FOR user = 'auth_string' REPLACE 'current_auth_string';
SET PASSWORD FOR user TO RANDOM RETAIN CURRENT PASSWORD;
SET PASSWORD FOR user TO RANDOM;
SET PASSWORD TO RANDOM REPLACE 'current_auth_string' RETAIN CURRENT PASSWORD;
SET PASSWORD TO RANDOM REPLACE 'current_auth_string';
SET PASSWORD TO RANDOM RETAIN CURRENT PASSWORD;
SET PASSWORD = 'auth_string';
SET PASSWORD TO RANDOM;
SET PASSWORD FOR 'jeffrey'@'localhost' = 'auth_string';
SET PASSWORD FOR 'bob'@'%.example.org' = 'auth_string';
/* https://dev.mysql.com/doc/refman/5.7/en/set-password.html */
/* SET PASSWORD [FOR user] = password_option */
SET PASSWORD FOR user = 'auth_string';
SET PASSWORD FOR user = PASSWORD('auth_string');
SET PASSWORD = 'auth_string';
SET PASSWORD = PASSWORD('auth_string');