summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index de953aa603b..ed4d6fd9b81 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -231,9 +231,13 @@ int mysql_update(THD *thd,
break; /* purecov: inspected */
}
if (!--limit && using_limit)
+ {
+ error= -1;
break;
+ }
}
}
+ limit= tmp_limit;
end_read_record(&info);
/* Change select to use tempfile */
if (select)