mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge branch '11.2' into 11.4
This commit is contained in:
@ -2372,11 +2372,10 @@ static int set_user_auth(THD *thd, const LEX_CSTRING &user,
|
||||
|
||||
mysql_mutex_assert_owner(&acl_cache->lock);
|
||||
|
||||
// check for SET PASSWORD
|
||||
if (!plugin)
|
||||
{
|
||||
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
ER_PLUGIN_IS_NOT_LOADED,
|
||||
ER_THD(thd, ER_PLUGIN_IS_NOT_LOADED), plugin_name);
|
||||
my_error(ER_PLUGIN_IS_NOT_LOADED, MYF(0), plugin_name);
|
||||
return ER_PLUGIN_IS_NOT_LOADED;
|
||||
}
|
||||
|
||||
@ -2430,6 +2429,21 @@ static int set_user_auth(THD *thd, const LEX_CSTRING &user,
|
||||
|
||||
res= 0;
|
||||
end:
|
||||
switch(res)
|
||||
{
|
||||
case ER_OUTOFMEMORY: // should be reported by my_malloc
|
||||
case ER_NOT_VALID_PASSWORD: // should be reported by plugin
|
||||
case ER_PASSWD_LENGTH: // should be reported by plugin
|
||||
DBUG_ASSERT(thd->is_error());
|
||||
/* fall through*/
|
||||
case 0:
|
||||
break;
|
||||
case ER_SET_PASSWORD_AUTH_PLUGIN:
|
||||
my_error(res, MYF(0), plugin_name);
|
||||
break;
|
||||
default:
|
||||
DBUG_ASSERT(0);
|
||||
}
|
||||
if (unlock_plugin)
|
||||
plugin_unlock(thd, plugin);
|
||||
return res;
|
||||
@ -2555,7 +2569,6 @@ bool acl_init(bool dont_read_acl_tables)
|
||||
*/
|
||||
if (!(thd=new THD(0)))
|
||||
DBUG_RETURN(1); /* purecov: inspected */
|
||||
thd->thread_stack= (char*) &thd;
|
||||
thd->store_globals();
|
||||
thd->set_query_inner((char*) STRING_WITH_LEN("intern:acl_init"),
|
||||
default_charset_info);
|
||||
@ -8060,7 +8073,6 @@ bool grant_init()
|
||||
|
||||
if (!(thd= new THD(0)))
|
||||
DBUG_RETURN(1); /* purecov: deadcode */
|
||||
thd->thread_stack= (char*) &thd;
|
||||
thd->store_globals();
|
||||
thd->set_query_inner((char*) STRING_WITH_LEN("intern:grant_init"),
|
||||
default_charset_info);
|
||||
|
Reference in New Issue
Block a user