1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Merge remote-tracking branch 'origin/11.2' into 11.4

This commit is contained in:
Alexander Barkov
2024-06-17 14:53:54 +04:00
252 changed files with 4073 additions and 1032 deletions

View File

@@ -1131,8 +1131,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;
@@ -4552,7 +4553,7 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
#ifdef WITH_WSREP
if (wsrep && !first_table->view)
{
bool is_innodb= (first_table->table->file->ht->db_type == DB_TYPE_INNODB);
bool is_innodb= first_table->table->file->partition_ht()->db_type == DB_TYPE_INNODB;
// For consistency check inserted table needs to be InnoDB
if (!is_innodb && thd->wsrep_consistency_check != NO_CONSISTENCY_CHECK)
@@ -6239,15 +6240,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
@@ -6999,8 +7000,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))
@@ -9201,7 +9201,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;