| 1 |
# WL#14281 Make digest rounds configurable |
| 2 |
|
| 3 |
# Save the initial number of concurrent sessions |
| 4 |
--source include/count_sessions.inc |
| 5 |
|
| 6 |
# default digest rounds, 5000 |
| 7 |
SELECT @@global.caching_sha2_password_digest_rounds; |
| 8 |
CREATE USER wl_14281_default@localhost IDENTIFIED WITH caching_sha2_password BY 'WL_14281_PASSWORD'; |
| 9 |
SELECT SUBSTRING(authentication_string, 4,3) AS length FROM mysql.user WHERE user='wl_14281_default'; |
| 10 |
connect(wl_14281_conn,localhost,wl_14281_default,WL_14281_PASSWORD,test); |
| 11 |
SELECT user FROM information_schema.USER_ATTRIBUTES; |
| 12 |
disconnect wl_14281_conn; |
| 13 |
connection default; |
| 14 |
|
| 15 |
|
| 16 |
# smallish digest rounds, 7000 |
| 17 |
SET PERSIST_ONLY caching_sha2_password_digest_rounds=7000; |
| 18 |
--source include/restart_mysqld.inc |
| 19 |
SELECT @@global.caching_sha2_password_digest_rounds; |
| 20 |
CREATE USER wl_14281_7000@localhost IDENTIFIED WITH caching_sha2_password BY 'WL_14281_PASSWORD'; |
| 21 |
SELECT SUBSTRING(authentication_string, 4,3) AS length FROM mysql.user WHERE user='wl_14281_7000'; |
| 22 |
connect(wl_14281_conn,localhost,wl_14281_7000,WL_14281_PASSWORD,test); |
| 23 |
SELECT user FROM information_schema.USER_ATTRIBUTES; |
| 24 |
disconnect wl_14281_conn; |
| 25 |
connect(wl_14281_conn_default,localhost,wl_14281_default,WL_14281_PASSWORD,test); |
| 26 |
SELECT user FROM information_schema.USER_ATTRIBUTES; |
| 27 |
disconnect wl_14281_conn_default; |
| 28 |
connection default; |
| 29 |
|
| 30 |
# very big digest rounds, 999000 |
| 31 |
SET PERSIST_ONLY caching_sha2_password_digest_rounds=999000; |
| 32 |
--source include/restart_mysqld.inc |
| 33 |
SELECT @@global.caching_sha2_password_digest_rounds; |
| 34 |
CREATE USER wl_14281_xl@localhost IDENTIFIED WITH caching_sha2_password BY 'WL_14281_PASSWORD'; |
| 35 |
SELECT SUBSTRING(authentication_string, 4,3) AS length FROM mysql.user WHERE user='wl_14281_xl'; |
| 36 |
connect(wl_14281_conn,localhost,wl_14281_xl,WL_14281_PASSWORD,test); |
| 37 |
SELECT user FROM information_schema.USER_ATTRIBUTES; |
| 38 |
disconnect wl_14281_conn; |
| 39 |
connect(wl_14281_conn_7000,localhost,wl_14281_7000,WL_14281_PASSWORD,test); |
| 40 |
SELECT user FROM information_schema.USER_ATTRIBUTES; |
| 41 |
disconnect wl_14281_conn_7000; |
| 42 |
connect(wl_14281_conn_default,localhost,wl_14281_default,WL_14281_PASSWORD,test); |
| 43 |
SELECT user FROM information_schema.USER_ATTRIBUTES; |
| 44 |
disconnect wl_14281_conn_default; |
| 45 |
connection default; |
| 46 |
|
| 47 |
# Back to the default digest rounds, 5000. Do some negative tests. |
| 48 |
RESET PERSIST caching_sha2_password_digest_rounds; |
| 49 |
--source include/restart_mysqld.inc |
| 50 |
SELECT @@global.caching_sha2_password_digest_rounds; |
| 51 |
SELECT SUBSTRING(authentication_string, 4,3) AS length FROM mysql.user WHERE user='wl_14281_default'; |
| 52 |
connect(wl_14281_conn,localhost,wl_14281_xl,WL_14281_PASSWORD,test); |
| 53 |
SELECT user FROM information_schema.USER_ATTRIBUTES; |
| 54 |
disconnect wl_14281_conn; |
| 55 |
connect(wl_14281_conn_7000,localhost,wl_14281_7000,WL_14281_PASSWORD,test); |
| 56 |
SELECT user FROM information_schema.USER_ATTRIBUTES; |
| 57 |
disconnect wl_14281_conn_7000; |
| 58 |
connect(wl_14281_conn_default,localhost,wl_14281_default,WL_14281_PASSWORD,test); |
| 59 |
SELECT user FROM information_schema.USER_ATTRIBUTES; |
| 60 |
disconnect wl_14281_conn_default; |
| 61 |
--source include/wait_until_disconnected.inc |
| 62 |
connection default; |
| 63 |
|
| 64 |
# cleanup |
| 65 |
DROP USER wl_14281_default@localhost; |
| 66 |
DROP USER wl_14281_7000@localhost; |
| 67 |
DROP USER wl_14281_xl@localhost; |
| 68 |
# the persisted variables |
| 69 |
--error 0,1 |
| 70 |
--remove_file $MYSQLD_DATADIR/mysqld-auto.cnf |
| 71 |
|
| 72 |
--source include/wait_until_count_sessions.inc |