mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into zippy.cornsilk.net:/home/cmiller/work/mysql/bug14262/my50-bug14262
This commit is contained in:
@ -2999,9 +2999,22 @@ bool mysql_table_grant(THD *thd, TABLE_LIST *table_list,
|
||||
grant_option=TRUE;
|
||||
thd->mem_root= old_root;
|
||||
pthread_mutex_unlock(&acl_cache->lock);
|
||||
|
||||
if (!result) /* success */
|
||||
{
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
}
|
||||
|
||||
rw_unlock(&LOCK_grant);
|
||||
if (!result)
|
||||
|
||||
if (!result) /* success */
|
||||
send_ok(thd);
|
||||
|
||||
/* Tables are automatically closed */
|
||||
DBUG_RETURN(result);
|
||||
}
|
||||
@ -3153,9 +3166,21 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc,
|
||||
grant_option=TRUE;
|
||||
thd->mem_root= old_root;
|
||||
pthread_mutex_unlock(&acl_cache->lock);
|
||||
if (!result && !no_error)
|
||||
{
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
}
|
||||
|
||||
rw_unlock(&LOCK_grant);
|
||||
|
||||
if (!result && !no_error)
|
||||
send_ok(thd);
|
||||
|
||||
/* Tables are automatically closed */
|
||||
DBUG_RETURN(result);
|
||||
}
|
||||
@ -3253,11 +3278,23 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list,
|
||||
}
|
||||
}
|
||||
VOID(pthread_mutex_unlock(&acl_cache->lock));
|
||||
|
||||
if (!result)
|
||||
{
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
}
|
||||
|
||||
rw_unlock(&LOCK_grant);
|
||||
close_thread_tables(thd);
|
||||
|
||||
if (!result)
|
||||
send_ok(thd);
|
||||
|
||||
DBUG_RETURN(result);
|
||||
}
|
||||
|
||||
@ -5251,6 +5288,13 @@ bool mysql_create_user(THD *thd, List <LEX_USER> &list)
|
||||
}
|
||||
|
||||
VOID(pthread_mutex_unlock(&acl_cache->lock));
|
||||
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
|
||||
rw_unlock(&LOCK_grant);
|
||||
close_thread_tables(thd);
|
||||
if (result)
|
||||
@ -5307,6 +5351,13 @@ bool mysql_drop_user(THD *thd, List <LEX_USER> &list)
|
||||
rebuild_check_host();
|
||||
|
||||
VOID(pthread_mutex_unlock(&acl_cache->lock));
|
||||
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
|
||||
rw_unlock(&LOCK_grant);
|
||||
close_thread_tables(thd);
|
||||
if (result)
|
||||
@ -5376,6 +5427,13 @@ bool mysql_rename_user(THD *thd, List <LEX_USER> &list)
|
||||
rebuild_check_host();
|
||||
|
||||
VOID(pthread_mutex_unlock(&acl_cache->lock));
|
||||
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
|
||||
rw_unlock(&LOCK_grant);
|
||||
close_thread_tables(thd);
|
||||
if (result)
|
||||
@ -5549,6 +5607,13 @@ bool mysql_revoke_all(THD *thd, List <LEX_USER> &list)
|
||||
}
|
||||
|
||||
VOID(pthread_mutex_unlock(&acl_cache->lock));
|
||||
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
|
||||
rw_unlock(&LOCK_grant);
|
||||
close_thread_tables(thd);
|
||||
|
||||
|
Reference in New Issue
Block a user