diff options
author | unknown <jimw@mysql.com> | 2005-08-22 15:48:50 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-08-22 15:48:50 -0700 |
commit | d40acb4d3f34a99a3d700021b0ae89b623e0ff94 (patch) | |
tree | 4ec1e5b9749edb7242d6bf464e54da5b13496dbd /mysql-test/r/grant2.result | |
parent | b977af8ace45a57abf4d1046d750997a275c4b9e (diff) | |
download | mariadb-git-d40acb4d3f34a99a3d700021b0ae89b623e0ff94.tar.gz |
Use the hostname with which the user authenticated when determining which
user to update with 'SET PASSWORD = ...'. (Bug #12302)
mysql-test/r/grant2.result:
Add new results
mysql-test/t/grant2.test:
Add new tests
sql/set_var.cc:
Pass priv_host into check_change_password().
sql/sql_acl.cc:
Add exact flag for find_acl_user, so we can specify that we want
an exact match on the hostname.
Diffstat (limited to 'mysql-test/r/grant2.result')
-rw-r--r-- | mysql-test/r/grant2.result | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/grant2.result b/mysql-test/r/grant2.result index ada205f6f23..8bd39b0225e 100644 --- a/mysql-test/r/grant2.result +++ b/mysql-test/r/grant2.result @@ -94,5 +94,31 @@ i 2 3 REVOKE ALL ON mysqltest_1.t1 FROM mysqltest_1@'127.0.0.0/255.0.0.0'; +delete from mysql.user where user like 'mysqltest\_1'; +flush privileges; drop table mysqltest_1.t1; +grant all on mysqltest_1.* to mysqltest_1@'127.0.0.1'; +select current_user(); +current_user() +mysqltest_1@127.0.0.1 +set password = password('changed'); +select host, length(password) from mysql.user where user like 'mysqltest\_1'; +host length(password) +127.0.0.1 41 +revoke all on mysqltest_1.* from mysqltest_1@'127.0.0.1'; +delete from mysql.user where user like 'mysqltest\_1'; +flush privileges; +grant all on mysqltest_1.* to mysqltest_1@'127.0.0.0/255.0.0.0'; +select current_user(); +current_user() +mysqltest_1@127.0.0.0/255.0.0.0 +set password = password('changed'); +select host, length(password) from mysql.user where user like 'mysqltest\_1'; +host length(password) +127.0.0.0/255.0.0.0 41 +revoke all on mysqltest_1.* from mysqltest_1@'127.0.0.0/255.0.0.0'; +delete from mysql.user where user like 'mysqltest\_1'; +flush privileges; drop database mysqltest_1; +set password = password("changed"); +ERROR 42000: Access denied for user ''@'localhost' to database 'mysql' |