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

Merge remote-tracking branch 'github/bb-11.4-release' into bb-11.8-serg

This commit is contained in:
Sergei Golubchik
2025-04-27 11:33:27 +02:00
committed by Oleksandr Byelkin
430 changed files with 14769 additions and 6751 deletions

View File

@@ -366,7 +366,7 @@ bool Sql_cmd_update::update_single_table(THD *thd)
ha_rows dup_key_found;
bool need_sort= TRUE;
bool reverse= FALSE;
ha_rows updated, updated_or_same, found;
ha_rows updated_or_same;
key_map old_covering_keys;
TABLE *table;
SQL_SELECT *select= NULL;
@@ -1584,7 +1584,7 @@ static bool multi_update_check_table_access(THD *thd, TABLE_LIST *table,
if (multi_update_check_table_access(thd, tbl, tables_for_update,
&updated))
{
tbl->hide_view_error(thd);
tbl->replace_view_error_with_generic(thd);
return true;
}
}
@@ -2117,7 +2117,8 @@ multi_update::initialize_tables(JOIN *join)
if (unlikely((thd->variables.option_bits & OPTION_SAFE_UPDATES) &&
error_if_full_join(join)))
DBUG_RETURN(1);
if (join->implicit_grouping)
if (join->implicit_grouping ||
join->select_lex->have_window_funcs())
{
my_error(ER_INVALID_GROUP_FUNC_USE, MYF(0));
DBUG_RETURN(1);
@@ -3222,6 +3223,13 @@ bool Sql_cmd_update::execute_inner(THD *thd)
if (result)
{
/* In single table case, this->updated set by update_single_table */
if (res && multitable)
{
found= ((multi_update*)get_result())->num_found();
updated= ((multi_update*)get_result())->num_updated();
}
res= false;
delete result;
}