From 51eec5cf9b888a020918440e79cb458eb7cdc2d4 Mon Sep 17 00:00:00 2001 From: "bar@mysql.com" <> Date: Thu, 4 May 2006 11:55:09 +0500 Subject: 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sql/sql_acl.cc') 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 */ -- cgit v1.2.1