| 1 |
# Prepare command set of DML and DDL commands that are run |
| 2 |
# when a concurrent connection has read ACL table. This file |
| 3 |
# dml_ddl.inc is used below in several test cases. |
| 4 |
|
| 5 |
# Print locks acquired on row 'u2', 'u2x'. |
| 6 |
eval $query_row_locks; |
| 7 |
|
| 8 |
# Delete the user 'u2' |
| 9 |
DELETE FROM mysql.user WHERE User='u2'; |
| 10 |
|
| 11 |
# Insert the user 'u2x' from backup. |
| 12 |
INSERT INTO mysql.user SELECT * FROM user_bk; |
| 13 |
|
| 14 |
# Replace the user 'u2x' from backup. |
| 15 |
REPLACE INTO mysql.user SELECT * FROM user_bk; |
| 16 |
|
| 17 |
# Rename 'u2x' to 'u2'. |
| 18 |
UPDATE mysql.user SET user='u2' WHERE user LIKE 'u2x'; |
| 19 |
|
| 20 |
# Alter the user 'u2' using DDL |
| 21 |
let newpass=`SELECT SUBSTRING((lpad(hex(round(rand() * 10000000)),6,0)),-6)`; |
| 22 |
--disable_query_log |
| 23 |
eval ALTER USER u2 IDENTIFIED BY '$newpass'; |
| 24 |
--enable_query_log |
| 25 |
|
| 26 |
# Execute DDL changing mysql.user. |
| 27 |
CREATE USER someuser; |
| 28 |
ALTER USER someuser IDENTIFIED BY 'somepass'; |
| 29 |
DROP USER someuser; |