| 1 |
create user test1@'%' identified via parsec using 'pwd'; |
| 2 |
ERROR HY000: Wrong ext-salt format |
| 3 |
create user test1@'%' identified via parsec using PASSWORD('pwd'); |
| 4 |
show grants for test1@'%'; |
| 5 |
Grants for test1@% |
| 6 |
GRANT USAGE ON *.* TO `test1`@`%` IDENTIFIED VIA parsec USING 'P0:salt:password' |
| 7 |
connect con1, localhost, test1, pwd; |
| 8 |
select 1, USER(), CURRENT_USER(); |
| 9 |
1 USER() CURRENT_USER() |
| 10 |
1 test1@localhost test1@% |
| 11 |
disconnect con1; |
| 12 |
connect con2, localhost, test1, pwd; |
| 13 |
select 2, USER(), CURRENT_USER(); |
| 14 |
2 USER() CURRENT_USER() |
| 15 |
2 test1@localhost test1@% |
| 16 |
disconnect con2; |
| 17 |
connect(localhost,test1,wrong_pwd,test,MASTER_MYPORT,MASTER_MYSOCK); |
| 18 |
connect con3, localhost, test1, wrong_pwd; |
| 19 |
ERROR 28000: Access denied for user 'test1'@'localhost' (using password: NO) |
| 20 |
connection default; |
| 21 |
create function have_ssl() returns char(3) |
| 22 |
return (select if(variable_value > '','yes','no') as 'have_ssl' |
| 23 |
from information_schema.session_status |
| 24 |
where variable_name='ssl_cipher'); |
| 25 |
grant execute on test.* to test1@'%'; |
| 26 |
# mysql -utest1 -ppwd --ssl-verify-server-cert -e "select test.have_ssl()" |
| 27 |
test.have_ssl() |
| 28 |
yes |
| 29 |
drop function have_ssl; |
| 30 |
drop user test1@'%'; |
| 31 |
# MDEV-34854 Parsec sends garbage when using an empty password |
| 32 |
create user test2@'%' identified via parsec using PASSWORD(''); |
| 33 |
show grants for test2@'%'; |
| 34 |
Grants for test2@% |
| 35 |
GRANT USAGE ON *.* TO `test2`@`%` IDENTIFIED VIA parsec USING 'P0:salt:password' |
| 36 |
connect con4, localhost, test2,; |
| 37 |
select 4, USER(), CURRENT_USER(); |
| 38 |
4 USER() CURRENT_USER() |
| 39 |
4 test2@localhost test2@% |
| 40 |
disconnect con4; |
| 41 |
connect(localhost,test2,wrong_pwd,test,MASTER_MYPORT,MASTER_MYSOCK); |
| 42 |
connect con5, localhost, test2, "wrong_pwd"; |
| 43 |
ERROR 28000: Access denied for user 'test2'@'localhost' (using password: NO) |
| 44 |
connection default; |
| 45 |
drop user test2@'%'; |