24#ifndef CURSOR_BY_ERROR_LOG_H
25#define CURSOR_BY_ERROR_LOG_H
110 assert(other !=
nullptr);
211 if (current_event !=
nullptr) {
218 return current_event;
229 return current_event;
258 int rnd_pos(
const void *pos)
override;
Definition: pfs_engine_table.h:299
Definition: pfs_engine_table.h:267
An abstract PERFORMANCE_SCHEMA table.
Definition: pfs_engine_table.h:69
Generic index for error_log table.
Definition: cursor_by_error_log.h:241
virtual bool match(log_sink_pfs_event *row)=0
PFS_index_error_log(PFS_engine_key *key)
Definition: cursor_by_error_log.h:243
~PFS_index_error_log() override=default
Index in the error-log ring-buffer.
Definition: cursor_by_error_log.h:49
void set_after(const PFS_ringbuffer_index *other)
Set our index to the element after the given one (if that is valid; otherwise, we cannot determine a ...
Definition: cursor_by_error_log.h:109
ulonglong m_timestamp
Time-stamp we copied from the event we point to when setting this index.
Definition: cursor_by_error_log.h:72
void reset()
Reset index.
Definition: cursor_by_error_log.h:78
PFS_ringbuffer_index()
Constructor.
Definition: cursor_by_error_log.h:87
int m_index
Numeric row index.
Definition: cursor_by_error_log.h:54
void set_at(const PFS_ringbuffer_index *other)
Set this index to a given position.
Definition: cursor_by_error_log.h:95
log_sink_pfs_event * m_event
Pointer to an event in the ring-buffer.
Definition: cursor_by_error_log.h:61
log_sink_pfs_event * get_event()
Get event if it's still valid.
Definition: cursor_by_error_log.h:156
log_sink_pfs_event * scan_next()
Return current record (if valid), then set index to the next record.
Definition: cursor_by_error_log.h:206
Cursor CURSOR_BY_ERROR_LOG for error_log table.
Definition: cursor_by_error_log.h:251
pos_t m_pos
Current position.
Definition: cursor_by_error_log.h:273
int rnd_pos(const void *pos) override
Random pos.
Definition: cursor_by_error_log.cc:103
static ha_rows get_row_count()
Get row-count (by getting the number of events in the ring-buffer)
Definition: cursor_by_error_log.cc:41
virtual int make_row(log_sink_pfs_event *row)=0
~cursor_by_error_log() override=default
void reset_position() override
Reset cursor position.
Definition: cursor_by_error_log.cc:61
int rnd_next() override
Read next row (from ring-buffer into table).
Definition: cursor_by_error_log.cc:74
pos_t m_next_pos
Next position.
Definition: cursor_by_error_log.h:275
cursor_by_error_log(const PFS_engine_table_share *share)
Definition: cursor_by_error_log.cc:37
int index_next() override
Go to next entry in index and retrieve the matching error log event.
Definition: cursor_by_error_log.cc:129
PFS_index_error_log * m_opened_index
Definition: cursor_by_error_log.h:278
PFS_ringbuffer_index pos_t
Definition: cursor_by_error_log.h:233
log_sink_pfs_event * log_sink_pfs_event_first()
Get oldest event still in ring-buffer.
Definition: log_sink_perfschema.cc:159
log_sink_pfs_event * log_sink_pfs_event_valid(log_sink_pfs_event *e, ulonglong logged)
Use timestamp to check whether a given event-pointer still points to a valid event in the ring-buffer...
Definition: log_sink_perfschema.cc:234
log_sink_pfs_event * log_sink_pfs_event_next(log_sink_pfs_event *e)
Get event following the supplied one.
Definition: log_sink_perfschema.cc:183
my_off_t ha_rows
Definition: my_base.h:1139
unsigned long long int ulonglong
Definition: my_inttypes.h:55
Performance schema tables (declarations).
Performance schema instruments (declarations).
required string key
Definition: replication_asynchronous_connection_failover.proto:59
A PERFORMANCE_SCHEMA table share.
Definition: pfs_engine_table.h:357
Definition: log_sink_perfschema.h:58
ulonglong m_timestamp
Column ERROR_LOG_TIMESTAMP.
Definition: log_sink_perfschema.h:60
Helpers to implement a performance schema table.