summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-08-25 12:40:09 +0200
committerSergei Golubchik <serg@mariadb.org>2016-08-25 12:40:09 +0200
commit6b1863b8304662189a3b9a4aef1e1bebef035b86 (patch)
tree48ba2cbdda863b644108e93ace3668333ae0d193 /sql/sql_update.cc
parentea91bb6801b1b619d64fa137ea351eca9de683ec (diff)
parent5bbe929d706e26cb3f9b291da6009526a17b1545 (diff)
downloadmariadb-git-6b1863b8304662189a3b9a4aef1e1bebef035b86.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index a23f71977aa..04aea060543 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -534,6 +534,9 @@ int mysql_update(THD *thd,
DBUG_EXECUTE_IF("show_explain_probe_update_exec_start",
dbug_serve_apcs(thd, 1););
+ if (!(select && select->quick))
+ status_var_increment(thd->status_var.update_scan_count);
+
if (query_plan.using_filesort || query_plan.using_io_buffer)
{
/*
@@ -604,6 +607,7 @@ int mysql_update(THD *thd,
close_cached_file(&tempfile);
goto err;
}
+
table->file->try_semi_consistent_read(1);
/*
@@ -642,7 +646,7 @@ int mysql_update(THD *thd,
thd->inc_examined_row_count(1);
if (!select || (error= select->skip_record(thd)) > 0)
{
- if (table->file->was_semi_consistent_read())
+ if (table->file->ha_was_semi_consistent_read())
continue; /* repeat the read of the same row if it still exists */
explain->buf_tracker.on_record_after_where();
@@ -760,7 +764,7 @@ int mysql_update(THD *thd,
thd->inc_examined_row_count(1);
if (!select || select->skip_record(thd) > 0)
{
- if (table->file->was_semi_consistent_read())
+ if (table->file->ha_was_semi_consistent_read())
continue; /* repeat the read of the same row if it still exists */
explain->tracker.on_record_after_where();