mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1
This commit is contained in:
@ -1644,17 +1644,6 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
Check that the user isn't trying to change a password for another
|
||||
user if he doesn't have UPDATE privilege to the MySQL database
|
||||
*/
|
||||
DBUG_ASSERT(combo.host.str != 0);
|
||||
if (thd->user && combo.password.str &&
|
||||
(strcmp(thd->user,combo.user.str) ||
|
||||
my_strcasecmp(system_charset_info,
|
||||
combo.host.str, thd->host_or_ip)) &&
|
||||
check_access(thd, UPDATE_ACL, "mysql",0,1,0))
|
||||
goto end;
|
||||
old_row_exists = 1;
|
||||
store_record(table,record[1]); // Save copy for update
|
||||
if (combo.password.str) // If password given
|
||||
@ -2127,7 +2116,7 @@ static GRANT_NAME *name_hash_search(HASH *name_hash,
|
||||
|
||||
inline GRANT_NAME *
|
||||
proc_hash_search(const char *host, const char *ip, const char *db,
|
||||
const char *user, const char *tname, bool exact)
|
||||
const char *user, const char *tname, bool exact)
|
||||
{
|
||||
return (GRANT_TABLE*) name_hash_search(&proc_priv_hash, host, ip, db,
|
||||
user, tname, exact);
|
||||
@ -3596,11 +3585,11 @@ err:
|
||||
name Routine name
|
||||
|
||||
RETURN
|
||||
1 error
|
||||
0 Ok
|
||||
1 error
|
||||
*/
|
||||
|
||||
bool check_routine_level_acl(THD *thd, char *db, char *name)
|
||||
bool check_routine_level_acl(THD *thd, const char *db, const char *name)
|
||||
{
|
||||
bool no_routine_acl= 1;
|
||||
if (grant_option)
|
||||
@ -5572,4 +5561,16 @@ void fill_effective_table_privileges(THD *thd, GRANT_INFO *grant,
|
||||
grant->privilege|= grant->grant_table->privs;
|
||||
}
|
||||
}
|
||||
|
||||
#else /* NO_EMBEDDED_ACCESS_CHECKS */
|
||||
|
||||
/****************************************************************************
|
||||
Dummy wrappers when we don't have any access checks
|
||||
****************************************************************************/
|
||||
|
||||
bool check_routine_level_acl(THD *thd, const char *db, const char *name)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user