diff options
author | unknown <bar@mysql.com> | 2006-05-04 11:55:09 +0500 |
---|---|---|
committer | unknown <bar@mysql.com> | 2006-05-04 11:55:09 +0500 |
commit | af2f9b90fa7e90468eadfbb24256b0be87dd5184 (patch) | |
tree | 99b034d10717c94a9a3958ad7c85015c0cdee0f4 /sql/sql_acl.cc | |
parent | 38b1f7c7c3790a6ee59dd213eab16fe9c6fd97f4 (diff) | |
download | mariadb-git-af2f9b90fa7e90468eadfbb24256b0be87dd5184.tar.gz |
Bugs#17647: Trouble with "create database"
Problem:
if a user was granted privileges on database "d1",
it also was able to act on "D1" (i.e. in upper case),
even on Unix with case sensitive file system.
Fix:
Initialize grant hash to use binary comparison
if lower_case_file_system is not set (on most unixes),
and case insensitive comparison otherwise (Windows, MacOSX).
sql/sql_acl.cc:
Initialize hash to use binary comparison with case sensitive FS.
mysql-test/include/have_case_sensitive_file_system.inc:
New BitKeeper file ``mysql-test/include/have_case_sensitive_file_system.inc''
Backporting from 5.1
mysql-test/r/case_sensitive_file_system.require:
New BitKeeper file ``mysql-test/r/case_sensitive_file_system.require''
Backporting from 5.1
mysql-test/r/lowercase_fs_off.result:
Adding test case
mysql-test/t/lowercase_fs_off.test:
Adding test case
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 4626e5892a4..d1cd001e306 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -146,7 +146,9 @@ my_bool acl_init(bool dont_read_acl_tables) acl_cache= new hash_filo(ACL_CACHE_SIZE, 0, 0, (hash_get_key) acl_entry_get_key, - (hash_free_key) free, system_charset_info); + (hash_free_key) free, + lower_case_file_system ? + system_charset_info : &my_charset_bin); if (dont_read_acl_tables) { DBUG_RETURN(0); /* purecov: tested */ |