Commit graph

6 commits

Author SHA1 Message Date
Dmitry Shulga
cdddc7bfd5 Follow up for bug#36742. Changed test case for bug#19828
because currently hostname stored in db in lowercase.
2010-10-18 21:03:53 +07:00
Satya B
882535423d Fix for Bug #41597 - After rename of user, there are additional grants when
grants are reapplied.


After renaming a user and trying to re-apply grants results in additional
grants.

This is because we use username as part of the key for GRANT_TABLE structure.
When the user is renamed, we only change the username stored and the hash key
still contains the old user name and this results in the extra privileges

Fixed by rebuilding the hash key and updating the column_priv_hash structure
when the user is renamed

mysql-test/r/grant3.result:
  Bug #41597 - After rename of user, there are additional grants when 
               grants are reapplied.
  
  Testcase for BUG#41597
mysql-test/t/grant3.test:
  Bug #41597 - After rename of user, there are additional grants when 
               grants are reapplied.
  
  Testcase for BUG#41597
sql/sql_acl.cc:
  Bug #41597 - After rename of user, there are additional grants when 
               grants are reapplied.
  
  Fixed handle_grant_struct() to update the hash key when the user is renamed.
  Added to set_user_details() method to GRANT_NAME class
2009-10-20 11:47:57 +05:30
unknown
7a290b55f7 Fixed bug#31194: Privilege ordering does not order properly
for wildcard values.
The server ignored escape character before wildcards during
the calculation of priority values for sorting of a privilege
list. (Actually the server counted an escape character as an
ordinary wildcard like % or _). I.e. the table name template
with a wildcard character like 'tbl_1' had higher priority in
a privilege list than concrete table name without wildcards
like 'tbl\_1', and some privileges of 'tbl\_1' was hidden
by privileges for 'tbl_1'.

The get_sort function has been modified to ignore escaped
wildcards as usual.



mysql-test/r/grant3.result:
  Added test case for bug#31194.
mysql-test/t/grant3.test:
  Added test case for bug#31194.
sql/sql_acl.cc:
  Fixed bug#31194.
  The server used the wild_prefix escape character (usually \-character)
  like % and _ wildcards in the get_sort function for sorting weights
  calculation.
  
  The get_sort function has been modified to ignore escaped wildcards
  and alone escapes like in the wild_case_compare function.
2008-02-13 19:34:12 +04:00
unknown
eeeeec8edc Bug#19828: Case sensitivity in hostname leads to inconsistent behavior
clean up SHOW GRANTS so it will show host-names with case as entered.
make REVOKE and friends case-sensitive to make things more intuitive.
Patch by Martin Friebe.


mysql-test/r/grant.result:
  Bug#19828: Case sensitivity in hostname leads to inconsistent behavior
  
  clean up after test so random order of tests is possible
mysql-test/r/grant3.result:
  Bug#19828: Case sensitivity in hostname leads to inconsistent behavior
  
  Show that REVOKE, SHOW GRANTS etc. are now consistently case-sensitive.
mysql-test/t/grant.test:
  Bug#19828: Case sensitivity in hostname leads to inconsistent behavior
  
  clean up after test so random order of tests is possible
mysql-test/t/grant3.test:
  Bug#19828: Case sensitivity in hostname leads to inconsistent behavior
  
  Show that REVOKE, SHOW GRANTS etc. are now consistently case-sensitive.
2007-09-20 18:10:35 +02:00
unknown
c9659f0e6d sql/sql_acl.cc
report correct errror in MODE_NO_AUTO_CREATE_USER
    cleanup
after merge fixes


mysql-test/r/grant2.result:
  updated after merge
mysql-test/r/grant3.result:
  updated after merge
mysql-test/r/rpl_temporary.result:
  sqlstate fixed
mysql-test/t/grant2.test:
  updated after merge
mysql-test/t/grant3.test:
  updated after merge
sql/share/errmsg.txt:
  sqlstate fixed
sql/sql_acl.cc:
  report correct errror in MODE_NO_AUTO_CREATE_USER
  cleanup
2005-03-23 19:18:25 +01:00
unknown
06abeb4f63 - Added new error message.
- Changed error message in sql_acl.cc
- Added some more tests for GRANT.


Docs/mysqld_error.txt:
  Added new error message.
mysql-test/r/grant2.result:
  Error message changed.
mysql-test/r/grant3.result:
  Clean up.
mysql-test/t/grant2.test:
  Error message changed.
sql/share/errmsg.txt:
  Added new error message.
sql/sql_acl.cc:
  Changed error message.
mysql-test/t/grant3.test:
  Error message changed.
2005-03-22 15:57:24 +02:00