summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2012-02-16 17:33:37 +0100
committerVladislav Vaintroub <wlad@montyprogram.com>2012-02-16 17:33:37 +0100
commit02724621ca1284d9eb18e7618f6b25317fb5d88c (patch)
tree178295743ed734d85c3b83ca6428dbba282a7c10 /sql/sql_class.h
parentcfa56f900acefcf228c26dfa39c1b9142ef3552b (diff)
parent0d0e68da6ae65d17ed415721be3582add187cee7 (diff)
downloadmariadb-git-02724621ca1284d9eb18e7618f6b25317fb5d88c.tar.gz
merge from 5.5
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index ce000adc785..563a9adefce 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -585,12 +585,15 @@ typedef struct system_status_var
ulong ha_read_prev_count;
ulong ha_read_rnd_count;
ulong ha_read_rnd_next_count;
+ ulong ha_read_rnd_deleted_count;
/*
This number doesn't include calls to the default implementation and
calls made by range access. The intent is to count only calls made by
BatchedKeyAccess.
*/
ulong ha_multi_range_read_init_count;
+ ulong ha_mrr_extra_key_sorts;
+ ulong ha_mrr_extra_rowid_sorts;
ulong ha_rollback_count;
ulong ha_update_count;
@@ -4221,10 +4224,17 @@ inline int handler::ha_ft_read(uchar *buf)
inline int handler::ha_rnd_next(uchar *buf)
{
MYSQL_READ_ROW_START(table_share->db.str, table_share->table_name.str, TRUE);
- increment_statistics(&SSV::ha_read_rnd_next_count);
int error= rnd_next(buf);
if (!error)
+ {
update_rows_read();
+ increment_statistics(&SSV::ha_read_rnd_next_count);
+ }
+ else if (error == HA_ERR_RECORD_DELETED)
+ increment_statistics(&SSV::ha_read_rnd_deleted_count);
+ else
+ increment_statistics(&SSV::ha_read_rnd_next_count);
+
table->status=error ? STATUS_NOT_FOUND: 0;
MYSQL_READ_ROW_DONE(error);
return error;