summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2016-08-21 20:18:39 +0300
committerMonty <monty@mariadb.org>2016-08-21 20:18:39 +0300
commit6f31dd093a245a21a69fd990f947611a5dcfb77b (patch)
treed9210599ff8956c39f9b1bc1e247f88c3151a990 /sql/sql_update.cc
parent8d5a0d650b123e963d5fead2424783a9b52da395 (diff)
downloadmariadb-git-6f31dd093a245a21a69fd990f947611a5dcfb77b.tar.gz
Added new status variables to make it easier to debug certain problems:
- Handler_read_retry - Update_scan - Delete_scan
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 b2af075e2f4..55dc26ef043 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -528,6 +528,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)
{
/*
@@ -594,6 +597,7 @@ int mysql_update(THD *thd,
close_cached_file(&tempfile);
goto err;
}
+
table->file->try_semi_consistent_read(1);
/*
@@ -631,7 +635,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 */
table->file->position(table->record[0]);
@@ -746,7 +750,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 */
store_record(table,record[1]);