1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge branch '10.11' into 11.2

This commit is contained in:
Oleksandr Byelkin
2024-10-29 16:39:47 +01:00
660 changed files with 8148 additions and 3604 deletions

View File

@ -2364,11 +2364,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;
}
@ -2422,6 +2421,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;
@ -2547,7 +2561,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);
@ -8046,7 +8059,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);