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.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index baccb3358f7..1205514cfd1 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -26,7 +26,7 @@
/* Return 0 if row hasn't changed */
-static bool compare_record(TABLE *table)
+bool compare_record(TABLE *table, query_id_t query_id)
{
if (table->s->blob_fields + table->s->varchar_fields == 0)
return cmp_record(table,record[1]);
@@ -1569,6 +1569,15 @@ int multi_update::do_updates(bool from_send_error)
if (!can_compare_record || compare_record(table))
{
+ int error;
+ if ((error= cur_table->view_check_option(thd, ignore)) !=
+ VIEW_CHECK_OK)
+ {
+ if (error == VIEW_CHECK_SKIP)
+ continue;
+ else if (error == VIEW_CHECK_ERROR)
+ goto err;
+ }
if ((local_error=table->file->ha_update_row(table->record[1],
table->record[0])))
{