1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Added Handler_read_rnd_deleted, number of deleted rows found with ha_read_rnd_first.

This commit is contained in:
Michael Widenius
2012-01-13 14:35:49 +02:00
parent 296b450d3b
commit 5438d57315
18 changed files with 98 additions and 4 deletions

View File

@ -571,6 +571,7 @@ 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
@ -3747,10 +3748,17 @@ inline int handler::ha_ft_read(uchar *buf)
inline int handler::ha_rnd_next(uchar *buf)
{
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;
return error;
}