summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2021-01-06 11:25:19 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2021-01-06 11:25:19 +0100
commit053458de46b7e61a5099830523ecaac254c18130 (patch)
tree268f145590d014fdb965f0536bae9c60be67846e
parent9a645dae9e59ec398cfda33529c44002625ddc87 (diff)
downloadmariadb-git-bb-10.3-MDEV-23446-fix.tar.gz
Urgent fix of MDEV-23446 fix:bb-10.3-MDEV-23446-fix
Use the same variable in both scopes (from where we have "goto error" and target of the goto)
-rw-r--r--sql/sql_update.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index c6eba609967..f24706fba19 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -2347,6 +2347,7 @@ int multi_update::send_data(List<Item> &not_used_values)
{
TABLE_LIST *cur_table;
DBUG_ENTER("multi_update::send_data");
+ int error= 0;
for (cur_table= update_tables; cur_table; cur_table= cur_table->next_local)
{
@@ -2393,7 +2394,6 @@ int multi_update::send_data(List<Item> &not_used_values)
found++;
if (!can_compare_record || compare_record(table))
{
- int error;
if ((error= cur_table->view_check_option(thd, ignore)) !=
VIEW_CHECK_OK)
@@ -2476,7 +2476,6 @@ error:
}
else
{
- int error;
TABLE *tmp_table= tmp_tables[offset];
if (copy_funcs(tmp_table_param[offset].items_to_copy, thd))
DBUG_RETURN(1);