1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge 10.6 into 10.11

This commit is contained in:
Marko Mäkelä
2024-05-30 16:04:00 +03:00
111 changed files with 1451 additions and 296 deletions

View File

@ -1132,8 +1132,9 @@ static bool wsrep_tables_accessible_when_detached(const TABLE_LIST *tables)
{
for (const TABLE_LIST *table= tables; table; table= table->next_global)
{
LEX_CSTRING db= table->db, tn= table->table_name;
if (get_table_category(&db, &tn) < TABLE_CATEGORY_INFORMATION)
if (get_table_category(Lex_ident_db(table->db),
Lex_ident_table(table->table_name))
< TABLE_CATEGORY_INFORMATION)
return false;
}
return tables != NULL;
@ -6482,15 +6483,15 @@ static TABLE *find_temporary_table_for_rename(THD *thd,
{
TABLE_LIST *next= table->next_local;
if (!strcmp(table->get_db_name(), cur_table->get_db_name()) &&
!strcmp(table->get_table_name(), cur_table->get_table_name()))
if (!strcmp(table->get_db_name().str, cur_table->get_db_name().str) &&
!strcmp(table->get_table_name().str, cur_table->get_table_name().str))
{
/* Table was moved away, can't be same as 'table' */
found= 1;
res= 0; // Table can't be a temporary table
}
if (!strcmp(next->get_db_name(), cur_table->get_db_name()) &&
!strcmp(next->get_table_name(), cur_table->get_table_name()))
if (!strcmp(next->get_db_name().str, cur_table->get_db_name().str) &&
!strcmp(next->get_table_name().str, cur_table->get_table_name().str))
{
/*
Table has matching name with new name of this table. cur_table should
@ -7249,8 +7250,7 @@ check_table_access(THD *thd, privilege_t requirements, TABLE_LIST *tables,
INSERT_ACL : SELECT_ACL);
}
if (check_access(thd, want_access,
table_ref->get_db_name(),
if (check_access(thd, want_access, table_ref->get_db_name().str,
&table_ref->grant.privilege,
&table_ref->grant.m_internal,
0, no_errors))
@ -9449,7 +9449,7 @@ sql_kill_user(THD *thd, LEX_USER *user, killed_state state)
break;
case ER_KILL_DENIED_ERROR:
char buf[DEFINER_LENGTH+1];
strxnmov(buf, sizeof(buf), user->user.str, "@", user->host.str, NULL);
strxnmov(buf, sizeof(buf)-1, user->user.str, "@", user->host.str, NULL);
my_printf_error(ER_KILL_DENIED_ERROR, ER_THD(thd, ER_CANNOT_USER), MYF(0),
"KILL USER", buf);
break;