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-07 09:29:10 +0100
commit188b328335d5c2a61d21f528fad19a685f9511ef (patch)
treef7c4aae837125621e04d8e7df9af3a7414e01e52
parentd846b55d9b899b4ecd318567e75c9713ca44ba23 (diff)
downloadmariadb-git-188b328335d5c2a61d21f528fad19a685f9511ef.tar.gz
Urgent fix of 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);